Skip to main content
Explorer
October 18, 2024
Question

STM32H750 + USB3300 ULPI deadlock

  • October 18, 2024
  • 2 replies
  • 1212 views

Working on an audio device using STM32H750 with USB3300, using TinyUSB stack.

Either it works perfectly, or there is no ULPI communication.

In the latter state, STP, DIR and NXT are all solid high and nothing moves. I can unlock it by pausing the program and manually toggling PC2SO in the SYSCFG register. This is equivalent to electrically disconnecting and reconnecting the DIR line, thus fooling the OTG peripheral into thinking that DIR has gone low. STP and NXT follow suit. I can then resume the program and all works nicely.

So it seems there's a state where the MCU is waiting for DIR to go low, and the PHY is waiting for STP to go low.

I'd find it a bit of a kluge to add the DIR disconnect/reconnect trick to the code, so I was wondering if anyone knows of a common error in the setup procedure that could cause this kind of deadlock.

 

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    October 18, 2024

    Hello @BRP ,

    Just to remind you that there is an errata regarding Pxy_C pins:

    SofLit_0-1729264441409.png

    and OTG_HS_ULPI_DIR alternate function is on PC2_C.

    BRPAuthor
    Explorer
    October 18, 2024

    Thanks! I'm aware of the erratum. In this application those two pins are used as inputs so a current limit is not a problem.

    It's actually fortuitous that the analogue switch is there because it allowed me to to disconnect OTG_HS_ULPI_DIR temporarily to resolve the deadlock situation.

    Should you have any experience as to how this deadlock can arise please let me know. I have now coded up a kluge that detects the deadlock and opens the switch when it arises (happens only once, at startup).