Skip to main content
ab.31
Visitor II
April 28, 2023
Question

STM32F411E-DISCO - default CubeMX clock settings are wrong

  • April 28, 2023
  • 4 replies
  • 1492 views

The default clock settings in CubeMX are:

High Speed Clock (HSE): BYPASS clock source

Low Speed Clock (LSE): Crystal/Ceramic oscillator

This causes the MCU to go into Error_Handler() after going into SystemClock_Config()

How to fix:

Change High Speed Clock (HSE) to Crystal/Ceramic oscillator

Low Speed Clock I think should be disabled.

4 replies

Ghofrane GSOURI
Technical Moderator
May 2, 2023

Hello @Community member​ 

First let me thank you for posting.

I tried to reproduce the issue mentioned above but everything is working just fine .

Please check the screenshot :

Using CubeMX 6.8.1


_legacyfs_online_stmicro_images_0693W00000bjE03QAE.pngAfter generating the code and debugging it , there is no Error_Handler() 


_legacyfs_online_stmicro_images_0693W00000bjE11QAE.png
_legacyfs_online_stmicro_images_0693W00000bjE1LQAU.png
_legacyfs_online_stmicro_images_0693W00000bjE1VQAU.png 

I will be waiting for your feedback .

Thx

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Tesla DeLorean
Guru
May 2, 2023

Most of the DISCO / NUCLEO are BYPASS for HSE because the clock source is being feed via an 8 MHz feed from the ST-LINK/V2-1 or V3 (8.33 MHz) MCO pins.

Very free have the HSE *crystal* populated, and only those which do need OSC_OUT driven.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Gaston_78
Graduate II
June 27, 2024

You are fully right ab.31 !.

STM CUBEMX 6.11 + Board STM32F411E-DISCO  gives WRONG clock Setting by default.

and CORRECT SETTING is:

 

High Speed Clock (HSE)  must be Crystal/Ceramic oscillator

Low Speed Clock  disabled.

Gaston_78_0-1719517122397.png

 

Explorer
March 7, 2026

Thanks, you helped me a lot. Only this configuration works. Remember that you have to disconnect and reconnect the board for it to work.