AN2548 Freescale Semiconductor / Motorola, AN2548 Datasheet - Page 9

no-image

AN2548

Manufacturer Part Number
AN2548
Description
Serial Monitor Program for HCS12 MCUs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
$AE — Write_D
$AF — Write_CCR
$B1 — Go
$B2 — Trace1
$B3 — Halt
MOTOROLA
AE/D
in the user register stack frame. This command is not allowed when the user
program is running.
AF/CCR
in the user register stack frame. This command is not allowed when the user
program is running.
B1
register stack frame into the actual CPU registers. Processing resumes in the
user program at the location specified by the user program counter that was in
the user register stack frame. To go to an arbitrary address in the user program,
you can first use a Write_PC command to set the user program counter to a
new location. In this mode, the user application program will execute until it is
interrupted by a breakpoint, an SCI0 interrupt, or a HALT command. In the case
of a breakpoint or HALT command, the monitor will clear the run mode flag to
indicate to the monitor that it should remain active and waiting for further
commands from the host. In most cases of an SCI0 interrupt, the run flag is set
(or remains set) to indicate that the monitor should return to the user application
program after completing the current command. The exception is the case of
the SCI0 interrupt due to the HALT command. In this special case, the run flag
gets cleared.
B2
CPU breakpoint immediately after executing a single instruction in the user
program. It then executes an RTI to copy user CPU register values from the
user register stack frame into the actual CPU registers. Processing resumes in
the user program at the location specified by the user program counter that is
in the user register stack frame. After executing a single user instruction, an
SWI is forced, which causes control to return to the monitor program. In
response to the SWI, the monitor clears the run flag (or leaves it cleared) to
indicate that the monitor should remain active and waiting for additional
commands from the host.
B3 — This command is used to force the user application program to stop
executing and the monitor to gain control and remain active and waiting for
additional commands from the host. This command requires an enabled SCI0
interrupt, so it can only be recognized if the user application program has
cleared the I bit in the CCR (executed the CLI instruction). If the user program
temporarily blocks interrupts, such as during execution of another interrupt
service routine, the HALT command will not be recognized until the user
application program re-enables interrupts (typically by executing the RTI at the
end of an interrupt service routine).
Freescale Semiconductor, Inc.
For More Information On This Product,
The monitor executes an RTI to copy user CPU register values from user
The monitor sets up the on-chip breakpoint or debug module to force a
Serial Monitor Program for HCS12 MCUs
Writes the specified 16-bit data to accumulator A and accumulator B
Writes the specified 8-bit data to the condition codes register (CCR)
Go to: www.freescale.com
Monitor Commands
AN2548/D
9

Related parts for AN2548