Hi,
I use the Arduino IDE for the Blackpill board. In file "boards.txt" there is no entry for CPU clock frequency. F_CPU is therefore not defined.
How to change this?
Regards Ulrich
F_CPU for STM32F4
Re: F_CPU for STM32F4
It is not directly a parameter that you can modify, within the variant.ccp file of each MCU, the clock configuration parameters are defined.
To estimate F_CPU, they use this formula:
To estimate F_CPU, they use this formula:
Code: Select all
(Input frequency / PLLM) * (PLLN / PLLP)
Re: F_CPU for STM32F4
With STM32 core, F_CPU is defined as systemCoreClock like this it is always up to date.
As it is explained here: https://github.com/stm32duino/wiki/wiki ... ions#f_cpu
As it is explained here: https://github.com/stm32duino/wiki/wiki ... ions#f_cpu