[HELP] STM32H750 USB HS ULPI Support,

Report here problems in any of ChibiOS components. This forum is NOT for support.
User avatar
alex31
Posts: 386
Joined: Fri May 25, 2012 10:23 am
Location: toulouse, france
Has thanked: 39 times
Been thanked: 63 times
Contact:

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby alex31 » Wed Apr 03, 2024 1:43 pm

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: 14462
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1078 times
Been thanked: 922 times
Contact:

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby Giovanni » Wed Apr 03, 2024 7:12 pm

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

Giovanni

User avatar
alex31
Posts: 386
Joined: Fri May 25, 2012 10:23 am
Location: toulouse, france
Has thanked: 39 times
Been thanked: 63 times
Contact:

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby alex31 » Wed Apr 03, 2024 11:08 pm

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: 5
Joined: Wed Dec 20, 2017 4:41 am
Been thanked: 2 times

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby twarge » Thu Apr 04, 2024 3:11 am

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: 386
Joined: Fri May 25, 2012 10:23 am
Location: toulouse, france
Has thanked: 39 times
Been thanked: 63 times
Contact:

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby alex31 » Tue Apr 09, 2024 6:54 am

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: 386
Joined: Fri May 25, 2012 10:23 am
Location: toulouse, france
Has thanked: 39 times
Been thanked: 63 times
Contact:

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby alex31 » Wed Apr 10, 2024 6:09 pm

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 23 times
image(3).png
microchip errata

User avatar
Giovanni
Site Admin
Posts: 14462
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1078 times
Been thanked: 922 times
Contact:

Re: [HELP] STM32H750 USB HS ULPI Support,

Postby Giovanni » Wed Apr 10, 2024 7:29 pm

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

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 4 guests