![NXP Semiconductors SAFE ASSURE Qorivva MPC5601P Reference Manual Download Page 874](http://html.mh-extra.com/html/nxp-semiconductors/safe-assure-qorivva-mpc5601p/safe-assure-qorivva-mpc5601p_reference-manual_1721898874.webp)
Chapter 36 Nexus Development Interface (NDI)
MPC5602P Microcontroller Reference Manual, Rev. 4
874
Freescale Semiconductor
36.9.2
Additional Debug Facilities
In addition to the debug functionality built on Power Architecture technology, e200z0h provides capability
to link instruction and data breakpoints, and also provides a sequential breakpoint control mechanism.
e200z0h also defines two new debug events (CIRPT, CRET) for debugging around critical interrupts.
In addition, e200z0h implements the Debug APU, which when enabled allows Debug Interrupts to utilize
a dedicated set of save/restore registers (DSRR0, DSRR1) for saving state information when a Debug
Interrupt occurs, and for restoring this state information at the end of a debug interrupt handler by means
of the
se_rfdi
instruction.
The e200z0h also provides the capability of sharing resources between hardware and software debuggers.
See
Section 36.9.4, “Sharing Debug Resources by Software/Hardware
36.9.3
Hardware Debug Facilities
The e200z0h core contains facilities that allow for external test and debugging. A modified IEEE 1149.1
control interface is used to communicate with the core resources. This interface is implemented through a
standard 1149.1 TAP (test access port) controller.
By using public instructions, the external debugger can freeze or halt the e200z0h core, read and write
internal state and debug facilities, single-step instructions, and resume normal execution.
Hardware Debug is enabled by setting the External Debug Mode enable bit in Debug Control register 0
(DBCR0
EDM
). Setting DBCR0
EDM
overrides the Internal Debug Mode enable bit DBCR0
IDM
unless
resources are provided back to software via the settings in DBERC0. When the Hardware Debug facility
is enabled, software is blocked from modifying the “hardware-owned” debug facilities. In addition, since
resources are “owned” by the hardware debugger, inconsistent values may be present if software attempts
to read “hardware-owned” debug-related resources.
When hardware debug is enabled by setting DBCR0
EDM
=1, the registers and resources described in
Section 36.11, “Debug Registers
are reserved for use by the external debugger. The same events described
Section 36.10, “Software Debug Events and Exceptions
are also used for external debugging, but
exceptions are not generated to running software. Debug events enabled in the respective DBCR[0-2]
registers are recorded in the DBSR regardless of MSR
DE
, and no debug interrupts are generated unless a
resource is granted back to software via DBERC0 settings. Instead, the CPU will enter debug mode when
an enabled event causes a DBSR bit to become set. DBCR0
EDM
and DBERC0 may only be written
through the OnCE port.
Access to most debug resources (registers) requires that the CPU clock (
m_clk
) be running in order to
perform write accesses from the external hardware debugger.
36.9.4
Sharing Debug Resources by Software/Hardware
Debug resources may be shared by a hardware debugger and software debug based on the settings of debug
control register DBERC0. When DBCR0
EDM
is set, DBERC0 settings determine which debug resources
are allocated to software and which resources remain under exclusive hardware control. Software-owned
resources which set DBSR bits when DBCR0
IDM
=1 will cause a debug interrupt to occur when enabled