cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 HSE clock frequency without HSE

Vasileios Amoiridis
Associate II
Posted on April 12, 2018 at 02:23

I am using an STM32F446ZE Nucleo Board which does NOT have an external HSE clock. From CubeMX I set the clock input from the HSE and after in the clock configuration I set the system clock to 180MHz.

https://i.stack.imgur.com/JyaEk.png

and in the clock configuration I set the PLL like this

https://i.stack.imgur.com/bxOm4.png

The code generated by CubeMX seems to be correct also.

https://i.stack.imgur.com/zyetq.png

My point is that even if I don't have an HSE in the board the uController works in 180MHz. How is this possible? What is the clock input after all?
10 REPLIES 10
henry.dick
Senior II
Posted on April 12, 2018 at 02:48

There is a fail switch to hsi?

Chris1
Senior III
Posted on April 12, 2018 at 03:27

Clock is probably provided by the ST-LINK:

There are four ways to configure the pins corresponding to the external high-speed clock (HSE):

•

MCO from ST-LINK (Default):

MCO output of ST-LINK is used as input clock. This

frequency cannot be changed, it is fixed at 8MHz and connected to the

PF0/PH0-OSC_IN of STM32 microcontroller. The configuration must be:

–

SB148 OFF

–

SB112 and SB149 ON

–

SB8 and SB9 OFF

•

HSE on-board oscillator from X3 crystal (not provided):

.

.

.

Tilen MAJERLE
ST Employee
Posted on April 12, 2018 at 07:07

Hello,

On nucleo board, STM32F103 from ST-Link outputs 8MHz frequency, connected to HSE_IN pin on STM32F446. If you wish to use HSE in this mode, select Bypass clock source mode in HSE configuration in CubeMX.

Best regards,

Tilen

Vasileios Amoiridis
Associate II
Posted on April 12, 2018 at 14:10

So when I select the HSE pin configured with ceramic the software is able to change it to HSI?

Posted on April 12, 2018 at 16:39

Hi

vassilisamir

‌,

When the clock security system is activated, the HSI signal can be used as a backup source (Auxiliary clock) if the HSE crystal oscillator fails. Please refer to section Clock security system (CSS) in the

http://www.st.com/content/ccc/resource/technical/document/reference_manual/4d/ed/bc/89/b5/70/40/dc/DM00135pdf/files/DM00135pdf/jcr:content/translations/en.DM00135pdf

for more details.

Khouloud.

Posted on April 12, 2018 at 17:01

Of course, I am aware of this feature but I left it deactivated on purpose in order to see if the clock is going to change in the HSI value and it really did it. But it not only changed it, it also set it to 180MHz.

Posted on April 24, 2018 at 16:42

Hi

vassilisamir

‌,

The boards marked MB1136 C-02 (or higher) corresponds to a board, configured to use ST-LINK MCO as clock input.

This frequency is fixed at 8 MHz and connected to PF0/PD0/PH0-OSC_IN of the STM32 microcontroller.

0690X0000060AlpQAE.png

Khouloud.

Zephyr S
Associate II

Hey,

I'm using the NUCLEO64 F446RE and I disabled the MCO signal by desoldering SBs and cut both part of the board. I only want to keep the STM32F4 part.

Then I soldered a 8MHz osc on X3 (and added the corresponding capacitors and resistors), but it doesn't oscillate... Are, the OSC_IN and OSC_OUT pins enabled by default ?

If anyone can help me, i would really appreciate that.

Thank you,

Zephyr

S.Ma
Principal

If you can go in debug mode, then run the code, stop (breakpoint) and look at the HW registers settings (PLL, RCC, etc...) to understand in which configuration you really are.

You could also use the debug watch register window to activate MCO pin manually and look at internal clocks + scope probing.