STM32H745 USB_OTG intermittently fails to respond to Core reset
I have an application running on an STM32H745 MCU on a custom board. I'm initializing both USB ports (FS and HS) but I'm not using a HS PHY, I'm using both ports as FS.
I have an intermittent issue where either or both ports fail to initialize because the USB_CoreReset() function call times out waiting for GRSTCTL.CRST to clear.
I've seen that there have already been a couple of similar questions posted. In both cases, the issue turned out to be a misconfigured clock.
In this case (https://community.st.com/s/question/0D50X00009yH4Yc/stm32h743-usbotgfs-not-responding-to-core-reset?t=1627568262222) the issue was that the ULPI clock was being enabled when it shouldn't be. I've confirmed that I'm not enabling the ULPI clock.
In this case (https://electronics.stackexchange.com/questions/224174/stm32-usb-host-will-not-return-from-reset-request), the external oscillator was not functioning. I've confirmed that my external oscillator is producing the frequency that I expect.
I've modified both my code and the STM32H7 Eval Board CDC example to make the boot up code as similar as possible, but I don't see the same issue on the Eval Board.
One the one hand, this suggests a hardware issue. On the other hand, this initialization seems pretty strictly confined to the MCU itself. Other than the external oscillator, I'm at a loss as to how the hardware might matter.
Any ideas for things to check are appreciated.
Thanks,
Richard
