
2-8
MAXQ610 User’s Guide
2.3.4 Stack Memory
The MAXQ610 implements a soft stack that uses the on-chip data memory (SRAM) for storage of 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; it can also be used explicitly to store and retrieve data by
using the PUSH, POP, and POPI instructions. The POPI instruction acts identically to the POP instruction, except that
it additionally set the IPS bits.
The width of the stack is 16 bits to accommodate the instruction pointer size. As the stack pointer register, SP, is used
to hold the index of the top of the stack, the maximum size of the stack allowed for a MAXQ610 is the SRAM data
memory size.
On reset, the stack pointer SP initializes to the top of the stack (03F0h). The CALL, PUSH, and interrupt vectoring
operations increase the stack depth (decrement SP) and then store a value at the memory location pointed to by SP.
The RET, RETI, POP, and POPI operations retrieve the value at @SP and then decrease the stack depth (increment SP).
2.4 Memory Management Unit
Memory allocation and access control for program and data memory is managed by the MMU.
The MAXQ610 MMU supports the following:
• Flash or masked ROM code memory of up to 64KB; utility ROM of 4KB and data memory SRAM of 2KB.
• In-system and in-application programming of embedded flash (flash versions only).
• Access to any of the three memory areas (SRAM, code memory, utility ROM) using the data memory pointers and
the code pointer.
• Execution from any of the program memory areas (code memory, factory written and tested utility ROM routines)
and from data memory.
Given the above capabilities, the following rules apply to the memory map:
• Program memory:
Physical program memory pages (P0, P1) are logically mapped into data space based upon selection of byte/word
access mode and CDA[1:0] bit settings.
• Data memory:
Access can be either word or byte.
All 16 data pointer address bits are significant in either access mode (word or byte).
The MAXQ610 can merge program and data into a linear memory map. This is accomplished by mapping the data
memory into the program space or mapping program memory segment into the data space.
2.5 Memory Mapping
Figure 2-3 summarizes the MAXQ610 default memory maps.
Comentarios a estos manuales