CDC_Transmit_FS() is giving me a headache (USB CDC Device mode)
Hello everyone and i hope youre having a great embedded morning.
CDC_Transmit_FS() bricks itself when i check status of the ongoing transmission
is there any mechanism to know when a CDC_Transmit_FS transaction is finished?
When i try to CDC_Transmit_FS before the previous CDC_Transmit_FS is done retval=USBD_BUSY which is to be expected, well after that CDC_Transmit_FS doesnt work anymore always returning USBD_BUSY.
This code bricks the usb peripheral and can only be used again after system reset:
do {
//HAL_Delay(100);
retval=CDC_Transmit_FS(&buffer, receivedbytes);
} while (retval!=USBD_OK);//
retval=CDC_Transmit_FS("finished transmission", sizeof("finished transmission"));//this will return HAL_OK but no transaction will be doneIf i place a dirty delay big enough for the first transaction to be done everything works.
retval=CDC_Transmit_FS(&buffer, receivedbytes);
HAL_Delay(1000);
retval=CDC_Transmit_FS("finished transmission", sizeof("finished transmission"));im using STM32f205ret6
CubeMX Version 6.1.1
