2018-04-11 12:30 PM
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.
#usb-cube-host-cdc2018-04-13 08:26 AM
OK now I fixed the problem no. 2. However, the problem no. 1 is still there. In fact, it seems that the problem starts when I get HC_NAK (
HCD_HC_OUT_IRQHandler) continuously. Any ideas?
2018-04-19 07:46 AM
Hello , I am working on the data transmission using usb host cdc too . I ma using stm32f207 nucmleo 144 . i select the host on stm32 cube mx and the class cdc and i write my code on the main but i dont know why it cant send the msg using
USBH_CDC_Transmit. .I think i missed something .
2018-04-26 07:13 AM
The problem no.1 has been fixed. It was related to the connected USB device, not the host.