I am using a STM32 and I want to use the flash as storage, but I need the p rocessor to keep running
Writing to flash while execution from flash will take about 20us for 16bit value and when the entire block is close to be filled up an erase of the bl ock takes 20ms20ms halt of code execution is not an option
So, the plan is:
Copy code that needs to run to RAM Move program counter to first RAM address to start RAM execution Write to flash, and keep running in RAM When finished writing to flash, return code execution to flash (that way on ly limited code needs to be copied to RAM). Move program counter to flash
But, I have never written such a program before
Isn?t just a matter of copying the flash contents to RAM byte for b yte? Of course I need to make sure reference to flash functions since then I will be in trouble
So it?s just a couple of lines of code??