AnsweredAssumed Answered

Transmission not working with USB HOST CDC using the STM USB stack, STM32CubeMX, the dev board B-L475E-IOT01A (STM32L475 Discovery Kit)

Question asked by Jean-Sebastien Castonguay on Apr 11, 2018
Latest reply on Apr 26, 2018 by Jean-Sebastien Castonguay

I installed the USB HOST CDC on B-L475E-IOT01A, used the STM USB stack and I followed the UM1720 User manual STM32Cube USB host library. When I connect a USB CDC device, everything goes well for the enumeration and configuration. Then, two observations:

 

1- If I only transmit a packet (USBH_CDC_Transmit) each two seconds, the data is transmitted but after around 10 packets, transmission stop and the stack tries to send again the same packet continuously (since URB_Status == USBH_URB_NOTREADY in CDC_ProcessTransmission()) without any success.

 

2- If I transmit a packet to a CDC device each two seconds and that device returns another packet right away (gotten with USBH_CDC_Receive() on the host side), transmission works only one time, but after the first transmission/reception, no other data is transmitted even if USB_WritePacket() is called. No Tx interrupt. Curiously, if I put a breakpoint at USB_WritePacket() function call in USB_HC_StartXfer(), everything starts working, transmission and reception.

 

Is anybody have an idea what can I do to find the problem?

 

Thanks,

 

JS

 

By the way, English is not my natural language.

Outcomes