AN2153 Freescale Semiconductor / Motorola, AN2153 Datasheet - Page 22

no-image

AN2153

Manufacturer Part Number
AN2153
Description
A Serial Bootloader for Reprogramming the MC9S12DP256 FLASH Memory
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Note
Erase FLASH
Command
Program FLASH
Command
22
NOTE:
Selecting the erase function by typing a lowercase a on the terminal will
cause a bulk erase of all four 64-K FLASH arrays except for the 4-k boot
block in the upper 64-K array where the S-record bootloader resides.
After the erase operation is completed, a verify operation is performed
to ensure that all locations were properly erased. If the erase operation
is successful, the bootloader’s prompt is redisplayed.
If any locations were found to contain a value other than $FF, an error
message is displayed on the screen and the bootloader’s prompt is
redisplayed. If the MC9S12DP256 device will not erase after one or two
attempts, the device may be damaged.
To increase the efficiency of the programming process, the S-record
bootloader uses interrupt driven, buffered serial I/O in conjunction with
XOn/XOff software handshaking to control the S-record data flow from
the host computer. This allows the bootloader to continue receiving
S-record data from the host computer while the data from the previously
received S-record is programmed into the FLASH.
The terminal program must support XOn/XOff handshaking to properly
reprogram the MC9S12DP256’s FLASH memory.
Typing a lowercase b on the terminal causes the bootloader to enter the
programming mode, waiting for S-records to be sent from the host
computer. The bootloader will continue to receive and process S-records
until it receives an S8 or S9 end of file record. If the object file being sent
to the bootloader does not contain an S8 or S9 record, the bootloader
will not return its prompt and will continue to wait for the end of file
record. Pressing the system’s reset switch will cause the bootloader to
return to its prompt.
If a FLASH memory location will not program properly, an error message
is displayed on the terminal screen and the bootloader’s prompt is
redisplayed. If the MC9S12DP256 device will not program after one or
two attempts, the device may be damaged or an S-record with a load
address outside the range of the available on-chip FLASH may have
been received. The S-record data must have load addresses in the
range $C0000–$FFFFF. This address range represents the upper 256
Kbytes of the 1-MB address space of the MC9S12DP256.
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
AN2153

Related parts for AN2153