USB OTG_FS (device mode) CDC-ACM: IN endpoint transfer complete interrupt never fires after sometime with STM32F411/STM32F413
I am working on testing libopencm3 based USB OTG FS stack for STM32F411/STM32F413. And OTG FS stack works fine to begin with without any issues. But, after a while it seems to lock-up waiting for transfer complete interrupt to fire on one of the IN endpoints.
The test script running on the PC repeatedly sends messages to the OTG device and device also sends data back. This seems to run fine for a while but eventually gets locked-up.
I have a debugger hooked and on lock-up i observe that the transfer complete interrupt on an IN endpoint never fired, causing to device to hang.
Browsing for similar issue i have come across multiple posts where people have reported similar problems and it looks like TX FIFO access has some limitations.
Can someone please shed more light on how to fix this bug. We have been debugging this for a while and haven't been successful in fixing this. Any inputs would be highly appreciated.
