AN2153 Freescale Semiconductor / Motorola, AN2153 Datasheet - Page 2

no-image

AN2153

Manufacturer Part Number
AN2153
Description
A Serial Bootloader for Reprogramming the MC9S12DP256 FLASH Memory
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Freescale Semiconductor, Inc.
Application Note
Unlike the M68HC11 Family, the MC9S12DP256 does not have a
bootstrap ROM containing firmware to allow initial programming of the
FLASH directly through one of the on-chip serial communications
interface (SCI) ports. Initial on-chip FLASH programming requires either
special test and handling equipment to program the device before it is
placed in the target system or a background debug module (BDM)
programming tool available from Motorola or a third party vendor.
The MC9S12DP256’s four on-chip FLASH arrays contain two variable
size, erase protectable areas as shown in
Figure
1. While the majority
of the bootloader could be contained in any of the protected areas, the
protected high area in the $C000–$FFFF memory range must at least
contain reset and interrupt vectors that point to a jump table. In most
cases, unless a complex or sophisticated communication protocol is
required that will not fit into 16 K, it is easiest to place the entire
bootloader into the protected high area of block zero.
Erasing and programming the on-chip FLASH memory of the
MC9S12DP256 presents some unique challenges. Even though FLASH
block zero has two separate erase protected areas, code cannot be run
out of either protected area while the remainder of the block is erased or
programmed. While it is possible to run code from one FLASH block
while erasing or reprogramming another, adopting such a strategy would
complicate the overall implementation of the bootloader. Consequently,
during the erase and reprogram process, the code must reside in other
on-chip memory or in external memory. In addition, because the reset
and interrupt vectors reside in the erase protected area, they cannot be
changed. This necessitates a secondary reset/interrupt vector table be
placed outside the protected FLASH memory area.
The remainder of this application note explores the requirements of a
serial bootloader and the implementation of the programming algorithm
for the MC9S12DP256’s FLASH.
AN2153
2
MOTOROLA
For More Information On This Product,
Go to: www.freescale.com

Related parts for AN2153