cancel
Showing results for 
Search instead for 
Did you mean: 

nucleo board STM32CubeMX clock configuration nonsense

SCott.1
Associate

Hi,

I'm trying to set up the HSI (16MHz) on a nucleo-f446ze board. The clock configuration GUI is kinda misleading I guess:

  • default PLLMUX configuration is selecting HSE, but HSE oscillator is not present by default on the nucleos
  • selecting HSI on PLLMUX highlight an error that goes like "PLLMUX should have an HSE input"....is this just a warning (wording is "should") ? if not and this is a proper error and is not possible to select HSI why is there a MUX at all?

with that said, what is the correct way (if any) to use the HSI with PLL?

hope someone can shed some light.

cheers

Stef

0693W00000D0s07QAB.png0693W00000D0s0HQAR.png

4 REPLIES 4
TDK
Guru

An HSE crystal is not present, however there is a clock signal coming from the ST-Link chip (at 8 MHz). This is being used in HSE bypass mode.

To use HSI with PLL, select HSI as the PLL Source Mux just as you've done.

The warning is there because you're using USB which requires a very precise clock. The HSI cannot meet the timing requirements of USB, so CubeMX is flagging a warning.

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

Hi @TDK​ thanks for the heads up. So, to test my project where a 8MHz crystal will be there (as well as USB so timing is crucial), I should leave everything as it is now on the nucleo and later disable HSE bypass as I move to real board.

thanks for the help

stef

Pavel A.
Evangelist III

What is interesting in these Nucleos - the default 8 MHz HSE input that STM32 receives from on-board ST-LINK is actually HSI output of the ST-LINK:

0693W00000D0u7FQAR.pngSo it is not obvious how good it is. The other option is HSE of the ST-LINK but then the frequency is 8.33... (25/3) MHz.

> What is interesting in these Nucleos - the default 8 MHz HSE input that STM32 receives from on-board ST-LINK is actually HSI output of the ST-LINK:

On most boards, the ST-Link crystal is 8 MHz. Only on some (possibly newer/faster?) boards is the HSE 25 MHz.

On the board in question, it's an 8 MHz crystal and there's no option to change it within the ST-Link firmware upgrade. Presumably, it is using the actual HSE as the clock output.

0693W00000D0uFFQAZ.png

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