cancel
Showing results for 
Search instead for 
Did you mean: 

32F3 USB without HSE

yakabmarci
Senior
Posted on June 22, 2016 at 08:40

How can one use the USB without HSE oscillator?

I have been playing with the STM32F3 discovery board, on the original preloaded firmware there is USB functionality, but the board doesn't have any external oscillator placed.

So USB without HSE seems to work somehow, but I can not figure it out how.

When I reflash my own compiled code (original unmodified demo code from the cube F3 package) the USB doesn't work anymore, the code expects HSE oscillator.

If I manually change the clock to HSI it still doesn't work. (It is likely I missed something here)

Also cube MX doesn't allow USB without HSE.

tl;dr: how to configure usb on stm32f303 without HSE?

#usb-hsi-stm32f303
2 REPLIES 2
troy1818
Senior
Posted on June 27, 2016 at 13:45

Hi,

It depends what you are going to do with your USB port. HSI does not meet the strict requirements USB needs to work correctly.

Having said this, I can almost guarantee that a USB keyboard will work using HSI. I could say the same for a normal CDC connection. But you really should avoid using HSI if you are going to use USB.

You need to change in the configuration to use HSI (or rather remove HSE configuration, since HSI is used by default). Look at the ST examples. You can also use Cube from ST to get files generated with settings for HSI (just select a plane project without USB and see what pops out from the tool in regards to the clock settings).

yakabmarci
Senior
Posted on September 07, 2016 at 10:17

I just found out how USB is working without HSE crystal on the F3 discovery board.

The F3 discovery board doesn't have crystals placed on the F3 side, but it has the option

to use the debuggers 8Mhz clockout (board already configured for this), so instead HSE crystal/resonator it is possible to use HSE external clock (RCC_HSE_BYPASS)

It was cleary documented in the user guide, I should have rtfm lol