Skip to content
Discussion options

You must be logged in to vote

For a Nucleo board where the 8 MHz clock is coming from the ST-LINK MCO into OSC_IN, RCC_HSE_BYPASS is the correct configuration. That signal is an external clock source, not a crystal/resonator connected across OSC_IN/OSC_OUT.

So the clock setup should use:

RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;

and HSE_VALUE should match the actual 8 MHz input. Running it as normal RCC_HSE_ON makes the MCU try to drive/use the HSE oscillator circuit as if a crystal were attached, so the half-speed behavior is a symptom of an invalid clock-source mode rather than a valid alternate setting.

Also check the Nucleo solder bridge/user manual sta…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@fpistm
Comment options

@srontje
Comment options

Answer selected by srontje
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants