beautypg.com

Addendum to section 16: in-circuit debug mode, 1 register read and write commands, 2 data memory read command – Maxim Integrated MAXQ Family Users Guide: MAXQ8913 Supplement User Manual

Page 52: 3 data memory write command, 4 program stack read command, 5 read register map command, Maxq family user’s guide: maxq8913 supplement

background image

MAXQ Family User’s Guide:

MAXQ8913 Supplement

16-1

ADDENDUM TO SECTION 16: IN-CIRCUIT DEBUG MODE

The MAXQ8913 provides an in-circuit debugging interface through the debug port as described in the MAXQ Family
User’s Guide
. This interface provides the following functions for use in debugging application software:
• Single-step (trace) execution
• Four program address breakpoints
• Two breakpoints configurable as data address or register address breakpoints
• Register read and write
• Program stack read
• Data memory read and write
• Optional password protection
The following sections provide specific notes on the operation of the MAXQ8913 in debugging mode.

16.1 Register Read and Write Commands

Any register location can be read or written using these commands, including reserved locations and those used for
op code support. No protection is provided by the debugging interface, and avoiding side effects is the responsibility
of the host system communicating with the MAXQ8913.
Writing to the IP register alters the address that execution resumes at once the debugging engine exits.
In general, reading a register through the debug interface returns the value that was in that register before the debug-
ging engine was invoked. An exception to this rule is the SP register; reading the SP register through the debug inter-
face actually returns the value (SP+1).

16.2 Data Memory Read Command

When invoking this command, ICDA should be set to the word address of the starting location to read from, and ICDD
should be set to the number of words. The input address must be based on the utility ROM memory map, as shown
in Figure 2-3.
Data memory words returned by this command are output LSB first.

16.3 Data Memory Write Command

When invoking this command, ICDA should be set to the word address of the location to write to, and ICDD should be
set to the data word to write. The input address must be based on the utility ROM memory map, as shown in Figure 2-3.

16.4 Program Stack Read Command

When invoking this command, ICDA should be set to the address of the starting stack location (value of SP) to read
from, and ICDD should be set to the number of words. The address given in ICDA is the highest value that is used, as
words are popped off the stack and returned in descending order.
Stack words returned by this command are output LSB first.

16.5 Read Register Map Command

This command outputs all peripheral registers in the range M0[00h] to M4[1Fh], along with a fixed set of system reg-
isters. The following formatting rules apply to the returned data:
• System registers are output as 8 bits or 16 bits, least significant byte first.
• All peripheral registers are output as 16 bits, least significant byte first. The top byte of 8-bit registers are returned

as 00h.

• Nonimplemented and reserved peripheral registers in the range M0[00h] to M4[1Fh] are represented as empty word

values in Table 16-1. These values should be ignored.

• Registers SBUF, SPIB, I2CBUF, and ADDATA are not read, and their values are returned as 0000h.

Maxim Integrated