How to write correctaly on FLASH of K22?

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

How to write correctaly on FLASH of K22?

766件の閲覧回数
alexandrevoigtd
Contributor III

The sdk example on mcuxpresso for k22 explain in how to write data to flash and erase and verify. I tryed to write on flash on the same locations but appear wrong data. Is it necessary to read all the datas to RAM, erase FLASH, change the datas and put again in FLASH writing again? Because don´t work write in flash and write in flash.

2 返答(返信)

600件の閲覧回数
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Alexandre Voigt da Poian

You can check the Reference Manual, in the "Flash Memory Module (FTFA)" you can find a note:

A flash memory location must be in the erased state before
being programmed. Cumulative programming of bits (back-toback
program operations without an intervening erase) within a
flash memory location is not allowed. Re-programming of
existing 0s to 0 is not allowed as this overstresses the device.

It is not necessary to make all the process of the code example, but if you want to program a section, you first need to erase it. as you are trying to program the same section, then this operation is not allowed.

Hope this helps

Best regards

Jorge Alcala

600件の閲覧回数
alexandrevoigtd
Contributor III

Yes, thank you very much. I did what you tell me and worked very well.

0 件の賞賛