| |||
| Home > Debug in Depth > The watchpoint registers > Using the mask registers | |||
For each value register in a register pair, there is a mask register of the same format. Setting a bit to 1 in the mask register has the effect of making the corresponding bit in the value register disregarded in the comparison.
For example, when a watchpoint is required on a particular
memory location, but the data value is irrelevant, the data mask
register can be programmed to 0xFFFFFFFF, all
bits set to 1, to ignore the entire data bus field.
The mask is an XNOR mask rather than a conventional AND mask. When a mask bit is set to 1, the comparator for that bit position always matches, irrespective of the value register or the input value.
Setting the mask bit to 0 means that the comparator matches only if the input value matches the value programmed into the value register.