
Chapter 22 Module Mapping Control (MMCV4)
MC9S12HZ256 Data Sheet, Rev. 2.04
616
Freescale Semiconductor
of data flow from the CPU to the output address and data buses of the core. In addition, the MMC manages
all CPU read data bus swapping operations.
22.4.2
Address Decoding
As data flows on the core address bus, the MMC decodes the address information, determines whether the
internal core register or firmware space, the peripheral space or a memory register or array space is being
addressed and generates the correct select signal. This decoding operation also interprets the mode of
operationofthesystemandthestateofthemappingcontrolregistersinordertogeneratetheproperselect.
The MMC also generates two external chip select signals, emulation chip select (ECS) and external chip
select (XCS).
22.4.2.1
Select Priority and Mode Considerations
Althoughinternalresourcessuchascontrolregistersandon-chipmemoryhavedefaultaddresses,eachcan
be relocated by changing the default values in control registers. Normally, I/O addresses, control registers,
vector spaces, expansion windows, and on-chip memory are mapped so that their address ranges do not
overlap. The MMC will make only one select signal active at any given time. This activation is based upon
the priority outlined in
Table 22-15
. If two or more blocks share the same address space, only the select
signal for the block with the highest priority will become active. An example of this is if the registers and
the RAM are mapped to the same space, the registers will have priority over the RAM and the portion of
RAMmappedinthissharedspacewillnotbe accessible.Theexpansionwindowshavethelowest priority.
This means that registers, vectors, and on-chip memory are always visible to a program regardless of the
values in the page select registers.
In expanded modes, all address space not used by internal resources is by default external memory space.
The data registers and data direction registers for ports A and B are removed from the on-chip memory
map and become external accesses. If the EME bit in the MODE register (see MEBI block description
chapter) is set, the data and data direction registers for port E are also removed from the on-chip memory
map and become external accesses.
In special peripheral mode, the first 16 registers associated with bus expansion are removed from the
on-chip memory map (PORTA, PORTB, DDRA, DDRB, PORTE, DDRE, PEAR, MODE, PUCR,
RDRIV, and the EBI reserved registers).
Table 22-15. Select Signal Priority
Priority
Address Space
Highest
BDM (internal to core) firmware or register space
...
Internal register space
...
RAM memory block
...
EEPROM memory block
...
On-chip FLASH or ROM
Lowest
Remaining external space