soc: arm: stm32f2: enable ART flash cache accelerator

This commit enables Instruction cache and Data cache.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
This commit is contained in:
Krishna Mohan Dani 2021-06-16 12:58:30 +05:30 committed by Carles Cufí
commit 5d8a9206b8

View file

@ -15,6 +15,7 @@
#include <soc.h>
#include <arch/cpu.h>
#include <arch/arm/aarch32/cortex_m/cmsis.h>
#include <stm32_ll_system.h>
#include <linker/linker-defs.h>
#include <string.h>
@ -32,6 +33,10 @@ static int stm32f2_init(const struct device *arg)
ARG_UNUSED(arg);
/* Enable ART Flash cache accelerator for both Instruction and Data */
LL_FLASH_EnableInstCache();
LL_FLASH_EnableDataCache();
key = irq_lock();
/* Install default handler that simply resets the CPU