cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to keep interrupts active during flash program/erase?

sima2
Associate III
Posted on August 23, 2013 at 15:59

In my application I'm sampling a 50Hz voltage at 300Hz in a timer interrupt.

My application is able to alter a part of the flash memory to save parameters. But during during flash write/erase activity the CPU stalls and my sampling gets interrupted (and my RMS calculations goes wrong).

Is it possible to move my sampling interrupt function to RAM or would it still stall during flash write/erase activity?

2 REPLIES 2
sima2
Associate III
Posted on August 23, 2013 at 16:08

I found this ''ongoing Flash memory operation will not block the CPU as long as the CPU does not access the Flash memory.'' in the programming manual.

So I't looks possible. But i think I must move the vector table to RAM also?

Posted on August 23, 2013 at 23:17

Indeed, you'll need to put everything you need in RAM, including the vector table, const variables and any library functions you may be calling. Anything that touches FLASH during the ERASE/WRITE times will stall the processor, often beyond a peripherals under/over flow condition.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..