cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H750 + USB3300 ULPI deadlock

BRP
Associate II

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.

 

2 REPLIES 2
SofLit
ST Employee

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.

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.
BRP
Associate II

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).