AN2548 Freescale Semiconductor / Motorola, AN2548 Datasheet - Page 21

no-image

AN2548

Manufacturer Part Number
AN2548
Description
Serial Monitor Program for HCS12 MCUs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Setting the
longBreak Constant
FLASH/EEPROM
System Clock Speed
Monitor Run/Load
Switch
MOTOROLA
The monitor sends a break to the host PC to get its attention when the target
system is powered up. Since some Windows terminal programs
(HyperTerminal) need a long period of break to be detected, this monitor sends
a break that is about 30 bit-times at the selected baud rate. This time delay is
not critical but should be at least 30 bit-times.
The monitor generates this break delay time by executing a software loop that
is five bus cycles long. The number of times this loop is executed is set by the
value in longBreak. One bit-time is equal to 16 times the baud rate constant. To
get the number of loops to execute for 32 bit-times, you would take the (baud
rate constant) × 16 × 32 ÷ 5. Compute the value for longBreak to get a 30 to 32
bit-time break.
For a 24-MHz based system, longBreak is set to 1500. If the user application
modifies the system speed from 24 MHz, longBreak should be adjusted to
compensate.
The FLASH memory system uses an internal state machine to execute
programming and erase commands. The timing of these commands is
determined by the speed of a clock in the FLASH module and this clock must
be between 150 kHz and 200 kHz for proper operation. The FLASH clock
speed is set to 200 kHz by the monitor based on the OscFreq setting in the
S12SerMonxrx.def file.
You may wish to change the port pins for the switch that forces monitor versus
user mode and for the SCI RxD pin. These changes can be made by modifying
the equate directives at the beginning of the monitor program.
Freescale Semiconductor, Inc.
For More Information On This Product,
Serial Monitor Program for HCS12 MCUs
Go to: www.freescale.com
Software Detail
AN2548/D
21

Related parts for AN2548