diff options
| author | Asensio Lorenzo Sempere <asensio.aerospace@gmail.com> | 2022-04-18 02:39:09 -0500 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-04-28 11:56:15 +1000 |
| commit | 3587d8e80853051b84da25e8d9abc3422bc6f57f (patch) | |
| tree | 14fff4cda6a91e425f33611329188f7127a44d0a | |
| parent | 7f445e3d39b8aa6944372658c533d8498b7a37d5 (diff) | |
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>
| -rw-r--r-- | ports/stm32/storage.c | 4 |
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 } } |
