
MC68HC16R1/916R1
USER’S MANUAL
STANDBY RAM MODULE
MOTOROLA
6-1
SECTION 6
STANDBY RAM MODULE
The standby RAM (SRAM) module consists of a fixed-location control register block
and a 2-Kbyte array of fast (two clock) static RAM that may be mapped to a user spec-
ified location in the system memory map. The SRAM is especially useful for system
stacks and variable storage. The SRAM can be mapped to any address that is a mul-
tiple of the array size so long as SRAM boundaries do not overlap the module control
registers (overlap makes the registers inaccessible). Data can be read/written in bytes,
words or long words. SRAM is powered by V
DD
in normal operation. During power-
down, SRAM contents can be maintained by power from the V
STBY
input. Power
switching between sources is automatic.
6.1 SRAM Register Block
There are four SRAM control registers: the RAM module configuration register
(RAMMCR), the RAM test register (RAMTST), and the RAM array base address reg-
isters (RAMBAH/RAMBAL).
The module mapping bit (MM) in the SCIM configuration register (SCIMCR) defines
the most significant bit (ADDR23) of the IMB address for each MC68HC16R1/916R1
module. Because ADDR[23:20] are driven to the same value as ADDR19, MM must
be set to one. If MM is cleared, IMB modules are inaccessible. For more information
about how the state of MM affects the system, refer to
5.2.1 Module Mapping
.
The SRAM control register consists of eight bytes, but not all locations are implement-
ed. Unimplemented register addresses are read as zeros, and writes have no effect.
Refer to
D.3 Standby RAM Module
for register block address map and register bit/
field definitions.
6.2 SRAM Array Address Mapping
Base address registers RAMBAH and RAMBAL are used to specify the SRAM array
base address in the memory map. RAMBAH and RAMBAL can only be written while
the SRAM is in low-power stop mode (RAMMCR STOP = 1) and the base address lock
(RAMMCR RLCK = 0) is disabled. RLCK can be written once only to a value of one;
subsequent writes are ignored. This prevents accidental remapping of the array.
NOTE
In the CPU16, ADDR[23:20] follow the logic state of ADDR19. The
SRAM array must not be mapped to addresses $080000–$7FFFFF,
which are inaccessible to the CPU16. If mapped to these addresses,
the array remains inaccessible until a reset occurs, or it is remapped
outside of this range.