beautypg.com

Table 12-2 . debug mode commands -8, Maxq610 user’s guide, Table 12-2. debug mode commands – Maxim Integrated MAXQ610 User Manual

Page 159

background image

12-8

MAXQ610 User’s Guide

reloading the debug instruction . Once the debug engine has received the proper number of command and follow-on
bytes for a given utility ROM assisted operation, it responds with the following actions:
• Update the command bits (CMD[3:0]) in the ICDC register to reflect the host request
• Enable the utility ROM if it is not enabled
• Force a jump to utility ROM address 8010h
• Set the data shift register status bits to 10b (debug-busy)
The utility 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 utility 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 indication of completion to the host, while others (read register map) need to supply multiple bytes
of output data . In order to accomplish data flow control between the host and utility ROM, the status bits should be
used by the host to assess when the utility ROM is ready for additional data and/or when the utility ROM is providing
valid data output . Internally, the utility ROM can ascertain when new data is available or when it may output the next
data byte through 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 utility
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 utility ROM operation done (ROD) bit of the SC register to 1 . The ROD bit is reset by the
debug engine when it recognizes the done condition .
The debug mode commands supported by the MAXQ610 microcontroller are shown in Table 12-2 . Note that back-
ground mode commands are supported inside debug mode, however, the documentation of these commands can be
found in the Background mode section of the document . Encodings not listed in this table are not supported in debug
mode and are treated as no operations .

Table 12-2. Debug Mode Commands

OP CODE

COMMAND

OPERATION

0010–0000

No Operation

No operation .

0010–0001

Read register

map

Read data from internal registers . This command forces the debug engine to update the
CMD[3:0] bits in the ICDC to 0001b and perform a jump to utility ROM code at 8010h . The util-
ity ROM debug service routine loads register data to ICDB for host capture/read, starting at the
lowest register location in module 0, one byte at a time in a successive order until all internal
registers are read and output to the host .

0010–0010

Read data

memory

Read data from data memory . This command requires four follow-on transfer cycles, two for
the starting address and two for the word read count, starting with the LSB address and end-
ing with the MSB read count . The address is moved to the ICDA register and the word read
count is moved to the ICDD register by the debug engine . This information is directly acces-
sible by the utility ROM code . At the completion of this command period, the debug engine
updates the CMD[3:0] bits to 0010b and performs a jump to utility ROM code at 8010h . The
utility ROM debug service routine loads ICDB from data memory according to address and
count information provided by the host .

0010–0011

Read program

stack

Read data from program stack . This command requires four follow-on transfer cycles, two
for the starting address and two for the read count, starting with the LSB address and end-
ing with the MSB read count . The address is moved to the ICDA register and the read count
is moved to the ICDD register by the debug engine . This information is directly accessible by
the utility ROM code . At the completion of this command period, the debug engine updates
the CMD[3:0] bits to 0011b and performs a jump to utility ROM code at 8010h . The utility ROM
debug service routine pops data out from the stack according to the information received in
the ICDA and ICDD register . The stack pointer is postincremented for each pop operation .