cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

ThBi_3905606
New Contributor

Hello

in my application the charger IC always feed the system and "disconnect" the battery when the charging process is finish.( ofr keeping a long life battery with less cycle)

So for my understanding, when a USB cable is plug into my device, my system is ALWAY bus powered.

Do I have to set my USB device as a self powered device, and just after the configured state, change into bus powered device ? or directly as a bus powere device ?

What about the hardawe configuration ? do i need external resistance for pull up or I just use the internal pull up resistance on D- and d+

 

 

 

 

0 Likes
1 Reply
Aashita_Raj
Moderator
Moderator

Hi @ThBi_3905606 ,

Your statement mentioning your understanding of "when a USB cable is plug into my device, my system is ALWAY bus powered."- is absolutely correct. In case of when the devices needs to be behave as self powered and bus powered at different times, you need to add two configuration descriptors under device descriptor, writing Bus powered for one configuration and Self powered for the other as below-

Aashita_Raj_0-1614859293735.png

Also, Can you please let us know when do you want the device to act as self powered and when as bus powered?

In case of self-powered device, you must connect a GPIO pin to VBUS through a resistive network and write firmware to monitor the status of the GPIO. Please go through the sections " USB Compliance for Self Powered Devices" and "VBUS Monitoring"  of USBFS Component datasheet - https://www.cypress.com/file/376416/download for the further details on this.

Please go through above and let us know in case of further queries.

Best Regards,

Aashita 

 

 

 

 

0 Likes