Skip to content

Commit 3230807

Browse files
committed
[cortex-m] Invalidate CM7 caches only after enabling them
1 parent 75dab09 commit 3230807

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modm/platform/core/cortex/startup.c.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ void __modm_startup(void)
101101
%#
102102
%% if with_icache
103103
// Enable instruction cache
104-
SCB_InvalidateICache();
105104
SCB_EnableICache();
105+
SCB_InvalidateICache();
106106
%% endif
107107
%% if with_dcache
108108
// Enable data cache with default WBWA policy
109-
SCB_CleanInvalidateDCache();
110109
SCB_EnableDCache();
110+
SCB_CleanInvalidateDCache();
111111
%% endif
112112
%#
113113
%% if core != "cortex-m0"

0 commit comments

Comments
 (0)