cancel
Showing results for 
Search instead for 
Did you mean: 

Oscillator for USB in the STM32F413

Yevpator
Associate III

Hello everybody!

I am going to work with USB on the STM32F413 . The datasheet says:

"The USB OTG full-speed controller requires a dedicated 48 MHz clock, which is generated by a PLL connected to the HSE oscillator"

I would like to ensure if it can work only with HSE or HSI will work too, in spite of what the datasheet says? I thought it could be not a full data, because when I select HSI as source for the PLL Spurce MUX in the CubeMX , it does not show me any error.

Thank you in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Uwe Bonnes
Principal III

USB works with a stable HSE multiplied and divided so you get 48 MHZ as USB clock. Have a look at the reference manual. HSI is far off the needed stability and can not be used.

View solution in original post

4 REPLIES 4
Uwe Bonnes
Principal III

USB works with a stable HSE multiplied and divided so you get 48 MHZ as USB clock. Have a look at the reference manual. HSI is far off the needed stability and can not be used.

Thank you for the help!

Just to make it fully clear, assume I have a way to calibrate HSI, will USB work then ?

I didn't find in the DS USB clock stability requirements, maybe because it is given by USB.ORG and not ST, don't know...

Uwe Bonnes
Principal III

Some STM32 Devices, e.g. STM32L0 and L4 have a USB clock recovery system (CRS) in harware. Maybe you can do something similar. But is it worth teh trouble? USB c;lock stability reqquirements you will find in the USB specs.

Thank you!

I am all for working with HSE with this specific case, I asked the last question in the sake of knowledge and also I was asked to consider getting rid of crystal. I see now that even if i found a solution for HSI inaccuracy over a wide temperature range, still it is required for USB. You helped me - appreciate that!