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.

Debug<br />

Table 12-59 Values to write to WCR for a simple watchpoint (continued)<br />

Example 12-8 shows the code for setting a simple aligned watchpoint.<br />

Example 12-8 Setting a simple aligned watchpoint<br />

SetSimpleAlignedWatchpoint(int watch_num, uint32 address, int size)<br />

{<br />

// Step 1. Disable the watchpoint being set.<br />

WriteDebugRegister(112 + watch_num, 0);<br />

// (Step 2. Write address to the WVR, leaving the bottom 3 bits zero.<br />

WriteDebugRegister(96 + watch_num, address & 0xFFFFFF8);<br />

// Step 3. Determine the byte address select value to use.<br />

case (size) of<br />

{<br />

when 1:<br />

byte_address_select := (1'b1

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

Saved successfully!

Ooh no, something went wrong!