I want to write the internal flash 32-bits at a time as I was able to do with FTFL.
The FTFE apparently writes 64-bits at a time (instructions are 32-bits right?) so I'm writing the lower 32-bits with the upper set to 0xFFFFFFFF.
I then follow it up with another write where the lower 32-bits is the same and the upper 32-bits has new data.
Strange things happen when I do this and MGSTAT0 gets set. Any ideas?
Michael
The K64F uses phrase programming (64 bit word) and it is not possible to program long words.
If you write to a single phrase twice, without erasing the sector that it is in, it can cause a serious flash error (the flash line may become unreadable without erasing it again) and therefore you must avoid writing like this.
As the data sheet specifies, mutliple writes are illegal, so there is no option but to modify the usage of the memory accordingly.
Regards
Mark
Kinetis: http://www.utasker.com/kinetis.html
K64: http://www.utasker.com/kinetis/FRDM-K64F.html / http://www.utasker.com/kinetis/TWR-K64F120M.html / http://www.utasker.com/kinetis/TWR-K65F180M.html
For the complete "out-of-the-box" Kinetis experience and faster time to market