cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743 as USB Host stops communicating

george_wgt
Associate

Hello, I have a problem that I am having a hard time figuring out.

My project is using an STM32H743 as a USB host on a custom PCB. Both OTG_HS and OTG_FS ports are connected to different devices. OTG_HS is using the internal PHY and operating at full-speed. An LTE modem located on the same PCB is connected to the OTG_HS port, and a CP2105 located on a separate PCB is connected to the OTG_FS port via a 10ft cable (D+ and D- wires are twisted and shielded). The CP2105 and host exchange ~1KB of data via bulk transfer every 1 second, while communication with the LTE modem is currently only during manual testing aside from enumeration. I used the USB host drivers generated by STM IDE and modified them to work with each device.

The problem I'm running into occurs with the OTG_FS port. Occasionally, the communication will come to a complete halt. The URB state returns as URB_IDLE after the host tries to transmit data. Looking at the data signals, there is no data being transmitted from the host but the SOF packets are still being sent every 1ms. Resetting the USB core does not fix the issue and will cause continuous enumeration failure after the core is re-initialized. Debugging the enumeration failures, it looks like the host is able to receive the first 8 bytes of the descriptor from the CP2105 in order to set the MaxPacketSize, but when it tries to request the full device descriptor, the request is never sent. Unplugging and re-plugging the CP2105 cable also results in repeated enumeration failure. Only power cycling the MCU seems to fix the issue, and sometimes it requires multiple power cycles. While the OTG_FS port is in this state, the OTG_HS port still works just fine. I've implemented some solutions to try and prevent the problem from occurring such as redesigning the cable as the signal voltage seemed a bit low, as well as making the PCB traces as short as possible. I'm wondering if there's anything I can do on the firmware side to recover without power cycling if the problem continues happening in the future? It can sometimes take weeks before the problem manifests so I'm not confident saying that it's fixed with just the hardware changes.

Any insight would be appreciated, thanks.

0 REPLIES 0