diff --git a/arch/arm/soc/st_stm32/stm32f1/soc.h b/arch/arm/soc/st_stm32/stm32f1/soc.h index 5ffd2f14f66..e009c2d3b4f 100644 --- a/arch/arm/soc/st_stm32/stm32f1/soc.h +++ b/arch/arm/soc/st_stm32/stm32f1/soc.h @@ -65,7 +65,7 @@ #define IWDG_BASE (APB1PERIPH_BASE + 0x3000) /* FLASH */ -#define FLASH_BASE (AHBPERIPH_BASE + 0x2000) +#define FLASH_R_BASE (AHBPERIPH_BASE + 0x2000) #ifndef _ASMLANGUAGE diff --git a/drivers/clock_control/stm32f10x_clock.c b/drivers/clock_control/stm32f10x_clock.c index 4535de4ad20..8e09bf3ef0e 100644 --- a/drivers/clock_control/stm32f10x_clock.c +++ b/drivers/clock_control/stm32f10x_clock.c @@ -205,7 +205,7 @@ static const struct clock_control_driver_api stm32f10x_clock_control_api = { static inline void __setup_flash(void) { volatile struct stm32f10x_flash *flash = - (struct stm32f10x_flash *)(FLASH_BASE); + (struct stm32f10x_flash *)(FLASH_R_BASE); if (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC <= 24000000) { flash->acr.bit.latency = STM32F10X_FLASH_LATENCY_0;