beautypg.com

10 debug command operation, 1 register read and, 2 data memory read c – Maxim Integrated MAXQ7667 User Manual

Page 217: 3 data memory write, 4 program stack read, 5 read register map, 10 debug command operation -19, 1 register read and write commands -19, 2 data memory read command -19, 3 data memory write command -19

background image

12-19

_________________________________________________________________________________________________________

MAXQ7667 User’s Guide

12.3.10 Debug Command Operation

The following sections provide specific notes on the MAXQ7667’s operation in debugging mode.

12.3.10.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 communicat-

ing with the MAXQ7667.

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 debugging engine was

invoked. An exception to this rule is the SP register. Reading the SP register through the debug interface actually returns the value (SP + 1).

12.3.10.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 Section 2. Data memory words

returned by this command are output LSB first.

12.3.10.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 Section 2.

12.3.10.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 will be used, as words are popped off the

stack and returned in descending order. Stack words returned by this command are output LSB first.

12.3.10.5 Read Register Map Command

This command outputs all peripheral registers in the range M0[00h] to M5[0Dh], along with a fixed set of system registers. The follow-

ing formatting rules apply to the returned data.

• System registers are output as 8-bit or 16-bit, least significant byte first.

• All peripheral registers are output as 16-bit, least significant byte first. The top byte of 8-bit registers is returned as 00h.

• Nonimplemented peripheral registers in the range M0[00h] to M5[0Dh] are returned as 0000h.

• The value of SBUF0, SPIB, C0S, C0DB, C0RMS, C0TMA, and ASR are not read, and this register is returned as 0000h.

The first byte output by this command is the value 192 (COh), which represents the number of peripheral registers output. Table 12-3

lists the remaining 448 bytes output by this command.