From ef163c8d182203d757762392841dc8fea85ccaee Mon Sep 17 00:00:00 2001 From: Frank Voorburg Date: Fri, 28 Apr 2023 19:55:13 +0000 Subject: [PATCH] Refs #1773. Disable ICache before updating flash memory. git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@1048 5dc33758-31d5-4daf-9ae8-b24bf3d40d73 --- Target/Source/ARMCM33_STM32L5/flash.c | 2 ++ 1 file changed, 2 insertions(+) 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 ***/