K82: usage of internal flash memory

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K82: usage of internal flash memory

1,450件の閲覧回数
EugeneHiihtaja
Senior Contributor I

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

0 件の賞賛
返信
3 返答(返信)

1,354件の閲覧回数
EugeneHiihtaja
Senior Contributor I

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

0 件の賞賛
返信

1,354件の閲覧回数
mjbcswitzerland
Specialist V

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

0 件の賞賛
返信

1,354件の閲覧回数
mjbcswitzerland
Specialist V

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

0 件の賞賛
返信