Advanced Operations using the Flash Controller
529
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Flash Controller A (FLCTL_A)
•
Full-word programming mode
•
Burst program mode
Because the flash controller is optimized to provide energy and time-efficient program operations, user
application software may need 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.
10.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 pre-program verify is not mandatory if the flash location to be programed is already erased.
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. The flash controller issues an error if any of the bits to be programmed is already 0. 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 programed are 1 (erased). 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 in
.
Table 10-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 10-9. MSP432 Driver Library API for Setting up Auto-Verify Before FLCTL_A Program
Operations
MSP432 Driver Library API
Function
FlashCtl_A_setProgramVerification
Sets pre- or post-verification of burst and regular flash programming instructions
FlashCtl_A_clearProgramVerification
Clears pre- or post-verification of burst and regular flash programming instructions
10.3.2.2 Flash Programming Using Immediate and Full-Word Modes
When the immediate write mode of programing is configured, the flash controller initiates a program
operation immediately upon receiving a write command.
To optimize write latencies and the power consumption during flash program operations, the application
can configure the flash controller to buffer multiple writes from the CPU and initiate the program operation
only after a complete 128-bit flash word has been composed. This method of programming, enabled by
the full-word programming mode, is useful in cases where the application is working with larger word sizes
and prefers to initiate writes only when it has at least 16 bytes of data ready for programming.
The following steps explain how full-word programming mode should be used by the application: