We are using STM32F072C8 device and we are using USB CDC Interface when communicating with PC.
When USB bus traffic is low everything is working fine.
But when USB bus traffic is heavy we observed during USB CDC Write the Tx state showing always busy.
Not get recovering from here due to USB Write is Blocking and our application gets hanging.
We are using the USB CDC drivers generated by STM32CUBE app.
uint8_t CDC_Transmit_FS(uint8_t *buf,uint8_t Length)
uint8_t result = USBD_OK;
unsigned int l_len;
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef*)hUsbDevice_0->pClassData;
// if USB is busy then return
if(hcdc->TxState != 0)
return USBD_BUSY;//It is hanging here.
Please can you suggest what to we check and what to do..