EasyManua.ls Logo

Texas Instruments CC3235 SimpleLink Series - Page 763

Texas Instruments CC3235 SimpleLink Series
799 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
www.ti.com
Flash Memory Configuration
763
SWRU543–January 2019
Submit Documentation Feedback
Copyright © 2019, Texas Instruments Incorporated
On-Chip Parallel Flash
21.1 Flash Memory Configuration
The flash memory is configured as two of 2 × 512-KB banks, organized such that one can be accessed for
programming while reading or executing from the other. The memory can also be seen as 512 × 2-KB
pages that can be independently erased.
21.2 Interrupts
The flash memory controller can generate interrupts when one of the following conditions is observed:
• Programming interrupt: signals when a program or erase action is complete (PRIS)
• Invalid data interrupt: signals when a bit in flash that was previously programmed as 0 is now
requested to be programmed as 1 (INVDRIS)
• Erase error interrupt: indicates an ERASE operation failed (ERRIS)
• Programming error interrupt: indicates a PROGRAM operation failed (PROGRIS)
The interrupt events that can trigger a controller-level interrupt are defined in the Flash Controller Masked
Interrupt Status (FCMIS) register, by setting the corresponding MASK bits. If interrupts are not used, the
raw interrupt status is always visible through the Flash Controller Raw Interrupt Status (FCRIS) register.
Interrupts are always cleared (for both the FCMIS and FCRIS registers) by writing 1 to the corresponding
bit in the Flash Controller Masked Interrupt Status and Clear (FCMISC) register.
21.3 Flash Memory Programming
The CC3235SF flash memory controller provides a well-defined register interface for flash memory
programming. All erase and program operations are handled through three registers:
• Flash Memory Address (FMA)
• Flash Memory Data (FMD)
• Flash Memory Control (FMC)
When a flash memory operation (write, page-erase, or mass-erase) is executed in a flash bank, access to
that particular bank is inhibited. As a result, instruction and literal fetches to the bank are held off until the
flash memory operation is complete. If an instruction execution is required during a flash memory
operation, the executing code must be placed in SRAM or another bank, and executed from there while
the flash operation is in progress.
NOTE: When programming flash memory, the following characteristics of the memory must be
considered:
• Only an erase can change bits from 0 to 1
• A write can only change bits from 1 to 0. If the write tries to change 0 to 1, the
write fails and no bits are changed.
• All flash operations are completed before entering sleep. Flash is disabled
before entering LPDS or hibernate.
To program a 32-bit word:
1. Write source data to the FMD register.
2. Write the target address to the FMA register.
3. Write the flash memory write key and the WRITE bit (a value of 0xA442.0001) to the FMC register.
4. Poll the FMC register until the WRITE bit is cleared.
To erase a 2-KB page:
1. Write the 2-KB aligned page address to the FMA register.
2. Write the flash memory write key and the ERASE bit (a value of 0xA442.0002) to the FMC register.
3. Poll the FMC register until the ERASE bit is cleared.

Table of Contents