![Maxim Integrated MAX31782 Скачать руководство пользователя страница 143](http://html1.mh-extra.com/html/maxim-integrated/max31782/max31782_user-manual_1744481143.webp)
MaximIntegrated 17-8
MAX31782 User’s Guide
Revision 0; 8/11
Once in Debug mode, further breakpoint matches or host issuance of the Debug command are treated as no opera-
tions and do not disturb debug engine operation . Entering debug mode also stops the clocks to all timers, including the
watchdog timer . Temporarily disabling these functions allows debug mode operations without disrupting the relation-
ship between the original user program code and hardware timed functions . No interrupt request can be granted since
the interrupt handler is also halted as a result of IGE = 0 .
17.2.1DebugModeCommands
The debug engine sets the data shift register status bits to 01b (debug-idle) to indicate that it is ready to accept debug
commands from the host .
The host can perform the following operations from debug mode:
• read register map
• read program stack
• read/write register
• read/write data memory
• single step of CPU (trace)
• return to background mode
• unlock password
The only operations directly controlled by the debug engine are single step and return . All other operations are assisted
by debug service routines contained in the utility ROM . These operations require that multiple bytes be transmitted and/
or received by the host, however each operation always begins with host transmission of a command byte . This com-
mand byte is decoded by the debug engine in order to determine the quantity, sequence, and destination for follow-on
bytes received from the host . Even though there is no timing window specified for receiving the complete command and
follow-on data, the debug engine must receive the correct number of bytes for a particular command before execut-
ing that command . If command and follow-on data are transmitted out of byte order or proper sequence, the only way
to resolve this situation is to disable the debug engine by changing the instruction register (IR2:0) and reloading the
Debug instruction . Once the debug engine has received the proper number of command and follow-on bytes for a given
ROM assisted operation, it responds with the following actions:
• Updates the command bits (CMD[3:0]) in the ICDC register to reflect the host request
• Enables the ROM if it is not been enabled
• Forces a jump to ROM address x8010h
• Sets the data shift register status bits to 10b (debug-busy)
The ROM code performs a read to the ICDC register CMD[3:0] bits to determine its course of action . Some commands
can be processed by the ROM without receiving data from the host beyond the initially supplied follow-on bytes, while
others (e .g ., Unlock Password) require additional data from the host . Some commands need only to provide an indica-
tion of completion to the host, while others (e .g ., Read Register Map) need to supply multiple bytes of output data . To
accomplish data flow control between the host and ROM, the status bits should be used by the host to assess when the
ROM is ready for additional data and/or when the ROM is providing valid data output . Internally, the ROM can ascertain
when new data is available or when it may output the next data byte via the TXC flag . The TXC flag is an important
indicator between the debug engine and the utility ROM debug routines . The utility ROM firmware sets the TXC flag to 1
to indicate that valid data has been loaded to the ICDB register . The debug engine clears the TXC flag to 0 to indicate
completion of a data shift cycle, thus allowing the ROM to continue execution of a requested task that is still in progress .
The utility ROM signals that it has completed a requested task by setting the ROM Operation Done (ROD) bit of the SC
register to logic 1 . The ROD bit is reset by the debug engine when it recognizes the done condition .
shows the debug mode commands supported by the MAX31782 . Note that background mode com-
mands are supported inside debug mode, however, the documentation of these commands can be found in the
17.1 Background Mode Operation
section of the document . Encodings not listed in this table are not supported in
debug mode and are treated as no operations .