2018-12-05 07:59 AM
Hello.
I'm experimenting with the Discovery board STM32F411E. The project is generated with CubeMX v5.0.0 + STM32F4-Package v1.23.0 and compiled with TrueStudio.
After some experiments with timers, interrupts, LEDs and so on i tried to toggle an LED in a one-second period. I inserted the necessary values in the timer properties page. After compile and flash the LED toggled, but with a 24 second period instead of the wished 1-second period.
After much google-research, trial and error i tried the HSI clock, instead of the default HSE clock. This finally produced the whished LED toggle period. After some further research i find out the "solution". The CubeMX property page for the RCC-module has as default setting for the HSE clock - "BYPASS clock source". After correcting this to "crystal/ceramic resonator", which i have on the STM32F411E-Discovery board - the combination HSE/PLL began to work and i got the right period of the LED-toggling.
I'm not sure if the default setting "BYPASS..." is better for someone. In my case it was not, but now i know much more about the clock system of the STM32F4 CPU :-).
Best regards
M.B.
2018-12-05 08:35 AM
The STM32F4-DISCO boards have their own 8 MHz crystal, so BYPASS mode is NOT appropriate. Many other DISCO/NUCLEO derive an 8 MHz SOURCE from the processor doing the ST-LINK function, there BYPASS would be appropriate.