How can i get the status of connection of usb cable?

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

cross mob
User13451
Level 1
Level 1
I'm using the xmc4800 mcu. and usb vcom.

in usb vcom, i want to know the usb cable is connected or disconnected status.


How can I figure out ?
0 Likes
1 Solution
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted
Hi @mind10,

You can use the API "XMC_USBD_STATUS_t XMC_USBD_DeviceConnect ( void ) " and check for the different return values. You can read about the API in detail here : -> Open DAVE -> Help -> Help Contents -> XMC Library Documentation -> XMC 4.0.0 -> Modules -> USBD. Please follow this and let us know in case of any query.

Best Regards,
Aashita

View solution in original post

0 Likes
1 Reply
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted
Hi @mind10,

You can use the API "XMC_USBD_STATUS_t XMC_USBD_DeviceConnect ( void ) " and check for the different return values. You can read about the API in detail here : -> Open DAVE -> Help -> Help Contents -> XMC Library Documentation -> XMC 4.0.0 -> Modules -> USBD. Please follow this and let us know in case of any query.

Best Regards,
Aashita
0 Likes