diff --git a/ports/stm32/storage.c b/ports/stm32/storage.c index fcc6d51b3d..a043570f1b 100644 --- a/ports/stm32/storage.c +++ b/ports/stm32/storage.c @@ -83,7 +83,11 @@ uint32_t storage_get_block_count(void) { static void storage_systick_callback(uint32_t ticks_ms) { if (STORAGE_IDLE_TICK(ticks_ms)) { // Trigger a FLASH IRQ to execute at a lower priority + #if __CORTEX_M == 0 + NVIC_SetPendingIRQ(FLASH_IRQn); + #else NVIC->STIR = FLASH_IRQn; + #endif } }