Chapter 36 Nexus Development Interface (NDI)
MPC5602P Microcontroller Reference Manual, Rev. 4
Freescale Semiconductor
903
DBERC0 also controls which bits or fields in DBCR0–4 are reset by assertion of
p_reset_b
when
DBCR0
EDM
=1. Only software-owned bits or fields as shown in Table 36-8 are affected in this case, except
that DBCR0
RST
and DBSR
MRR
are updated by assertion of
p_reset_b
regardless of the value of
DBCR0
EDM
or DBERC0.
36.12 External Debug Support
External debug support is supplied through the e200z0h OnCE controller serial interface which allows
access to internal CPU registers and other system state while the CPU is halted in debug mode. All debug
resources including DBCR0–4, DBSR, IAC1–4, DVC1–2, DAC1–2 are accessible through the serial
OnCE interface in external debug mode. Setting the DBCR0
EDM
bit to ‘1’ through the OnCE interface
enables external debug mode, and unless otherwise permitted by the settings in DBERC0, disables
software updates to the debug registers. When DBCR0
EDM
is set, debug events enabled to set respective
DBSR status bits will also cause the CPU to enter Debug Mode as opposed to generating Debug Interrupts,
unless the specific events are allocated to software via the settings in DBERC0. In Debug Mode, the CPU
is halted at a recoverable boundary, and an external Debug Control Module may control CPU operation
through the On-Chip Emulation logic (OnCE).
NOTE
On the initial setting of DBCR0
EDM
to ‘1’, other bits in DBCR0 will remain
unchanged. After DBCR0
EDM
has been set, all debug register resources
may be subsequently controlled through the OnCE interface. The DBSR
register should be cleared as part of the process of enabling external debug
activity. The CPU should be placed into debug mode via the OCR
DR
control
bit prior to writing EDM to ‘1’. This gives the debugger the opportunity to
cleanly write to the DBCRx registers and the DBSR to clear out any residual
state / control information which could cause unintended operation.
NOTE
It is intended for the CPU to remain in external debug mode
(DBCR0
EDM
=1) in order to single step or perform other debug mode entry/
reentry via the OCR
DR
, by performing go+noexit commands, or by
assertion of the
jd_de_b
signal.
NOTE
DBCR0
EDM
operation will be blocked if OnCE operation is disabled
(
jd_en_once
negated) regardless of whether it is set or cleared. This means
that if DBCR0
EDM
was previously set, and then
jd_en_once
is negated (this
should not occur), entry into debug mode will be blocked, all events are
blocked, and watchpoints are blocked.
Due to clock domain design, the CPU clock (
m_clk
) must be active in order to perform writes to debug
registers other than the OnCE Command register (OCMD), the OnCE Control register (OCR), or the
DBCR0
EDM
bit. Register read data is synchronized back to the
j_tclk
clock domain. The OnCE Control
1
DBSR
MRR
is always updated by
p_reset_b
, regardless of the value of DBCR0
EDM
or DBERC0
IDM