9.1.1.3 Storage Area Flash

Storage Area Flash (SAF) is the area in program memory that can be used as data storage. SAF is enabled by the SAFEN Configuration bit. If enabled, the code placed in this area cannot be executed by the CPU. The SAF block is placed at the end of memory and spans 128 Words. The WRTSAF Configuration bit is used to write-protect the Storage Area Flash.

Important: If write-protected locations are written to, memory is not changed and the WRERR bit is set.
Table 9-1. Program Flash Memory Partition
Region Address Partition(3)
BBEN = 1

SAFEN = 1

BBEN = 1

SAFEN = 0

BBEN = 0

SAFEN = 1

BBEN = 0

SAFEN = 0

Program Flash Memory 00 0000h

. . . .

Last Boot Block Memory Address

Application Block Application Block Boot Block Boot Block

Last Boot Block Memory Address(1) + 1

. . . .

Last Program Memory Address(2) - 100h

Application Block Application Block
Last Program Memory Address(2) - FEh(4)

. . . .

Last Program Memory Address(2)

Storage Area Flash Block Storage Area Flash Block
Note:
  1. Last Boot Block address is based on BBSIZE bits. Refer to the “Device Configuration” chapter for more details.
  2. For Last Program Memory address refer the table above.
  3. Refer to the “Device Configuration” chapter for BBEN and SAFEN bit definitions.
  4. Storage Area Flash is implemented as the last 128 Words of user Flash memory.