Table of Contents        Previous topic       Next topic       

Programming Flash Memory->Introduction


The debugger can program a range of flash memory chips.  It will automatically attempt to do this if the memory to which it is trying to download a program is found to be read only.

The debugger behaves in the following way:

During the download process it will test to see if the memory being downloaded to is read-only.  It does this by reading a byte of memory and writing back an exclusive Or of the value read.  It then reads the byte again to see if it has changed.  If it hasn't then the memory must be read-only.

If memory is found to be read-only, the debugger uses the chip select settings for the appropriate ColdFire variant to determine the memory attached to the chip.  If the chip selects are configured for read/write, then the debugger considers  that the memory attached to this chip select could be flash memory.  Using the base address determined from the chip select settings, the debugger attempts to read the Manufacturers Id and the Device Id of the memory chip.  It then attempts to match these Id's with a block of information in file USERFLASH.INI.  If it does not find an match it will read file FLASH.INI in an attempt to find a match. If it find a match it determines the supported bus widths, segment sizes and commands supported by the device.  It then marks this block of memory as flash memory.

If program bytes are destined for locations in this memory block, they are saved in the PC's memory.  When the download process is otherwise complete, the appropriate flash segments are erased and the stored bytes are programmed into them.