USBUART (CDC) PSOC5LP detecting USB disconnections (SELF POWERED - NO VBUS)

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

cross mob
GrRa_284656
Level 2
Level 2
5 sign-ins 10 replies posted 5 replies posted

Hi to all,

after reading forum and examples and after a couple of problems regarding USB drivers, now I am able to use USBUART (CDC) interface with PSoC5LP!

It remains only a problem: manage the connection/disconnection of the USB cable.

I read KBA210620:

http://origin-www.cypress.com/knowledge-base-article/troubleshooting-psoc-3-psoc-4-l-series-and-psoc...

This document suggest to monitor the VBUS line to detect the disconnection event.

But, in my current design, I cannot monitor the VBUS line (SELF POWERED - NO VBUS).

I did a bit of experiments but I was not lucky.

There is someone that knows a solution to detect USB disconnection (USBUART - CDC) without monitoring the VBUS line?

Thank you in advance to all 😉

PS: UBUART component datasheet v.3.20 does not define USBUART_GetConfiguration() API

0 Likes
1 Solution

USBUART_CheckActivity() function returns the activity status of the bus. It clears the hardware status to provide updated status on the next call of this function. It provides a way to determine whether any USB bus activity occurred. The application should use this function to determine if the USB suspend conditions are met.

View solution in original post

0 Likes
3 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

You can use the USBFS_CheckActivity().

Thanks,

Hima

0 Likes

Hi hima,

thank you very much for your reply.

But, unfortunately, the function USBFS_CheckActivity() does not exist in my environment because I am using USBUART.

Instead it exists the function USBUART_CheckActivity() but it is not documented inside the datasheet!!!

Why this function is not documented?

However, now I will try to test this function.

Thanks,

Graziano.

0 Likes

USBUART_CheckActivity() function returns the activity status of the bus. It clears the hardware status to provide updated status on the next call of this function. It provides a way to determine whether any USB bus activity occurred. The application should use this function to determine if the USB suspend conditions are met.

0 Likes