09.12.2012 Views

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12.8 Debug state<br />

12.8.1 Entering debug state<br />

Debug event <strong>ARM</strong><br />

Debug<br />

The debug state enables an external agent, usually a debugger, to control the processor following<br />

a debug event. While in debug state, the processor behaves as follows:<br />

• Sets the DSCR[0] core halted bit.<br />

• Asserts the DBGACK signal, see DBGACK on page 12-65.<br />

• Sets the DSCR[5:2] method of entry bits appropriately.<br />

• Flushes the pipeline and does not prefetch any instructions.<br />

• Does not change the execution mode and the CPSR.<br />

• Continues to run the DMA engine. The debugger can stop and restart it using CP15<br />

operations if it has permission.<br />

• Treats exceptions as described in Exceptions in debug state on page 12-61.<br />

• Ignores interrupts.<br />

• Ignores new debug events.<br />

When a debug event occurs while the processor is in Halting debug-mode, it switches to a<br />

special state called debug state so the debugger can take control. You can configure Halting<br />

debug-mode by setting DSCR[14] to 1.<br />

If a halting debug event occurs, the processor enters debug state even when Halting debug-mode<br />

is not configured.<br />

While the processor is in debug state, the PC does not increment on instruction execution. If the<br />

PC is read at any point after the processor has entered debug state, but before an explicit PC<br />

write, it returns a value as described in Table 12-54, depending on the previous state and the type<br />

of debug event.<br />

Table 12-54 shows the read PC value after debug state entry for different debug events. The<br />

<strong>ARM</strong> and the Thumb and ThumbEE columns in this table represent the processor state in which<br />

the exception occurred.<br />

Thumb and<br />

ThumbEE<br />

Table 12-54 Read PC value after debug state entry<br />

Return address (RA) meaning<br />

Breakpoint RA+8 RA+4 Breakpointed instruction address<br />

Watchpoint RA+8 RA+4 Address of the instruction that triggered the watchpoint debug event<br />

BKPT instruction RA+8 RA+4 BKPT instruction address<br />

Vector catch RA+8 RA+4 Vector address<br />

External debug<br />

request signal<br />

activation<br />

RA+8 RA+4 Address of the instruction that the external debug request signal<br />

activation canceled<br />

<strong>ARM</strong> DDI 0344K Copyright © 2006-2010 <strong>ARM</strong> Limited. All rights reserved. 12-56<br />

ID060510 Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!