2017-02-06 12:07 AM
Hi
I'm using the STM32F401RE Nucleo board, I have noticed that the internal clock HSI has a quite high inaccuracy over temperature and it's not suitable for my application.
I want to use an external clock for the board but I don't know how to properly install and configure the external clock?
And in STM32Cubemx, when selecting SMT32F401RE Nucleo board, in 'Clock Configuration' tab, it's not possible for choosing the HSE clock, only HSI clock available.
Any example on how to use external clock source would be great for me.
Thanks
#external-clock #stm32f401-nucleo #stm32f4 #stm32Solved! Go to Solution.
2017-02-06 01:07 AM
Hi
le.bien
,STM32Cubemx, when selecting SMT32F401RE Nucleo board, in ''
Clock Configuration'' tab, it's not possible for choosing the HSE clock, only HSI clock available.
You have first to enable RCC in Pinout tab :
Please refer to OSC clock paragraph on
for more details about the way to configure the pins corresponding to external high-speed clock (HSE) on Nucleo board.-Nesrine-
Ifmy suggestanswers your question, please mark it as correct.
2017-02-06 01:07 AM
Hi
le.bien
,STM32Cubemx, when selecting SMT32F401RE Nucleo board, in ''
Clock Configuration'' tab, it's not possible for choosing the HSE clock, only HSI clock available.
You have first to enable RCC in Pinout tab :
Please refer to OSC clock paragraph on
for more details about the way to configure the pins corresponding to external high-speed clock (HSE) on Nucleo board.-Nesrine-
Ifmy suggestanswers your question, please mark it as correct.
2017-02-06 04:12 AM
Doesn't the Nucleo have 8 MHz present on the pin from the ST-LINK? Should select HSE BYPASS mode.
2017-02-06 06:37 AM
Turvey.Clive.002
Yes, I found it in the 64bit Nucleo documentation. However another problem is that after mulitplying in PLL, there is a difference between the theoretical PLLCLK and the actual PLLCLK. Namely: PLL-setup: /M=8, *N=336, /P=4 - theoretical value PLLCLK = 84MHz - measured value PLLCLK = 963MHz (using timer interrupt and toggle GPIO pin and measured in Oscilloscope). Is this a known problem or I missed some specific configuration in the software ? Thanks2017-02-06 09:10 AM
>>
Is this a known problem or I missed some specific configuration in the software ?
You've missed something, but it is very hard to see from here.
If you want to measure the internal clocks, from the PLL etc, export them via the MCO (PA8) pin and scope them.
The TIM have a toggle mode, this would be a lot less likely to saturate than an interrupt based method. Also be aware Prescaler and Period are N-1 values.
2017-02-07 12:40 AM
Yes, my problem was the prescaler value. As you said, it should have used N-1 instead of N.
Thanks