The internal register block, SRAM, EEPROM, and flash memory have default locations within the 64-kB standard address space — a callback to chapter 1:
Figure 1.2 9S12 Memory Map.
INITRG
, INITRM
, and INITEE
.If conflict occurs when mapping resources, the register block will take precedence over other resources.
Figure 14.1 Mapping precedence.
The register block (1- or 2-kB) can be remapped to any 2-kB space within the first 32-kB of the system address space. The INITRG
register can be written into once in normal mode, but many times in special modes.
Figure 14.2 Contents of the INITRG
register.
In the memory map, at reset, the address space is from $0000
to $03FF
.
Figure 14.3 Address of the memory map.
As noted, the register space is mappable to any 2-kB space. Using the INITRG
register, it modifies upper five bits of the 16-bit register address. For reference:
Similarly, the SRAM can be remapped to any 2-kB boundary within the 64-kB memory space. The remapping is controlled by the INITRM
register.
Figure 14.4 Contents of the INITRM
register.