Advanced Operations using the Flash Controller
462
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Flash Controller (FLCTL)
The flash controller implements both pre-program-verify and post-program-verify stages in hardware using
the auto-verify feature. The auto-verify feature is explained in detail in
. The flash
programming stage can be accomplished using any one of the advanced program modes listed below:
•
Immediate write mode
•
Full-word programming mode
•
Burst program mode.
Additionally, it should be noted that since the flash controller is optimized to provide energy and time-
efficient program operations, user application software may be required to execute the three stages of
programming multiple times, thereby subjecting the flash memory to multiple "pulses". However, each
device supports a maximum number of program pulses that is defined by the flash maximum
programming pulses parameter in the device data sheet,
Device Descriptors (TLV)
section.
9.3.2.1
Using the Auto-Verify Feature
To prevent accidental over-programming of a bit or to check that a bit has been sufficiently programmed,
the flash controller provides control bits to implement an automatic program-verify and compare operation
before and after each programming cycle. These are called the automatic pre-program-verify and post-
program-verify respectively.
Automatic preprogram-verify is not mandatory if the application knows that the flash location to be
programed is already in erased state. However, automatic post-program-verify is required following every
program operation.
When pre-program-verify is enabled, flash controller initiates a read to the address to be programed in
program-verify read mode. The flash controller then compares the data received with the value to be
programmed. It issues an error if any of the bits to be programmed already shows a state of 0 in the
memory. This error is indicated by the AVPRE flag in the FLCTL_IFG Register.
The Post-program-verify operation initiates a read to the address after programming is completed. This
read is also initiated in the program-verify read mode. The flash controller then compares the data
received with the value that was intended to be programmed and issues an error if any of the bits that
were supposed to be programed show a state of 1 in the memory. This error is indicated by the AVPST
flag in the FLCTL_IFG Register.
Depending on the programming mode used the auto-verify feature can be configured using the bits shown
in
Table 9-8. Configuring the Auto-Verify Mode Through Direct Register Access
Programming Mode
Auto-Verify Function
Bit
Register
Immediate and Full word
Pre-program-verify
VER_PRE
FLCTL_PRG_CTLSTAT
Immediate and Full word
Post-program-verify
VER_PST
FLCTL_PRG_CTLSTAT
Burst
Pre-program-verify
AUTO_PRE
FLCTL_PRGBRST_CTL
Burst
Post-program-verify
AUTO_PST
FLCTL_PRGBRST_CTL
Alternatively, this feature can be configured using MSP432 Driver Library API shown in
Table 9-9. MSP432 Driver Library API for Setting up Auto-Verify Before Program Operations
MSP432 Driver Library API
Function
FlashCtl_setProgramVerification
Sets up pre- or post-verification of burst and regular flash programming instructions
FlashCtl_clearProgramVerification
Clears pre- or post-verification of burst and regular flash programming instructions.