Hi we use the MC56F8367 DSC in our system, and recently have set about using the data flash to retain user-supplied settings. By using the Codewarrior memory viewer I can see the data in the data flash (address 0x4000) and I have a checksum routine and a validation routine (which reads the flash and compares with the buffer which supplied the data) and both report ok.
At start-up after a power-down the flash data should be restored to the buffer, but this fails. To see the memory requires Codewarrior, and a re-program of the chip which I think resets the flash (at least, when I look at the flash data its back to all 0xFFFF. My Codewarrior settings for the flash are shown below, along with the code to write to flash.
Thanks in advance!
volatile long waste;
unsigned long blocksize;
unsigned long addrf;
//reset cpured led now that reconfiguration has happened
//put data into Factory Data Area
F.cksbuff = csum;
//configured, so write it to flash
for(try=0; try<2; try++)
rv=IFsh1_SetGlobalProtection(false); //unprotect all
for(waste=0; waste<2000000; waste++) ;//do nothing
for(waste=0; waste<5000000; waste++) ;//do nothing
LogErr(0,603,0,0); //info- Write to flash