![NXP Semiconductors MC9S08PA4 Reference Manual Download Page 55](http://html1.mh-extra.com/html/nxp-semiconductors/mc9s08pa4/mc9s08pa4_reference-manual_1721838055.webp)
Table 4-5. Reserved flash memory addresses (continued)
Address
Register Name
Bit 7
6
5
4
3
2
1
Bit 0
0xFF7E
NV_FOPT
NV
0xFF7F
NV_FSEC
KEYEN
1
1
1
1
SEC
The 8-byte comparison key can be used to temporarily disengage memory security
provided the key enable field, NV_FSEC[KEYEN], is 10b. 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 NV_FSEC[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,
NV_FSEC[SEC], to the unsecured state (10b).
4.4 Random-access memory (RAM)
This section describes the 512 bytes of RAM (random-access memory).
These devices include static RAM. The locations in RAM below 0x0100 can be accessed
using the more efficient direct addressing mode. Any single bit in this area can be
accessed with the bit manipulation instructions (BCLR, BSET, BRCLR, and BRSET).
The RAM retains data when the MCU is in low-power wait, 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 this series, re-initialize the stack pointer to the top of the RAM so that 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
equate file).
LDHX #1 ;point one past RAM
TXS ;SP<-(H:X-1)
When security is enabled, the RAM is considered a secure memory resource and is not
accessible through BDM or code executing from non-secure memory.
Chapter 4 Memory map
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
NXP Semiconductors
55
Summary of Contents for MC9S08PA4
Page 1: ...MC9S08PA4 Reference Manual Supports MC9S08PA4 Document Number MC9S08PA4RM Rev 5 08 2017 ...
Page 2: ...MC9S08PA4 Reference Manual Rev 5 08 2017 2 NXP Semiconductors ...
Page 22: ...MC9S08PA4 Reference Manual Rev 5 08 2017 22 NXP Semiconductors ...
Page 28: ...System clock distribution MC9S08PA4 Reference Manual Rev 5 08 2017 28 NXP Semiconductors ...
Page 150: ...Port data registers MC9S08PA4 Reference Manual Rev 5 08 2017 150 NXP Semiconductors ...
Page 196: ...Human machine interfaces HMI MC9S08PA4 Reference Manual Rev 5 08 2017 196 NXP Semiconductors ...
Page 224: ...Instruction Set Summary MC9S08PA4 Reference Manual Rev 5 08 2017 224 NXP Semiconductors ...
Page 232: ...Functional Description MC9S08PA4 Reference Manual Rev 5 08 2017 232 NXP Semiconductors ...
Page 258: ...FTM Interrupts MC9S08PA4 Reference Manual Rev 5 08 2017 258 NXP Semiconductors ...
Page 294: ...Functional description MC9S08PA4 Reference Manual Rev 5 08 2017 294 NXP Semiconductors ...
Page 398: ...Resets MC9S08PA4 Reference Manual Rev 5 08 2017 398 NXP Semiconductors ...
Page 400: ...MC9S08PA4 Reference Manual Rev 5 08 2017 400 NXP Semiconductors ...