12.4.14. Watchpoint Control Registers

The DBGWCR Register characteristics are:

Purpose

Contains the necessary control bits for setting:

  • watchpoints

  • linked watchpoints.

Usage constraints

There are no usage constraints.

Configurations

Available in all processor configurations.

Attributes

Figure 12.11shows the bit assignments.

Figure 12.11. DBGWCR Register bit assignments

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


Table 12.19 shows the bit assignments.

Table 12.19. DBGWCR Register bit assignments

BitsNameFunction

[31:29]

-

Do not modify on writes. On reads, the value returns zero.

[28:24]

Watchpoint address mask

This field watches a range of addresses by masking lower order address bits out of the watchpoint comparison.

b00000 = no mask

b00001 = Reserved

b00010 = Reserved

b00011 = 0x00000007 mask for data address

b00100 = 0x0000000F mask for data address

b00101 = 0x0000001F mask for data address

...

b11111 = 0x7FFFFFFF mask for data address.

Note

  • If DBGWCR[28:24] is not set to b00000, then DBGWCR[12:5] must be set to b11111111. Otherwise the behavior is Unpredictable.

  • If DBGWCR[28:24] is not set to b00000, then the corresponding DBGWVR bits that are not being included in the comparison Should Be Zero. Otherwise the behavior is Unpredictable.

  • To watch for a write to any byte in an 8-byte aligned object of size 8 bytes, ARM recommends that a debugger sets DBGWCR[28:24] to b00111, and DBGWCR[12:5] to b11111111. This is compatible with both ARMv7 debug compliant implementations that have an 8-bit DBGWCR[12:5] and with those that have a 4-bit DBGWCR[8:5] byte address select field.

[23:21]

-

Do not modify on writes. On reads, the value returns zero.

[20]

E

Enable linking bit:

0 = linking disabled

1 = linking enabled.

When this bit is set, this watchpoint is linked with the context ID holding BRP selected by the linked BRP field.

[19:16]

Linked BRP

Linked BRP number. The binary number encoded here indicates a context ID holding BRP to link this WRP with. If this WRP is linked to a BRP that is not configured for linked context ID matching, it is Unpredictable whether a watchpoint debug event is generated.

[15:14]

Secure state access controlRAZ or SBZP.

[13]

-

Appear as zero when read. Do not modify on writes.

[12:5]

Byte address select

The DBGWVR is programmed with word-aligned address. You can use this field to program the watchpoint so it only hits if certain byte addresses are accessed:

b00000000

The watchpoint never hits.

bxxxxxxx1

The watchpoint hits if the byte at address (DBGWVR[31:0] & 0xFFFFFFFC) +0 is accessed.

bxxxxxx1x

The watchpoint hits if the byte at address (DBGWVR[31:0] & 0xFFFFFFFC) +1 is accessed.

bxxxxx1xx

The watchpoint hits if the byte at address (DBGWVR[31:0] & 0xFFFFFFFC) +2 is accessed.

bxxxx1xxx

The watchpoint hits if the byte at address (DBGWVR[31:0] & 0xFFFFFFFC) +3 is accessed.

bxxx1xxxx

The watchpoint hits if the byte at address (DBGWVR[31:0] & 0xFFFFFFF8) +4 is accessed.

bxx1xxxxx

The watchpoint hits if the byte at address (DBGWVR[31:0] & 0xFFFFFFF8) +5 is accessed.

bx1xxxxxx

The watchpoint hits if the byte at address (DBGWVR[31:0] & 0xFFFFFFF8) +6 is accessed.

b1xxxxxxx

The watchpoint hits if the byte at address (DBGWVR[31:0] & 0xFFFFFFF8) +7 is accessed.

[4:3]

L/S

Load/store access. The watchpoint can be conditioned to the type of access:

b00 = Reserved

b01 = load, load exclusive, or swap

b10 = store, store exclusive or swap

b11 = either.

A SWP or SWPB triggers on load, store, or either. A load exclusive instruction triggers on load or either. A store exclusive instruction triggers on store or either, whether it succeeds or not.

[2:1]

S

Privileged access control. The watchpoint can be conditioned to the privilege of the access:

b00 = reserved

b01 = Privileged, match if the processor does a privileged access to memory

b10 = User, match only on non-privileged accesses

b11 = either, match all accesses.

Note

For all cases, the match refers to the privilege of the access, not the mode of the processor.

[0]

W

Watchpoint enable:

0 = Watchpoint disabled. This is the reset value.

1 = Watchpoint enabled.


Copyright © 2010-2011 ARM. All rights reserved.ARM DDI 0460C
Non-ConfidentialID021511