This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USBD_CDC_ACM_DataAvailable problem STM32F2XX

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,

Parents
  • 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

Reply
  • 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

Children
No data