23-30
MPC561/MPC563 Reference Manual
MOTOROLA
Development System Interface
Since exceptions are treated differently when in debug mode (refer to
Section 23.3.1.5,register (SRR0) and machine status save/restore one register (SRR1).
23.3.1.5 Running in Debug Mode
When running in debug mode all fetch cycles access the development port regardless of the
actual address of the cycle. 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 therefore it is accessed using mtspr and mfspr instructions via special
Exceptions are treated differently when running in debug mode. When already in debug
mode, upon recognition of an exception, the exception cause register (ECR) is updated
according to the event that caused the exception, a special error indication (ecr_or) is
asserted for one clock cycle to report to the development port that an exception occurred
and execution continues in debug mode without any change in SRR0 and SRR1. ECR_OR
is asserted before the next fetch occurs to allow the development system to detect the
excepting instruction.
Not all exceptions are recognized when in debug mode. Breakpoints and watchpoints are
not generated by the hardware when in debug mode (regardless of the value of MSR[RI]).
Upon entering debug mode MSR[EE] is cleared by the hardware thus forcing the hardware
to ignore external and decrementer interrupts.
WARNING
Setting the MSR[EE] bit while in debug mode, (by the debug
software), is strictly forbidden. The reason for this restriction is
that the external interrupt event is a level signal, and since the
CPU only reports exceptions while in debug mode but do not
treat them, the CPU does not clear the MSR[EE] bit and,
therefore, this event, if enabled, is recognized again every
clock cycle.
When the ecr_or signal is asserted the development station should investigate the exception
cause register (ECR) in order to find out the event that caused the exception.
Since the values in SRR0 and SRR1 do not change if an exception is recognized while
already in debug mode, they only change once when entering debug mode, saving them
when entering debug mode is not necessary.
23.3.1.6 Exiting Debug Mode
The rfi instruction is used to exit from debug mode in order to return to the normal
processor operation and to negate the freeze indication. The development system may