We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b047f4e + 912998e commit 7fc354aCopy full SHA for 7fc354a
ports/mimxrt10xx/boards.c
@@ -226,6 +226,19 @@ void board_app_jump(void) {
226
227
// TODO protect bootloader region
228
229
+ // Clean and disable caches before jumping to app
230
+ // This is needed when running at full speed (996MHz) - without it
231
+ // stale cache data can cause a crash on startup
232
+#if defined(__DCACHE_PRESENT) && __DCACHE_PRESENT
233
+ SCB_CleanDCache();
234
+ SCB_DisableDCache();
235
+#endif
236
+#if defined(__ICACHE_PRESENT) && __ICACHE_PRESENT
237
+ SCB_DisableICache();
238
239
+ __DSB();
240
+ __ISB();
241
+
242
/* switch exception handlers to the application */
243
SCB->VTOR = (uint32_t)BOARD_FLASH_APP_START;
244
0 commit comments