This example, attached as an export from CW10.5 for MCU (with DSC option selected at install) (with first published update as of Nov 22, 2013 included), show how data flash can be erased and used to store information, and then later erased.
Processor Expert was used to generate the code.
The drivers are totally visible in the project as source code and may be used as a model for customer code to do similar functions.
The device used in this example is MC56F84789.
To use this example code, save the zip file on your disk.
Unzip the file.
Then use the import function of CodeWarrior 10.5 for MCU's to import the project as an existing project.
It was exported as a file system with complete structure preserved.
Original Attachment has been moved to: 84789DataFlash.zip