[HELP] STM32H750 USB HS ULPI Support, Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

Re: [HELP] STM32H750 USB HS ULPI Support,

Post by alex31 »

Hello,

Welcome to the high speed usb issues club :-)

I am also having unresolved problem with a custom H743 board trying to use ULPI at HS speed (480 Mb/s) for MSD (USB storage).

For now, I am able to have reliable OTG2 + ULPI + MSD, but ultimately, after host <-> device handshake, speed is reverted to FS, and I can confirm using dd that I am limited to 12Mb/s not 480Mb/s.

When running under debugger, I can see that in

Code: Select all

usb_lld_serve_interrupt
, after enumeration,

Code: Select all

((otgp->DSTS & DSTS_ENUMSPD_MASK) == DSTS_ENUMSPD_HS_480)
evaluate to false, reverting to FS.

I am still investigating to determine if it's a hardware or software issue.

Alexandre
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [HELP] STM32H750 USB HS ULPI Support,

Post by Giovanni »

It could be a SW issue, ULPI has not extensively tested.

Giovanni
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

Re: [HELP] STM32H750 USB HS ULPI Support,

Post by alex31 »

Found a DISCOVERY_746 in a drawer, it uses the same ULPI component as our custom card.
Flash ST Application from F7Cube that does MSD over USB HS, and got the very same symptoms : works at 12Mb/s speed limit.
Will use ST forum tomorrow to seek for help :-)

A.
twarge
Posts: 7
Joined: Wed Dec 20, 2017 4:41 am
Been thanked: 2 times

Re: [HELP] STM32H750 USB HS ULPI Support,

Post by twarge »

I had previously asserted that we had an ULPI interface working on H743, but I have to say that we didn't verify that we got the high speed; it's possible that we also got the standard 12 Mbit/s.
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

Re: [HELP] STM32H750 USB HS ULPI Support,

Post by alex31 »

I had previously asserted that we had an ULPI interface working on H743, but I have to say that we didn't verify that we got the high speed; it's possible that we also got the standard 12 Mbit/s.


Good news for ChibiOS : I have ported USB_MSD example from contrib to the discovery F746 and it works perfectly in USB HS.
So the problem is probably a hardware problem with our H743 design, perhaps due to the use of USBC connector instead of micro usb ?

@twarge, did you use mini/micro usb or usbC on your design ? If at a time you can verify that your H743 design connect at high speed, that would be a good indication for us.

Alexandre
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

Re: [HELP] STM32H750 USB HS ULPI Support,

Post by alex31 »

Hi,
problem solved for my case. It's an issue with recent ULPI PHY that implement LPM. With old families of PHY like microchip 332x that did not implement LPM, handshake works, but with more recent families like microchip 334x, an additional delay is needed in the handshake.
This is explained in ST forum on page 3 of this thread :
st forum on ULPI HS issues
This is also found in an errata section in the microchip 3340 PHY.

additional delay can be inserted using setting XCVRDLY bit in the DCFG register when using that kind of PHY.
I propose a patch which does the job when BOARD_OTG2_ULPI_ACTIVATE_CHIRP_DELAY is defined.

Alexandre
Attachments
ulpiDelayMask.diff.zip
patch over 21.11.4
(924 Bytes) Downloaded 462 times
microchip errata
microchip errata
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [HELP] STM32H750 USB HS ULPI Support,

Post by Giovanni »

Great thanks, moving this topic in "bug reports" so it is not lost.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [HELP] STM32H750 USB HS ULPI Support,

Post by Giovanni »

Hi,

Proposed patch applied to repository.

Giovanni
Post Reply