Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 10 months ago.
How do you set the SystemCoreClock
To use an external crystal value there is a warning that the default vault is 25mhz(see below)...so how do you change the SystemCoreClock to run 84mhz when using an external crystal (8mhz)?
external crystal value
The mbed lib is using HSE_VALUE defined in the file stm32f4xx_hal_config.h to calculate SystemCoreClock, which is used for all timings : baudrate or wait() ... This value is the frequency of the external crystal. It is defined to 25MHz at the moment - I have asked to change it to 8MHz default. You can set the variable SystemCoreClock to 84000000 to patch this . If you use the internal oscillator the calculated value is ok