Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Help me !!!, USBUART_DataIsReady() not ready

Anonymous
Not applicable
        Hello, i'm using CY8CKIT-050 Psoc-5LP Development kit i use USBUART CDC connect to pc. if i connect usb after window boot finnish. it work well but if i connect usb cable before turn on Pc and then i boot pc it doesn`t work. USBUART_DataIsReady() != 0 is false. if i remove and plug cable (or reset) it work again. but i don't want to do this way. what should i do. thank you. ps. sorry for My Bad English   
0 Likes
1 Reply
ShopithamR_26
Employee
Employee
25 replies posted 10 replies posted 5 replies posted

 Hi,

   

When you connect the device to PC before you start it and then you start the PC , the BIOS will try to enumerate the device . In that case  the while(!USBUART_1_GetConfiguration()); will pass and device will enter into the While(1)  and do the application.

   

When the PC exits the BIOS and enters into the Normal mode , the PC will not know that this device has been connected and it will try to enumerate this device again . However in our code we handle the enumeration only outside the While(1) loop . We dont handle the enumeration inside it . 

   

You need to modify the application code to handle the enumeration inside . You can use the USBFS_CheckActivity() API to see if you are have any USB Activity . If the activity does not happen for more than 1 second , then do the enumeration code (while(!USBUART_1_GetConfiguration());) again and see if it works .

   

If you are still facing an issue please create a Technical support case . Our engineers will assist you.

   

-sobi

0 Likes