I think the dBUG monitor that ships on the M5213EVB does basically what you are asking about. The set/show parameters (just baud rate in this case IIRC) are stored in a block of Flash. When they are modified from the command line (set command), the Flash block is copied to a reserved space in RAM, the parameter is modified, the Flash block is erased, and the modified parameters in RAM are programmed into the Flash.
The dBUG source is available here:
http://www.freescale.com/files/netcomm/software/app_software/dbug_rom_monitors/M5213EVB_DBUG_SRC.zip
Start in the set/get functions in dbug\proj\common\setget.c. The Flash drivers that are called are in dbug\src\dev\flash\cfm_flash.c/h
Message Edited by mnorman on 05-02-2006 11:37 AM
Message Edited by airswit on 05-01-200611:40 AM
Good Morning,
Sorry, should have been more specific. What I am looking for is source code that can program internal flash while running application code. I would like to use one of the flash blocks as pseudo EEPROM. For example storing calibration information on a periodic basis.
Thanks,
Mark