ICEBreaker Module
ARM7TDMI Data Sheet
ARM DDI 0029E
9-8
O
Setting the breakpoint
To set the software breakpoint:
1
Read the instruction at the desired address and store it away.
2
Write the special bit pattern representing a software breakpoint at the
address.
Clearing the breakpoint
To clear the software breakpoint, restore the instruction to the address.
9.4
Programming Watchpoints
To make a watchpoint unit cause watchpoints (ie on data accesses):
1
Program its Address Value register with the address of the data access to be
watchpointed.
2
Program the Address Mask register to 0x00000000.
3
Program the Data Value register only if you require a data-dependent
watchpoint; i.e. only if the actual data value read or written must be matched
as well as the address. If the data value is irrelevant, program the Data Mask
register to 0xFFFFFFFF (all bits set to 1) otherwise program it to 0x00000000.
4
Program the Control Value register with
nOPC
= 1,
nRW
= 0 for a read or
nRW
= 1 for a write,
MAS[1:0]
with the value corresponding to the appropriate
data size.
5
Program the Control Mask register with
nOPC
= 0,
nRW
= 0,
MAS[1:0]
= 0,
all other bits to 1. Note that
nRW
or
MAS[1:0]
may be set to 1 if both reads
and writes or data size accesses are to be watchpointed respectively.
6
If you wish to make the distinction between user and non-user mode data
accesses, program the
nTRANS
bit in the Control Value and Control Mask
registers accordingly.
7
If required, program the
EXTERN
,
RANGE
and
CHAIN
bits in the same way.
Note
The above are just examples of how to program the watchpoint register to generate
breakpoints and watchpoints; many other ways of programming the registers are
possible. For instance, simple range breakpoints can be provided by setting one or
more of the address mask bits.