![Freescale Semiconductor HCS08 Series Reference Manual Download Page 43](http://html1.mh-extra.com/html/freescale-semiconductor/hcs08-series/hcs08-series_reference-manual_2330628043.webp)
Chapter 4 Memory
MC9S08JS16 MCU Series Reference Manual, Rev. 4
Freescale Semiconductor
43
Provided the key enable (KEYEN) bit is 1, the 8-byte comparison key can be used to temporarily
disengage memory security. This key mechanism can be accessed only through user code running in
secure memory. (A security key cannot be entered directly through background debug commands.)
This
security key can be disabled completely by programming the KEYEN bit to 0. If the security key is
disabled, the only way to disengage security is by mass erasing the flash if needed (normally through the
background debug interface) and verifying that flash is blank. To avoid returning to secure mode after the
next reset, program the security bits (SEC01:SEC00) to the unsecured state (1:0).
0xFFBB and 0xFFBC are used to store user data, such as the user’s MCG trimmed value.
4.3
RAM (System RAM)
The MC9S08JS16 series devices include 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.
For compatibility with older M68HC05 MCUs, the HCS08 resets the stack pointer to 0x00FF. In the
MC9S08JS16 series, re-initialize 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-provided equate file).
LDHX #1 ;point one past RAM
Table 4-4. Nonvolatile Register Summary
Address
Register Name
Bit 7
6
5
4
3
2
1
Bit 0
0xFFAE
Reserved for storage
of FTRIM
0
0
0
0
0
0
0
FTRIM
0xFFAF
Reserved for storage
of MCGTRIM
TRIM
0xFFB0–
0xFFB7
NVBACKKEY
8-Byte Comparison Key
0xFFB8
Flash Block Checksum High Byte
0xFFB9
Flash Block Checksum Low Byte
0xFFBA
Checksum Bypass
0xFFBB
Reserved for user’s
storage of data
User Data
0xFFBC
Reserved for user’s
storage of data
User Data
0xFFBD
NVPROT
FPS7
FPS6
FPS5
FPS4
FPS3
FPS2
FPS1
FPDIS
0xFFBE
Flash Partial Erase semaphore
0xFFBF
NVOPT
KEYEN
FNORED
0
0
0
0
SEC01
SEC00
Summary of Contents for HCS08 Series
Page 2: ......
Page 4: ......
Page 8: ......
Page 62: ...Chapter 4 Memory MC9S08JS16 MCU Series Reference Manual Rev 4 62 Freescale Semiconductor...
Page 305: ......