Hello !
I would like to implement small nonvolatile storage what utilize 2 sectors ( 2*4KB) of internal flash memory.
I can see SDK example pflash can be used for start.
But what is not so clear if MCU can execute code from one sector, when I erase/write to other one.
Does MCU stall during write/erase operation to flash memory ?
Or may be even better to execute critical code from RAM while erase is ongoing.
Ow what is drawback when internal flash memory erase/write during operation of MCU in RUN mode ?
Regards,
Eugene
Hi Mark !
So K82 have one flash bank 256KB and erase/write of any sector ( 4KB ) cause freezing of all execution from flash memory ?
Or each sector ( 4KB ) is fully independant and if I use empty sectors and track end of write/erase operations by interrupts, it can be completely invisible for MCU timing and etc.
Or what you means FlashBlock in case of K82 ?
Regards,
Eugene
Eugene
Your device has a single block (or bank, or plane) which means that you MUST run all flashing operation in RAM.
Sectors are the smallest chunks of Flash than can be deleted but each operation blocks the compete bank that it is in.
Regards
Mark
Hi Eugene
You need to disable interrupts and run Flash routines in SRAM since a complete Flash block will be inaccessible for executing code from whenever you program a word/phrase or erase a sector.
The Kinetis has no stall mechanism but you can run code in a different Flash block while writing/erasing in another one.
Regards
Mark
http://www.utasker.com/kinetis/FRDM-K82F.html
File system and fail safe parameter system that is compatible with all Kinetis Flash types: http://www.utasker.com/docs/uTasker/uTaskerFileSystem_3.PDF