8.3.4 Program Memory
User program Flash stores code and data for Mission mode execution. Unless restricted by an access control, there is full access (execute, data read, write, CRC) to user program Flash in all modes. User program Flash access controls include the protection regions and code-protect.
Programming the UCB write protect word permanently prevents modification of all UCB Configuration
bits settings. Protection region and code-protect access
controls apply to all of user program space. The chip erase
operation erases all of user program Flash except for permanent
(OTP and IRT) protection regions. If permanent protection
regions are configured and UCB is either erase protected (EPUCB
(UCPROT[0]) = ‘1
’) or write-protected (WPUCB
(UCPROT[1]) = ‘1
’), only the user program
memory Flash outside the permanent regions is erased. In this
case, UCB, which stores the permanent region descriptors and the
permanent region contents, is not affected by the chip erase. If
UCB is not erase protected (EPUCB (UCPROT[0]) =
‘0
’) and not write protected (WPUCB
(UCPROT[1]) = ‘0
’), then UCB and the entire
user program and user data Flash are erased by a chip erase. UCA
is always erased by a chip erase. Chip erase is only allowed in
ICSP Programming Mode. If Secure Debug is enabled, IRT firmware
authorization is required for a chip erase. If Entire Flash OTP
by ICSP Write Inhibit is enabled, chip erase is permanently
disabled in all modes. Chip erase overrides firmware
configurable (non-permanent) protection region write
protections. Firmware configurable region contents are erased on
a chip erase. Regardless of UCB erase or write protections, if
permanent protection regions are configured, only user program
Flash outside the permanent regions is erased.