summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/stm32/storage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/stm32/storage.c b/ports/stm32/storage.c
index fcc6d51b3..a043570f1 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
}
}