Common Operations Using the Flash Controller
526
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Flash Controller A (FLCTL_A)
when the 128-bit boundary is crossed, while read accesses within the range of the buffer are serviced
without any bus stalls. If read buffering is disabled, accesses to the flash bypasses the buffer, and the
data read from the flash is limited to the width of the access (8, 16, or 32 bits). Each bank has
independent settings for the read buffering. In addition, within each bank, the application has independent
flexibility to enable read buffering for instruction and data fetches.
Read buffers are bypassed by the controller during any program or erase operation to ensure data
coherency.
Read buffers are disabled by default.
The MSP432 Driver Library APIs in
can be used to enable and disable read buffering.
Table 10-2. MSP432 Driver Library API for FLCTL_A Read Buffering Configuration
MSP432 Driver Library API
Function
FlashCtl_A_enableReadBuffering
Enables read buffering on accesses to a specified bank of flash memory
FlashCtl_A_disableReadBuffering
Disable read buffering on accesses to a specified bank of flash memory
10.2.3 Flash Program
Programming of bits in the flash memory involves setting the targeted bits to the value 0. The flash
memory architecture supports programming of bits from a single bit up to four entire flash word width (128-
bits) in one program operation
The MSP432 Driver Library API in
can be used to program memory. This function can be used
to program memory blocks of any size from a single byte to larger blocks. It is a blocking function that
disables Master interrupts before the start of flash programming. For more information on this function,
see the
MSP432 Peripheral Driver Library User’s Guide
Table 10-3. MSP432 Driver Library API for FLCTL_A Program Operation
MSP432 Driver Library API
Function
FlashCtl_A_programMemory
Program a portion of flash memory with the provided data
10.2.4 Flash Erase
The logical value of an erased flash memory bit is 1. Each bit can be programmed from 1 to 0 individually,
but to reprogram from 0 to 1 requires an erase cycle. The smallest amount of flash that can be erased in
both main and information memory regions is one sector (4KB). Two erase modes are offered for the flash
memory: sector erase and mass erase.
10.2.4.1 Sector Erase Mode
In the sector erase mode, the flash controller erases one sector of the flash. This sector can be in either
bank, in the information memory, or in the main memory region.
The MSP432 Driver Library API in
can be used to erase a flash sector. This function is
blocking and does not exit until operation has either completed or failed due to an error. Master interrupts
are disabled throughout execution of this function.
Table 10-4. MSP432 Driver Library API for FLCTL_A Sector Erase Operation
MSP432 Driver Library API
Function
FlashCtl_A_eraseSector
Erases a sector of MAIN or INFO flash memory.