Skip to content

Commit 3587d8e

Browse files
AsensioLdpgeorge
authored andcommitted
stm32/storage: Add support for internal storage on Cortex-M0 MCUs.
This implements self-triggering of the Flash NVIC interrupt on Cortex-M0 devices, which allows enabling internal storage on those MCUs. Signed-off-by: Asensio Lorenzo Sempere <asensio.aerospace@gmail.com>
1 parent 7f445e3 commit 3587d8e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎ports/stm32/storage.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ uint32_t storage_get_block_count(void) {
8383
static void storage_systick_callback(uint32_t ticks_ms) {
8484
if (STORAGE_IDLE_TICK(ticks_ms)) {
8585
// Trigger a FLASH IRQ to execute at a lower priority
86+
#if __CORTEX_M == 0
87+
NVIC_SetPendingIRQ(FLASH_IRQn);
88+
#else
8689
NVIC->STIR = FLASH_IRQn;
90+
#endif
8791
}
8892
}
8993

0 commit comments

Comments
 (0)