I am using STM32 HAL VCP firmware generated by CubeMX on STM32F4 discovery board. The Virtual COM Port works, I can transmit from the microcontroller to the PC as many messages I want. But in the other direction, from PC to microcontroller I can send only one message. If I try to send a second one, the
static int8_t CDC_Receive_FS (char* Buf, uint32_t *Len) callback won't be called, and on the PC RealTerm hangs. My client program hangs too, when it tries to write in the COM port second time.
On microntroller side I removed all of my code in
CDC_Receive_FS(), it returns currently only
USBD_OK. In the main function there is only a
HAL_Delay() periodically called, I tried to remove this too, but it had no effect.
Any ideas, what could be the problem?