cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug USB issues with STM32MP1 in U-Boot and TF-A

fourtrax
Associate

Hi,

I am working on a custom board based on STM32MP157F and I am having some issues with USB and EHCI driver in U-Boot as well as with USB and OTG controller in U-Boot and TF-A.

Once Linux is booted USB with EHCI driver works fine, but in u-boot it doesn't work properly.

When EHCI is enabled in u-boot it will usually detect a connected USB drive at first, but while trying to access it, I randomly get the following timeout messages:

“EHCI timed out on TD - token=0x80008d80�?

It doesn’t seem to be a signal integrity issue though. In Linux it still works without setting any “phy-tuning�? parameter in the device tree. However, when using the OHCI driver in U-Boot it is possible to access the usb drives just fine.

Another issue that might be related to this is that DFU with USB-OTG is not working properly on the device.

The ROM code is able to load the TF-A image via USB-OTG and run it, but after that the USB-OTG connection stops working.

The last message from TF-A is:

“INFO:    DFU USB START…�?

When running “stm32prog usb 0�? manually in U-Boot, the device shows up very briefly as OTG device on the connected computer, but then fails with connection errors. 

Hope someone on here has any idea what could cause this type of behavior or can give me a hint where I should start looking.

Thanks in advance,

Gerrit

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi,

As your have issues with both USBH and OTG_HS, I would more suspect an Hw issue.

Please check: USB related supplies presence/voltages, supplies noise, USB_RREF resistor value, decoupling, HSE 24MHz clock quality (might need external oscillator instead of crystal, see ES0438), power routing, USB signal routing, etc...

See also AN5031.

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
PatrickF
ST Employee

Hi,

As your have issues with both USBH and OTG_HS, I would more suspect an Hw issue.

Please check: USB related supplies presence/voltages, supplies noise, USB_RREF resistor value, decoupling, HSE 24MHz clock quality (might need external oscillator instead of crystal, see ES0438), power routing, USB signal routing, etc...

See also AN5031.

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
HLee.21
Associate III

I'm having the same issue here. TF-A cannot establish an USB connection “INFO:   DFU USB START…�? are the last words.

@fourtrax did you fix it?

The ROM-bootloader is establishing a connection and does load the TF-A, @PatrickF why should it be a hardware issue?

Any ideas?

HLee.21
Associate III

What a bummer, had some missing clocks off, ... sorry for the noise, it's working.