How can I get an STM32F103C8 running at 72MHz with ArduinoIDE and HAL library? #2023
-
I've posted at StackOverflow and StackExchange, but no one knows better than people from here. The original question is in the link below. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @Frankie6626 But you have to pay attention that by default HSE_VALUE for STM32F1xx serie is 8MHz: So you have to redefine it globally to 16MHz, that's why you do not have the correct freq (half), to do that you can use build_opt.h; with |
Beta Was this translation helpful? Give feedback.
Hi @Frankie6626
You can easily redefine the
SystemClock_Config
at sketch level as stated in the wiki:https://github.com/stm32duino/Arduino_Core_STM32/wiki/Custom-definitions#systemclock_config
But you have to pay attention that by default HSE_VALUE for STM32F1xx serie is 8MHz:
Arduino_Core_STM32/system/STM32F1xx/stm32f1xx_hal_conf_default.h
Line 86 in 052a49a
So you have to redefine it globally to 16MHz, that's why you do not have the correct freq (half), to do that you can use build_opt.h;
https://github.com/stm32duino/Arduino_Core_STM32/wiki/Customize-build-options-using-build_opt.h
with
-DHSE_V…