8.9.4. Exit from debug state

Leaving debug state involves:

  1. Restoring ARM7DMT’s internal state.

  2. Branching to the next instruction to be executed.

  3. Synchronising back to MCLK.

After restoring internal state, a branch instruction must be loaded into the pipeline. See The PC During Debug for details on calculating the branch.

Bit 33 of scan chain 1 is used to force ARM7DMT to resynchronize back to MCLK. The penultimate instruction of the debug sequence is scanned in with bit 33 set HIGH. The final instruction of the debug sequence is the branch, and this is scanned in with bit 33 LOW. The core is then clocked to load the branch into the pipeline. Now, the RESTART instruction is selected in the TAP controller.

When the state machine enters the RUN-TEST/IDLE state, the scan chain reverts back to system mode and clock resynchronization to MCLK occurs within ARM7DMT. ARM7DMT then resumes normal operation, fetching instructions from memory. This delay, until the state machine is in the RUN-TEST/IDLE state, allows conditions to be set up in other devices in a multiprocessor system without taking immediate effect. Then, when the RUN‑TEST/IDLE state is entered, all the processors resume operation simultaneously.

Copyright © 1997, 1998 ARM Limited. All rights reserved.DDI 0087E
Non-Confidential