| |||
| Home > Debugging Your System > Entry into debug state > Entry into debug state on breakpoint | |||
The ARM7TDMI-S processor marks instructions as being breakpointed as they enter the instruction pipeline, but the core does not enter debug state until the instruction reaches the Execute stage.
Breakpointed instructions are not executed. Instead, the ARM7TDMI-S core enters debug state. When you examine the internal state, you see the state before the breakpointed instruction. When your examination is complete, remove the breakpoint. Program execution restarts from the previously-breakpointed instruction.
When a breakpointed conditional instruction reaches the Execute stage of the pipeline, the breakpoint is always taken if the system is in halt mode. The ARM7TDMI-S core enters debug state regardless of whether the instruction condition is met.
A breakpointed instruction does not cause the ARM7TDMI-S core to enter debug state when:
A branch or a write to the PC precedes the breakpointed instruction. In this case, when the branch is executed, the ARM7TDMI-S processor flushes the instruction pipeline, so canceling the breakpoint.
An exception occurs, causing the ARM7TDMI-S processor to flush the instruction pipeline, and cancel the breakpoint. In normal circumstances, on exiting from an exception, the ARM7TDMI-S core branches back to the instruction that would have been executed next before the exception occurred. In this case, the pipeline is refilled and the breakpoint is reflagged.