AN2548 Freescale Semiconductor / Motorola, AN2548 Datasheet - Page 12

no-image

AN2548

Manufacturer Part Number
AN2548
Description
Serial Monitor Program for HCS12 MCUs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2548/D
$E0 — No Error
$E1 — Command
Not Recognized
$E2 — Command
Not Allowed in Run
Mode
$E3 — Stack Pointer
Out of Range
12
Some commands are not allowed while the target MCU is in run mode because
they would interfere with proper execution of the application program (see
$E2 — Command Not Allowed in Run
recommended while the target MCU is in run mode. However, because these
commands in most cases do not interfere with proper execution of the
application program, other than slowing it down, they are allowed to execute
and do not result in an error.
This code is used after cold reset initialization and after any successful
command. It indicates there are no pending errors.
This code indicates the previous command code was not one of the recognized
command codes. If the monitor was in run mode, control returns to the user
application program. If the monitor was not in run mode, control returns to the
top of the command loop to wait for the next command from the host.
This code indicates that the requested command is only legal when the monitor
is halted (active monitor mode). In the case of a command request that is not
legal in run mode, the command is not executed to avoid corrupting the running
user application program. The commands not allowed in run mode are:
This error code indicates that when the monitor program took over control from
a running user program, the stack pointer was not pointing to a valid RAM
location. This is an unrecoverable error because the interrupt that caused the
monitor to gain control wrote to several memory locations below the current
invalid stack pointer location. If the stack pointer was pointing into the on-chip
registers, this could have corrupted important system configuration settings. In
addition, the user PC value may not have been written to a read/write location
so the monitor would not know where to return to the user program. This error
code will also be returned if an interrupt occurs with a non-programmed user
vector ($FFFF).
Freescale Semiconductor, Inc.
For More Information On This Product,
Read_Next and Write_Next — Not allowed because these commands
use the user IX register value as a pointer and this value may change
during run mode.
Write_SP, Write_PC, Write_IY, Write_IX, Write_D, and Write_CCR —
Not allowed in run mode because these registers change much faster
than the host checks their contents. There is no way to predict how these
changes would affect the application program so it would not make
sense to execute these commands while the application program is
running.
Serial Monitor Program for HCS12 MCUs
Go to: www.freescale.com
Mode). Other commands are not
MOTOROLA

Related parts for AN2548