Debug Support
e200z3 Power Architecture Core Reference Manual, Rev. 2
9-34
Freescale Semiconductor
5. Clear the DBSR status bits.
6. Write appropriate values to the DBCR0–DBCR3, IAC, DAC, and DBCNT registers.
NOTE
The initial write to DBCR0 only affects the EDM bit, so the remaining
portion of the register must now be initialized, keeping the EDM bit set.
At this point the system is ready to begin debug operations. Depending on the desired operation, different
steps must occur.
1. Optionally set the OCR[DMDIS] control bit to ensure that no TLB misses occur while performing
the debug operations.
2. Optionally ensure that the values entered into the MSR portion of the CPUSCR during the
following steps cause interrupts to be disabled (clearing MSR[EE] and MSR[CE]). This ensures
that external interrupt sources do not cause single-step errors.
To single-step the CPU:
1. The debugger scans in either a new or a previously saved value of the CPUSCR (with appropriate
modification of the PC and IR as described in
Section 9.5.8.2, “Control State Register (CTL)”
)
with a Go+NoExit OnCE command value.
2. The debugger scans out the OSR with no register selected, GO cleared, and determines that the
PCU has re-entered the debug state and that no ERR condition occurred.
To return the CPU to normal operation (without disabling external debug mode):
1. OCR[DMDIS] and OCR[DR] should be cleared, leaving OCR[WKUP] set.
2. The debugger restores the CPUSCR with a previously saved value of the CPUSCR (with
appropriate modification of the PC and IR as described in
Section 9.5.8.2, “Control State Register
), with a Go+Exit OnCE command value.
3. OCR[WKUP] may then be cleared.
To exit external debug mode:
1. The debugger should place the CPU in the debug state through the OCR[DR] with OCR[WKUP]
set, scanning out and saving the CPUSCR.
2. The debugger should write to DBCR0–DBCR3 as needed, likely clearing every enable except
DBCR0[EDM].
3. The debugger should write the DBSR to a cleared state.
4. The debugger should rewrite the DBCR0 with all bits including EDM cleared.
5. The debugger should clear OCR[DR].
6. The debugger restores the CPUSCR with the previously saved value of the CPUSCR (with
appropriate modification of the PC and IR as described in
Section 9.5.8.2, “Control State Register
) with a Go+Exit OnCE command value.
7. OCR[WKUP] may then be cleared.
NOTE
These steps are meant by way of examples rather than as an exact template
for debugger operation.
Содержание e200z3
Страница 1: ...e200z3 Power Architecture Core Reference Manual Supports e200z3 e200z335 e200z3coreRM Rev 2 06 2008 ...
Страница 32: ...e200z3 Power Architecture Core Reference Manual Rev 2 xii Freescale Semiconductor ...
Страница 50: ...Register Model e200z3 Power Architecture Core Reference Manual Rev 2 2 2 Freescale Semiconductor ...
Страница 238: ...Memory Management Unit e200z3 Power Architecture Core Reference Manual Rev 2 5 16 Freescale Semiconductor ...
Страница 332: ...Power Management e200z3 Power Architecture Core Reference Manual Rev 2 8 4 Freescale Semiconductor ...
Страница 424: ...Revision History e200z3 Power Architecture Core Reference Manual Rev 2 A 2 Freescale Semiconductor ...