Skip to content

Commit 40a553a

Browse files
committed
[CM7] Enable I-Cache and D-Cache
To disable use of I-Cache, define 'I_CACHE_DISABLED' To disable use of D-Cache, define 'D_CACHE_DISABLED' Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 1a56c16 commit 40a553a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: cores/arduino/main.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ void initVariant() { }
3333
// Required by FreeRTOS, see http://www.freertos.org/RTOS-Cortex-M3-M4.html
3434
#ifdef NVIC_PRIORITYGROUP_4
3535
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
36+
#endif
37+
#if (__CORTEX_M == 0x07U)
38+
// Defined in CMSIS core_cm7.h
39+
#ifndef I_CACHE_DISABLED
40+
SCB_EnableICache();
41+
#endif
42+
#ifndef D_CACHE_DISABLED
43+
SCB_EnableDCache();
44+
#endif
3645
#endif
3746

3847
init();

0 commit comments

Comments
 (0)