0
\$\begingroup\$

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. enter image description here

and in the clock configuration I set the PLL like this enter image description here

The code generated by CubeMX seems to be correct also.enter image description here 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?

\$\endgroup\$
6
  • \$\begingroup\$ Are you sure it's actually running at 180 MHz? \$\endgroup\$
    – user39382
    Apr 12, 2018 at 0:01
  • \$\begingroup\$ Yes I am pretty sure because I had set the TIM1 when it was clocked at 16MHz to toggle an LED every 1 second and now that it's clock peripheral is at 90MHz (theoretically) it blinks almost 6 times faster (9*16 = 96MHz) so yes I can say that it runs in this frequency. \$\endgroup\$
    – vamoirid
    Apr 12, 2018 at 0:08
  • \$\begingroup\$ Have you looked at the actual code which CubeMX generated to see how the clocks are configured? It may just be ignoring your HSE setting and using HSI instead. \$\endgroup\$
    – brhans
    Apr 12, 2018 at 0:15
  • \$\begingroup\$ No it uses the HSE check the edit. \$\endgroup\$
    – vamoirid
    Apr 12, 2018 at 0:18
  • 1
    \$\begingroup\$ Take a look at the schematic for your Nucleo F446 board. you'll see that U2, the ST-LINK JTAG interface IC appears to have its PA8 pin connected to the STM32F466's OSC-IN pin with a net labelled "MCO". Looks to me as though the ST-LINK is providing that HSE clock. \$\endgroup\$
    – brhans
    Apr 12, 2018 at 0:53

1 Answer 1

1
\$\begingroup\$

On the Nucleo board you can drive the HSE from the STLINK clock (just choose the bypass option in your cubemx.

It is possible in some circumstances that the HSE can be driven by the bypass clock even if the pin is not configured properly.

To check it step through the clock startup routine (using the debugger) and see if the HSE clock has started properly. Then you will not have to guess.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.