![](http://datasheet.mmic.net.cn/290000/XPC801ZP25_datasheet_16187868/XPC801ZP25_439.png)
Development Support
18-28
MPC801 USER’S MANUAL
MOTOROLA
18
18.3.2.5 RUNNING IN DEBUG MODE.
When running in debug mode, all fetch cycles
access the development port, regardless of the cycle’s actual address. All load/store cycles
access the real memory system according to the cycle’s address. The data register of the
development port is mapped as a special control register and is accessed using the
mtspr
and
mfspr
instructions, via special load/store cycles.
Exceptions are treated differently in debug mode. When in debug mode, the ICR is updated
when an exception is recognized by the event that caused the exception. A special error
indication (ICR_OR) is asserted for one clock cycle to notify the development port that an
exception has occurred. Execution then continues in debug mode without any change in
SRR0 and SRR1. ICR_OR is asserted before the next fetch occurs so the development
system can detect the excepting instruction. However, not all exceptions are recognizable
in debug mode. Breakpoints and watchpoints are not generated by the hardware when in
debug mode, regardless of the MSR
RI
bit’s value. When entering debug mode, the MSR
EE
bit is cleared by the hardware, thus forcing the hardware to ignore external and decrementer
interrupts.
CAUTION
Setting the MSR
EE
bit while in debug mode is strictly forbidden.
The reason for this restriction is that the external interrupt event is a level signal and
because the core only reports exceptions in debug mode and does not perform exception
processing, the core hardware does not clear the MSR
EE
bit. This event, if enabled, is then
recognized on every clock. When the ICR_OR signal is asserted the development station
must search the ICR to find out what caused the exception. Since the values in SRR0 and
SRR1 do not change if an exception is recognized in debug mode, they only change once
when entering debug mode. However, saving SRR0 and SRR1 when entering debug mode
is unnecessary.
18.3.2.6 EXITING DEBUG MODE.
The
rfi
instruction is used to exit from debug mode and
return to normal processor operation and negate the freeze signal. The development system
may monitor the FRZ signal or status to make sure the MPC801 is out of debug mode. It is
the responsibility of the software to read the ICR before performing the
rfi
instruction. Failure
to do so forces the core to immediately reenter debug mode and reassert the freeze signal
if an asserted bit in the ICR has a corresponding enable bit set in the DER.
18.3.3 The Development Port
The development port provides a full-duplex serial interface for communications between
the internal development support logic and an external development tool. The relationship
of the development support logic to the rest of the core is illustrated in Table 18-5. Notice
that the development port support logic is shown as a separate block for clarity. It will be
implemented as part of the system interface unit module.