Hardware Reference
In-Depth Information
flash memory. The terminal program must support XON/XOFF handshaking to properly repro-
gram the HCS12's flash memory.
Typing a lowercase b on the keyboard causes the bootloader to enter the programming
mode and wait 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 reset button on the
demo board will cause the bootloader to return to its prompt.
If a flash memory location does not program properly, an error message is displayed on the
terminal screen and the bootloader's prompt is redisplayed. If the device does not program cor-
rectly 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 ranging from $C0000 to $FFFFF. This address represents the upper 256 kB
of the 1-MB address space of the MC9S12DP256.
S ET -B AUD -R ATE C OMMAND
The default baud rate of 9600 is too slow for programming a large S-record file. The user
has the option to select a higher baud rate in programming the on-chip flash memory. The Set-
Baud-Rate command allows the bootloader communication rate to be set to one of four stan-
dard baud rates.
Typing a lowercase c on the terminal keyboard causes the prompt shown in Figure 3.21 to
be displayed on the monitor screen. Entering 1 through 4 on the keyboard will select the associ-
ated baud rate and issue a secondary prompt indicating that the terminal baud rate should also
be changed. After changing the terminal baud rate, pressing the Enter key will return to the
main bootloader prompt (in Figure 3.20).
1) 9600
2) 38400
3) 57600
4) 115200
? 3
Change Terminal BR, Press Return
Figure 3.21 Change baud rate (both the demo board and terminal program)
R ELOADING D-B UG 12
Freescale adds new features and enhancements to the D-Bug12 monitor frequently. It may
be desirable to update to the latest version. A .zip distribution file containing the current ver-
sion of D-Bug12, including the bootloader and the reference manual, can be downloaded from
Freescale's website.
L OADING U SER P ROGRAMS INTO F LASH M EMORY
A demo board preloaded with the D-Bug12 monitor can also be reprogrammed with the
user application to prototype an embedded application. When using the board in this manner,
 
 
Search WWH ::




Custom Search