Hello all,
I am following the Virtual COM example to communicate with the PC by using the USB port and process the data like a serial port. Until there everything works fine, I can send data and receive with no problems. After that I used a software that sends a data frame every second, it works for a while but after some time, sometimes as soon as 15 seconds sometimes takes 10 minutes, stop working. I have been debugging the code and what I found is USBD_CDC_ACM_DataAvailable always return 0 when it does not work properly, but I could not go beyond that. Has anyone experienced anything similar? Any advice on what to check or possible solutions?
Thanks,
Dear Tsuneo,
Thanks for your answer. I have changed the Receive Buffer size as you adviced me, seems to take more time to hang although eventually it does. The data frames I am sending are fairly small, just 8 bytes. Since the buffer seems to be the problem, is there any way to empty it at some point?
Thanks