Common Operations Using the Flash Controller
458
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Flash Controller (FLCTL)
protection is active on the device, the DMA is allowed reads and writes to Bank1 only. In this case,
DMA accesses to Bank0 returns a bus error response.
•
Debugger
–
A debugger can initiate accesses to the flash. If the device is non-secure, all debugger accesses
are permitted. However, if the device is enabled for any form of code security, debugger accesses
to the flash is denied by the device security architecture.
NOTE:
For details on how flash access privileges are controlled by security, see
in the
System Controller (SYSCTL)
chapter.
9.2
Common Operations Using the Flash Controller
9.2.1 Using MSP432 Driver Library for Flash Operations
The MSP432 Driver Library allow the flash Module to be accessed through a simple and easy-to-use
interface for a number of commonly used flash operations such as read, write and erase. TI recommends
incorporating MSP432 Driver Library APIs for all flash operations to ensure safe execution of flash
routines as per the required specification.
A full listing of MSP432 Driver Library APIs is available in the
MSP432 Driver Library MSP432P4xx User's
(see Chapter 8,
Flash Memory Controller
).
9.2.2 Flash Read
Flash read operations involve a data value being output by the flash memory.
9.2.2.1
Flash Read Timing Control and Wait States
The flash controller is configurable in terms of the number of memory bus cycles it takes to service any
read command. This allows the CPU execution frequency to be higher than the maximum read frequency
supported by the flash memory. If the bus clock speed is higher than the native frequency of the flash, the
access is stalled for the configured number of wait states, allowing data from the flash to be accessed
reliably.
User software must program the number of wait states into these registers based on the CPU execution
frequency.
MSP432 Driver Library APIs in
can be used to set the flash wait state.
Table 9-1. MSP432 Driver Library API for Flash Wait-State Configuration
MSP432 Driver Library API
Function
FlashCtl_setWaitState
Changes the number of wait states that are used by the flash controller for read operations
FlashCtl_getWaitState
Returns the set number of flash wait states for the given flash bank
NOTE:
See the device data sheet for CPU execution frequency and wait-state requirements.
9.2.2.2
Read Buffering
The MSP432P device flash is organized with a line size of 128 bits. To offer optimal power consumption
and performance across predominantly contiguous memory accesses, the flash controller offers a "Read
Buffering" feature. If Read Buffering is enabled, the flash memory always reads an entire 128-bit line
irrespective of the access size of 8, 16, or 32 bits. The 128-bit data and its associated address is internally
buffered by the flash controller, so subsequent accesses (expected to be contiguous in nature) within the
same 128-bit address boundary are serviced by the buffer. Hence, the flash accesses see wait-states only