I'm using FreeRTOS generated with the help of CubeMX. Everything was working fine until I added USB CDC unit. When I used CDC_Transmit_FS() before starting kernel, I could receive data over USB. However, when I paste the same code to thread, this is not working.
There are two defines in the file usbd_cdc_if.c:
#define APP_RX_DATA_SIZE 4 #define APP_TX_DATA_SIZE 4
The value 4 should be changed to 64. After that everything works great.