
Maxim Integrated 2-5
MAX31782 User’s Guide
Revision 0; 8/11
2.3.2 SRAM Memory
The MAX31782 contains 1KWords (1K x 16) of SRAM memory. The SRAM memory address begins at address 0000h
and is contiguous through word address 03FFh. The contents of the SRAM are indeterminate after power-on reset, but
are maintained during stop mode and non-POR resets.
When using the in-circuit debugging features, the highest 19 bytes of the SRAM must be reserved for saved state
storage and working space for the debugging routines. If in-circuit debug is not used, the entire 1KWords of SRAM is
available for application use.
2.3.3 Utility ROM
The utility ROM is a 4KWord segment of memory. The utility ROM memory address begins at word address 8000h and
is contiguous through word address 8FFFh. The utility ROM is programmed at the factory and cannot be modified. The
utility ROM provides the following system utility functions:
• Reset vector (not user code reset vector)
• In-system programming (bootstrap loader) over JTAG or I2C-compatible interfaces
• In-circuit debug routines
• Routines for in-application flash programming
Following any reset, the MAX31782 automatically starts execution at the reset vector, which is address 8000h in the utility
ROM. The ROM code determines whether the program execution should immediately jump to the start of application code
(flash address 0000h), or to one of the special routines mentioned. Routines within the utility ROM are firmware-accessible
and can be called as subroutines by the application software. See SECTION 21: Utility ROM, SECTION 18: In-System
Programming, and SECTION 17: In-Circuit Debug Mode for more information on the routines provided by the utility ROM.
2.3.4 Stack Memory
A 16-bit, 16-level on-chip stack provides storage for program return addresses and general-purpose use. The stack is
used automatically by the processor when the CALL, RET, and RETI instructions are executed, and when an interrupt is
serviced. The stack can also be used explicitly to store and retrieve data by using the @SP- - source, @++SP destina-
tion, or the PUSH, POP, and POPI instructions. The POPI instruction acts identically to the POP instruction except that
it additionally clears the INS bit.
The width of the stack is 16 bits to accommodate the instruction pointer size. On reset, the stack pointer SP initializes
to the top of the stack (0Fh). The CALL, PUSH, and interrupt vectoring operations first increment SP and then store a
value at @SP. The RET, RETI, POP, and POPI operations first retrieve the value at @SP and then decrement SP.
The stack memory is initialized to indeterminate values upon reset or power-up. Stack memory is dedicated for stack
operations only and cannot be accessed by the MAX31782 program or data busses.
When using the in-circuit debugging features, one word of the stack must be reserved for the debugging routines. If
in-circuit debug is not used, the entire stack is available for application use.
2.4 Program and Data Memory Mapping and Access
The memory on the MAX31782 is implemented using a Harvard architecture, with separate buses for program and data
memory. The memory management unit (MMU) allows the MAX31782 to also support a pseudo-Von Neumann memory
map. The pseudo-Von Neumann memory map allows each of the memory segments (flash, SRAM, and utility ROM) to
be logically mapped into a single contiguous memory map. This allows all the memory segments to be accessed as
both program and memory data. The advantages the pseudo-Von Neumann memory map provides are:
• Program execution can occur from the flash, SRAM, or utility ROM memory segments.
• The SRAM and flash memory segments can both be used for data memory.
Using the pseudo-Von Neumann memory map does have one restriction. This restriction is that a particular memory
segment cannot be simultaneously accessed as both program and data memory.