cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F411E-DISCO - default CubeMX clock settings are wrong

ab.31
Associate

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.

3 REPLIES 3
Ghofrane GSOURI
ST Employee

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

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 Venmo
Up vote any posts that you find helpful, it shows what's working..
Gaston_78
Associate II

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