diff --git a/cores/arduino/stm32/stm32_def.h b/cores/arduino/stm32/stm32_def.h index f922d383cf..d0352ce727 100644 --- a/cores/arduino/stm32/stm32_def.h +++ b/cores/arduino/stm32/stm32_def.h @@ -20,7 +20,6 @@ |(STM32_CORE_VERSION_PATCH << 8U )\ |(STM32_CORE_VERSION_EXTRA)) -#define F_CPU SystemCoreClock #define USE_HAL_DRIVER #ifdef STM32F0xx @@ -53,6 +52,10 @@ #error "STM32YYxx chip series is not defined in boards.txt." #endif +#ifndef F_CPU +#define F_CPU SystemCoreClock +#endif + // Here define some compatibility #ifndef CAN1 #define CAN1 CAN