Chapter 36 Nexus Development Interface (NDI)
MPC5602P Microcontroller Reference Manual, Rev. 4
Freescale Semiconductor
883
If MSR
DE
=1 at the time of the execution of the
se_rfi
, a Debug interrupt will occur provided there exists
no higher priority exception which is enabled to cause an interrupt. Debug Save/Restore Register 0 will be
set to the address of the
se_rfi
instruction.
36.10.10 Critical Return Debug Event
A Critical Return debug event (CRET) occurs if Critical Return debug events are enabled
(DBCR0
CRET
=1) and an attempt is made to execute an
se_rfci
instruction. This event can occur and be
recorded in DBSR regardless of the setting of MSR
DE
. When a Critical Return debug event occurs, the
DBSR
CRET
bit is set to ‘1’ to record the debug exception.
If MSR
DE
=0 and DBCR0
EDM
=0 at the time of the execution of the
se_rfci
(i.e. before the MSR is updated
by the
se_rfci
), then DBSR
IDE
is also set to ‘1’ to record the imprecise debug event.
If MSR
DE
=1 at the time of the execution of the
se_rfci
, a Debug interrupt will occur provided there exists
no higher priority exception which is enabled to cause an interrupt. Debug Save/Restore Register 0 will be
set to the address of the
se_rfci
instruction. Note that this debug event should not normally be enabled
unless the Debug APU is also enabled to avoid corruption of CSRR0/1.
36.10.11 External Debug Event
An External debug event (DEVT1, DEVT2) occurs if External debug events are enabled (DBCR0
DEVT1
=1
or DBCR0
DEVT2
=1), and the respective
p_devt1
or
p_devt2
input signal transitions to the asserted state.
This event can occur and be recorded in DBSR regardless of the setting of MSR
DE
. When an External
debug event occurs, DBSR
DEVT{1,2}
is set to ‘1’ to record the debug exception.
36.10.12 Unconditional Debug Event
An Unconditional debug event (UDE) occurs when the Unconditional Debug Event (
p_ude
) input
transitions to the asserted state, and either DBCR0
IDM
=1 or DBCR0
EDM
=1. The Unconditional debug
event is the only debug event which does not have a corresponding enable bit for the event in DBCR0.
This event can occur and be recorded in DBSR regardless of the setting of MSR
DE
. When an
Unconditional debug event occurs, the DBSR
UDE
bit is set to ‘1’ to record the debug exception.
36.11 Debug Registers
This section describes debug-related registers that are software accessible. These registers are intended for
use by special debug tools and debug software, not by general application code.
Access to these registers by software is conditioned by the External Debug Mode control bit (DBCR0
EDM
)
and the settings of debug control register DBERC0, which can be set by the hardware debug port. If
DBCR0
EDM
is set and if the bit in DBERC0 corresponding to the resource is cleared, software is prevented
from modifying debug register values, since the resource is not “owned” by software. Execution of a
mtspr
instruction targeting a debug register or register field not “owned” by software will not cause modifications
to occur. In addition, since the external debugger hardware may be manipulating debug register values, the
state of these registers or register fields not “owned” by software is not guaranteed to be consistent if
accessed (read) by software with a
mfspr
instruction, other than the DBCR0
EDM
bit and the DBERC0