Advanced Operations using the Flash Controller
463
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Flash Controller (FLCTL)
9.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:
1. The data must be written in an incrementing address fashion, starting with a 128-bit aligned LSB.
•
Can be written as 4x32-bit writes, starting from the least significant 32-bit word.
•
Can be written as 8x16-bit writes, starting from the least significant 16-bit word
•
Can be written as 16x8-bit writes, starting from the least significant byte
•
Can be written as a combination of the above, but must start with the LSB being loaded with the
first write and end with the most significant byte being loaded with the last write
2. When the above is completed, the flash controller now has a complete 128-bit write word that is used
for the program operation.
NOTE:
The application can write a single byte to the LSB (to start the word composition), and a
single byte to the MSB of the 128-bit address (to end the word composition). This also
results in the flash controller composing a full 128-bit word in which only the least and most
significant bytes have actual data, while the intermediate data bits are all filled with 1s
(masked from programming).
NOTE:
It is the application's responsibility to ensure that the writes in this mode follow the correct
sequence (LSB initiation and MSB completion) for the program operation to complete in a
deterministic fashion. If the 128-bit boundary is crossed before the word is completely
composed, the buffer starts composing a new word starting with the new 128-bit address
provided to it. Previously stored data in the buffer is discarded to ensure that data is not
written to an incorrect location altogether. Similarly, if the first write does not start at a 128-bit
boundary, the buffer does not start composition and the data is discarded. The flash
controller sets an interrupt flag in both of these cases (which can be enabled to generate an
interrupt).
The full-word programming mode is enabled by setting the MODE bit in the FLCTL_PRG_CTLSTAT
register.
Alternatively, this feature can be configured using the following MSP432 Driver Library API in
Table 9-10. MSP432 Driver Library API for Enabling Program Operations
MSP432 Driver Library API
Function
FlashCtl_enableWordProgramming
Enables word programming of flash memory.
FlashCtl_disableWordProgramming
Disables word programming of flash memory.
FlashCtl_isWordProgrammingEnabled
Returns if word programming mode is enabled (and if it is, the specific mode)