AnsweredAssumed Answered

k61 internal flash memory programming from code

Question asked by michael augustis on Jun 19, 2013
Latest reply on Jun 24, 2013 by deepakrana

Hi All;

 

I am going absolutely nuts trying to write some parameters back to the internal flash. I just want to store a few words for calibration reasons. I have used the demo code functions from flash_kinetis.c and I have problems. Interrupts are off, code is running from RAM.

 

1. When I try to erase a sector it appears to work as afterwards I look at the memory and it's all FFs...read on

2. I write my logword using the phrase write routines and afterwards it appears that the memory is correct...

3. I reset with the emulator (not reprogram so it's not the emulator erasing anything) and the first longword of the sector is zeroes.

 

The manual is extremely confusing about using FlexRAM, FlexNV, EEPROM, Program Flash, etc. The K61 I am using only has program flash in two banks. I just want to be able to use a few words of it for storage. Not one-time storage however!

 

Thanks for ANY help!

Outcomes