diff --git a/targets/TARGET_STM/mbed_overrides.c b/targets/TARGET_STM/mbed_overrides.c index 688f34ebe8..ff1bb1b8c6 100644 --- a/targets/TARGET_STM/mbed_overrides.c +++ b/targets/TARGET_STM/mbed_overrides.c @@ -35,15 +35,11 @@ extern void SetSysClock(void); #if MBED_CONF_TARGET_LSE_AVAILABLE // set defaults for LSE drive load level, with exception for F4_g2 MCU -#ifdef RCC_LSE_HIGHDRIVE_MODE -# if MBED_CONF_TARGET_LSE_DRIVE_LOAD_LEVEL -# define LSE_DRIVE_LOAD_LEVEL MBED_CONF_TARGET_LSE_DRIVE_LOAD_LEVEL -# else -# define LSE_DRIVE_LOAD_LEVEL RCC_LSE_HIGHDRIVE_MODE -# endif +#if MBED_CONF_TARGET_LSE_DRIVE_LOAD_LEVEL +# define LSE_DRIVE_LOAD_LEVEL MBED_CONF_TARGET_LSE_DRIVE_LOAD_LEVEL #else -# if MBED_CONF_TARGET_LSE_DRIVE_LOAD_LEVEL -# define LSE_DRIVE_LOAD_LEVEL MBED_CONF_TARGET_LSE_DRIVE_LOAD_LEVEL +# ifdef RCC_LSE_HIGHDRIVE_MODE +# define LSE_DRIVE_LOAD_LEVEL RCC_LSE_HIGHDRIVE_MODE # else # define LSE_DRIVE_LOAD_LEVEL RCC_LSEDRIVE_MEDIUMHIGH # endif