soc: arm: stm32f4: enable ART flash cache accelerator

Enable Instruction cache and Data cache.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
This commit is contained in:
Alexandre Bourdiol 2021-06-15 14:35:35 +02:00 committed by Anas Nashif
commit 5f72884ce5

View file

@ -14,6 +14,7 @@
#include <init.h>
#include <arch/cpu.h>
#include <arch/arm/aarch32/cortex_m/cmsis.h>
#include <stm32_ll_system.h>
/**
* @brief Perform basic hardware initialization at boot.
@ -29,6 +30,10 @@ static int st_stm32f4_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