USBD-VCOM Problems

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

cross mob
Not applicable
Hello ,
I have problems with the VCOM Interface . We use an XMC4200 Controller and send data all the time to the host PC . It serves well.
If the user cut the USB- cable , the USBD_VCOM_SendData App hang's . In the moment we use the watchdog timer in this case, but that's not a good solution.
The programm details :

if (USBD_VCOM_Connect() == USBD_VCOM_STATUS_SUCCESS)
{
if (USBD_VCOM_IsEnumDone()!= 0)
{
memcpy(send_ram, lcd_ram, 81); // Load contents to send
USBD_VCOM_SendData((const int8_t *)&send_ram[0], 81);
}
}

is there a better way to end the program , if cabel is disconnect while data is send ?

thank you in advance
0 Likes
0 Replies