soc: stm32g4: Enable ART acceleration

Enable instruction and data cache as well as prefetch.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This commit is contained in:
Erwan Gouriou 2024-05-27 16:54:30 +02:00 committed by Anas Nashif
parent 76d8be4fe6
commit a9fb2c4dff

View File

@ -30,6 +30,11 @@
*/
static int stm32g4_init(void)
{
/* Enable ART Accelerator I/D-cache and prefetch */
LL_FLASH_EnableInstCache();
LL_FLASH_EnableDataCache();
LL_FLASH_EnablePrefetch();
/* Update CMSIS SystemCoreClock variable (HCLK) */
/* At reset, system core clock is set to 16 MHz from HSI */
SystemCoreClock = 16000000;