diff --git a/Target/Source/ARMCM33_STM32L5/flash.c b/Target/Source/ARMCM33_STM32L5/flash.c index acbdfc29..b2d21c0d 100644 --- a/Target/Source/ARMCM33_STM32L5/flash.c +++ b/Target/Source/ARMCM33_STM32L5/flash.c @@ -237,6 +237,8 @@ void FlashInit(void) /* init the flash block info structs by setting the address to an invalid address */ blockInfo.base_addr = FLASH_INVALID_ADDRESS; bootBlockInfo.base_addr = FLASH_INVALID_ADDRESS; + /* make sure the instruction cache is disabled prior to updating cacheable memory. */ + HAL_ICACHE_Disable(); } /*** end of FlashInit ***/