![Maxim Integrated MAX31782 Скачать руководство пользователя страница 142](http://html1.mh-extra.com/html/maxim-integrated/max31782/max31782_user-manual_1744481142.webp)
MaximIntegrated 17-7
MAX31782 User’s Guide
Revision 0; 8/11
When REGE = 1: This register serves as one of the two register breakpoints . The destination module is indicated by
the M[3:0] bits and the register within that module is defined by the R[4:0] bits . A break occurs when the following two
conditions are met:
1) The destination register address for the executed instruction matches with the specified module and index .
2) The bit pattern written to the destination register matches those bits specified for comparison by the ICDD data
register and ICDA mask register . Only those ICDD data bits with their corresponding ICDA mask bits are compared .
When all bits in the ICDA register are cleared, Condition 2 becomes a don’t care .
17.1.2UsingBreakpoints
All breakpoint registers (BP0–BP5) default to the FFFFh state on power-on reset or when the Test-Logic-Reset TAP state
is entered . The breakpoint registers are accessible only with background mode read/write commands issued over the
TAP communication link . The breakpoint registers are not read/write accessible to the CPU .
Setting the debug mode enable (DME) bit in the ICDC register to logic 1 enables all six breakpoint registers for break-
point match comparison . The state of the break-on register enable (REGE) bit in the ICDC register determines whether
the BP4 and BP5 breakpoints should be used as data memory address breakpoints (REGE = 0) or as register break-
points (REGE = 1) .
When using the register matching breakpoints, it is important to realize that Debug mode operations (e .g ., read data
memory, write data memory, etc .) require use of ICDA and ICDD for passing of information between the host and
MAX31782 ROM routines . It is advised that these registers be saved and restored or be reconfigured before returning
to the background mode if register breakpoints are to remain enabled .
When a breakpoint match occurs, the debug engine forces a break and the MAX31782 enters Debug Mode . If a break-
point match occurs on an instruction that activates the PFX register, the break is held off until the prefixed operation
completes . The host can assess whether Debug mode has been entered by monitoring the status bits of the 10-bit
word shifted out of the TDO pin . The status bits change from the Non-debug (00b) state associated with background
mode to the Debug-Idle (01b) state when Debug Mode is entered . Debug mode can also be manually invoked by host
issuance of the ‘Debug’ background command .
17.2DebugMode
There are two ways to enter the Debug Mode from Background Mode:
1) Issuance of the Debug command directly by the host via the TAP communication port, or
2) Breakpoint matching mechanism .
The host can issue the Debug background command to the debug engine . This direct Debug Mode entry is non-
deterministic . The response time varies dependent on system conditions when the command is issued . The break-
point mechanism provides a more controllable response, but requires that the breakpoints be initially configured in
Background mode . No matter the method of entry, the debug engine takes control of the CPU in the same manner .
Debug mode entry is similar to the state machine flow of an interrupt except that the target execution address is x8010h
which resides in the utility ROM instead of the address specified by the IV register that is used for interrupts . On debug
mode entry, the following actions occur:
1) Blocks the next instruction fetch from program memory
2) Pushes the return address onto the stack
3) Sets the contents of IP to x8010h
4) Clears the IGE bit to 0 to disable interrupt handler if it is not already clear .
5) Halts CPU operation
s = special
Bit
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Name
—
—
—
—
—
—
—
R .4
R .3
R .2
R .1
R .0
M .3
M .2
M .1
M .0
Reset
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Access
s
s
s
s
s
s
s
s
s
s
s
s
s
s
s
s