Flash Controller Memory Module
502
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
Internal Memory
–
Program space reads to C28X-Z1-CSMPSWD, C28x-Z1-ECSLPSWD will return 0.
–
Program fetches to C28X-Z1-CSMPSWD, C28x-Z1-ECSLPSWD will return 0.
•
When the code security module (CSM) is secured, reads to the flash/OTP memory map area from
outside the secure zone take the same number of cycles as a normal access. However, the read
operation returns a zero.
•
The arbitration scheme in C28x-FMC prioritizes C28x core accesses in the fixed priority order of data
read (highest priority), program space read and program fetches/program prefetches (lowest priority)
•
When FSM interface is active for erase/program operations, data in the prefetch buffers and data
cache in FMC will be flushed.
5.3.9 Erase/Program Flash
The F021 Flash (F28M35x M3 Flash and C28x Flash) should be programmed, erased, and verified only
by using the F021 Flash API library. These functions are written, compiled and validated by Texas
Instruments. The flash module contains a flash state machine (FSM) to perform, program, and erase
operations. This section only provides a high-level description for these operations. Please refer to the
C2000 F021 Flash Application Programming Interface (API) Reference Guide
,
, for more
information. Please note that Flash API functions must only be executed from RAM and not from flash.
A typical flow to program flash is:
Erase
→
Program
→
Verify
5.3.9.1
Erase
When the target flash is erased, it reads as all 1's. This state is called 'blank.' The erase function must be
executed before programming. The user should NOT skip erase on sectors that read as 'blank' because
these sectors may require additional erasing due to marginally erased bits columns. The FSM provides an
“Erase Sector” command to erase the target sector. The erase function erases the data and the ECC
together. These commands are implemented by the following Flash API function:
Fapi_issueAsyncCommandWithAddress();
The Flash API provides the following function to determine if the flash bank is 'blank':
Fapi_doBlankCheck();
5.3.9.2
Program
The FSM provides command to program the customer OTP area and flash program data area. This
command is also used to program ECC check bits.
This command is implemented by the following Flash API functions:
Fapi_issueProgrammingCommand();
The Program function provides the options to program data without ECC, data along with user provided
ECC data, data along with ECC calculated by API software, and to program ECC only.
5.3.9.3
Verify
After programming, the user must perform verify using API function Fapi_doVerify(). This function verifies
the flash contents against supplied data in normal read mode and also in read-margin modes. Read
margin modes 0 and 1 are used to test cells for marginality. Read margin 0 is used to test cells for
marginality of programmed cells. Read margin 1 is used to test cells for marginality of erased cells.
Application software is generally developed to enter read-margin mode during power-up and to perform a
full CRC check of the flash contents. In this way, a potential read mode failure can be identified prior to
data loss or gain causing a bit flip.
NOTE:
The read-margin modes are intended for diagnostic capabilities. Flash content is guaranteed
for the lifetime specified in the datasheet.