cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7S78-DK USB hangs in init

mtc65536
Associate II

Hello, I am trying to utilize the USB peripheral in STM32cubeIDE with the STM32H7S78-DK. It hangs forever in MX_USB_INIT on a function USB CORE RESET. With FS and HS this same issue seems to be happening. Pictures show config in the GUI and the aforementioned function.

9 REPLIES 9
AScha.3
Super User

Hi,

So you have device USB enabled,

For... What kind of device?

I don't see any...

What you want?

 

If you feel a post has answered your question, please click "Accept as Solution".

Hello,
I wish to use it as communication device class, or human interface device class. At the moment I have been configuring it as communication device class in the GUI.

So you set CDC/VCP in Cube?

Int for USB enabled in NVIC settings?

Then it should work, out of the box.

But I don't yet try it on H7S7, only H743, H7A3...

So no guarantees....

If you feel a post has answered your question, please click "Accept as Solution".

Yes sir I set CDC/VCP and interrupts are enabled but it never escapes the INIT function. Thank you for your input so far!!

Ok, so check: is power enabled for the USB?

I remember a error in Cube, it didn't enable the power for the USB module.

Some HAL_PWR_ex_enable or so.

And clock for USB is 48M in clock tree?

If you feel a post has answered your question, please click "Accept as Solution".

The clock is set to 48 MHz, today for some reason its hanging in HAL_init now after an error handler call due to a failed USB function, HAL_PWREx_EnableUSBVoltageDetector().

Did you check on your board, the USB is powered? Maybe setting of jumpers or a pin set to power the USB port, see the circuit of your board, is on STM page for your board under CAD tab.

If you feel a post has answered your question, please click "Accept as Solution".
Jorge Alves
Associate III

Hello @mtc65536 

I have the same problem, the application hangs at USB CORE RESET,  and I don't understand why. Did you solve the problem?