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>
This commit is contained in:
parent
7f445e3d39
commit
3587d8e808
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue