Skip to content

How can I get an STM32F103C8 running at 72MHz with ArduinoIDE and HAL library? #2023

Closed Answered by fpistm
Frankie6626 asked this question in Q&A
Discussion options

You must be logged in to vote

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:

#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */

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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Frankie6626
Comment options

Answer selected by Frankie6626
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants