English
Language : 

MC9S08EL32 Datasheet, PDF (46/356 Pages) Freescale Semiconductor, Inc – 8-Bit HCS08 Central Processor Unit (CPU)
Chapter 4 Memory
4.4 RAM
The MC9S08EL32 Series and MC9S08SL16 Series includes static RAM. The locations in RAM below
0x0100 can be accessed using the more efficient direct addressing mode, and any single bit in this area can
be accessed with the bit manipulation instructions (BCLR, BSET, BRCLR, and BRSET). Locating the
most frequently accessed program variables in this area of RAM is preferred.
The RAM retains data when the MCU is in low-power wait, stop2, or stop3 mode. At power-on the
contents of RAM are uninitialized. RAM data is unaffected by any reset provided that the supply voltage
does not drop below the minimum value for RAM retention (VRAM).
For compatibility with M68HC05 MCUs, the HCS08 resets the stack pointer to 0x00FF. In the
MC9S08EL32 Series and MC9S08SL16 Series, it is usually best to reinitialize the stack pointer to the top
of the RAM so the direct page RAM can be used for frequently accessed RAM variables and
bit-addressable program variables. Include the following 2-instruction sequence in your reset initialization
routine (where RamLast is equated to the highest address of the RAM in the Freescale
Semiconductor-provided equate file).
LDHX
TXS
#RamLast+1
;point one past RAM
;SP<-(H:X-1)
When security is enabled, the RAM is considered a secure memory resource and is not accessible through
BDM or through code executing from non-secure memory. See Section 4.5.9, “Security”, for a detailed
description of the security feature.
MC9S08EL32 Series and MC9S08SL16 Series Data Sheet, Rev. 3
46
Freescale Semiconductor