Skip to main content
Vasileios Amoiridis
Associate II
April 12, 2018
Question

STM32F4 HSE clock frequency without HSE

  • April 12, 2018
  • 6 replies
  • 4592 views
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?
    This topic has been closed for replies.

    6 replies

    henry.dick
    Associate II
    April 12, 2018
    Posted on April 12, 2018 at 02:48

    There is a fail switch to hsi?

    Chris1
    Associate II
    April 12, 2018
    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
    April 12, 2018
    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
    April 12, 2018
    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?

    Khouloud GARSI
    Technical Moderator
    April 12, 2018
    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.

    Vasileios Amoiridis
    Associate II
    April 12, 2018
    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.

    Zephyr S
    Associate II
    March 27, 2019

    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

    Tesla DeLorean
    Guru
    March 27, 2019

    Make sure you are using the HSE in BYPASS mode in the clock settings.

    You have to start the HSE, it will not start oscillating automatically. ie HSE_ON

    If it doesn't oscillate most likely that your circuit characteristics are wrong.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    S.Ma
    Principal
    March 27, 2019

    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.