32F417: CDC_Receive_FS() or USBD_CDC_ReceivePacket() - any known bugs?
I am using USB for both MSC (removable drive) and CDC (virtual COM port).
MSC works perfectly.
CDC out has been working perfectly for ~2 years.
CDC in had never really been tested, and ~ 1 byte every 20 is corrupted.
I am running CDC to Teraterm on the PC, and the out mode has been used for debugs.
The in mode gets activated of you press keys on the keyboard.
I have a simple RTOS task which copies in data to output. That is where I see the corruption.
It is entirely fixable by disabling certain RTOS tasks! But the ones which "fix" it don't do anything related to USB. I am thus suspecting there is a critical region which is unprotected and RTOS related task switching messes it up.
These functions should be well known because it is generated by Cube MX. I don't use MX (the code generated tends to work but is bloated junk and often works by luck because the cloated code covers up timing issues) but it was used when this project was being created ~ 3 years ago by someone else.
