SWRU543B January 2019 – June 2025 CC3230S , CC3230SF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
Table 21-1 lists the memory-mapped flash registers. All register offset addresses not listed in Table 21-1 should be considered as reserved locations and the register contents should not be modified.
The offset listed is a hexadecimal increment to the register address. The flash memory register offsets are relative to the flash memory control base address of 0x400F.D000.
| Offset | Acronym | Register Name | Section |
|---|---|---|---|
| 0h | FMA | Flash Memory Address | Section 21.5.1 |
| 4h | FMD | Flash Memory Data | Section 21.5.2 |
| 8h | FMC | Flash Memory Control | Section 21.5.3 |
| Ch | FCRIS | Flash Controller Raw Interrupt Status | Section 21.5.4 |
| 10h | FCIM | Flash Controller Interrupt Mask | Section 21.5.5 |
| 14h | FCMISC | Flash Controller Masked Interrupt Status and Clear | Section 21.5.6 |
| 20h | FMC2 | Flash Memory Control 2 | Section 21.5.7 |
| 30h | FWBVAL | Flash Write Buffer Valid | Section 21.5.8 |
| 100h–17Ch | FWBn | Flash Write Buffer n | Section 21.5.9 |
FMA is shown in Figure 21-1 and described in Table 21-2.
Return to Summary Table.
During a write operation, this register contains a 4-byte aligned address and specifies where the data is written. The alignment requirements must be met by software to avoid unpredictable results of the operation.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | OFFSET | ||||||||||||||||||||||||||||||
| R-0h | R/W-0h | ||||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-20 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
| 19-0 | OFFSET | R/W | 0h | Address Offset Address offset in flash memory where the operation is performed, except for nonvolatile registers |
FMD is shown in Figure 21-2 and described in Table 21-3.
Return to Summary Table.
This register contains the data to be written during the programming cycle. This register is not used during erase cycles.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| DATA | |||||||||||||||||||||||||||||||
| R/W-0h | |||||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-0 | DATA | R/W | 0h | Data Value Data value for write operation |
FMC is shown in Figure 21-3 and described in Table 21-4.
Return to Summary Table.
When this register is written, the flash memory controller initiates the appropriate access cycle for the location specified by the Flash Memory Address (FMA) register. If the access is a write access, the data in the Flash Memory Data (FMD) register is written to the specified address.
This register must be the final register written, and initiates the memory operation. The 4 control bits in the lower byte of this register are used to initiate memory operations.
Do not set multiple control bits, because the results of such an operation are unpredictable.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| WRKEY | |||||||
| WO-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| WRKEY | |||||||
| WO-0h | |||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | |||||||
| R-0h | |||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | MERASE | ERASE | WRITE | ||||
| R-0h | R/W-0h | R/W-0h | R/W-0h | ||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-16 | WRKEY | WO | 0h | Flash Memory Write Key This field contains a write key, which is used to minimize the incidence of accidental flash memory writes. The value 0xA442 must be written into this field for a flash memory write to occur. Writes to the FMC register without this WRKEY value are ignored. A read of this field returns the value 0. |
| 15-3 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
| 2 | MERASE | R/W | 0h | Mass Erase Flash Memory This bit is used to mass-erase the flash main memory and to monitor the progress of that process. 0h = A write of 0 has no effect on the state of this bit. When read, 0 indicates that the previous mass-erase access is complete. 1h = Set this bit to erase the flash main memory. When read, 1 indicates that the previous mass-erase access is not complete. |
| 1 | ERASE | R/W | 0h | Erase a Page of Flash Memory This bit is used to erase a page of flash memory and to monitor the progress of that process. 0h = A write of 0 has no effect on the state of this bit. When read, 0 indicates that the previous page-erase access is complete. 1h = Set this bit to erase the flash memory page specified by the contents of the FMA register. When read, 1 indicates that the previous page-erase access is not complete. |
| 0 | WRITE | R/W | 0h | Write a Word into Flash Memory This bit is used to write a word into flash memory and to monitor the progress of that process. 0h = A write of 0 has no effect on the state of this bit. When read, 0 indicates that the previous write update access is complete. 1h = Set this bit to write the data stored in the FMD register into the flash memory location specified by the contents of the FMA register. When read, 1 indicates that the write update access is not complete. |
FCRIS is shown in Figure 21-4 and described in Table 21-5.
Return to Summary Table.
This register indicates that the flash memory controller has an interrupt condition. An interrupt is sent to the interrupt controller only if the corresponding FCIM register bit is set.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | |||||||
| R-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | |||||||
| R-0h | |||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | PROGRIS | RESERVED | ERRIS | INVDRIS | RESERVED | ||
| R-0h | R-0h | R-0h | R-0h | R-0h | R-0h | ||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | PRIS | RESERVED | |||||
| R-0h | R-0h | R-0h | |||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-14 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
| 13 | PROGRIS | R | 0h | Program Verify Error Raw Interrupt Status This bit is cleared by writing 1 to the PROGMISC bit in the FCMISC register. 0h = An interrupt has not occurred. 1h = An interrupt is pending because the verification of a PROGRAM operation failed. If this error occurs when using the flash write buffer, software must inspect the affected words to determine where the error occurred. |
| 12 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
| 11 | ERRIS | R | 0h | Erase Verify Error Raw Interrupt Status This bit is cleared by writing 1 to the ERMISC bit in the FCMISC register. 0h = An interrupt has not occurred. 1h = An interrupt is pending because the verification of an ERASE operation failed. If this error occurs when using the flash write buffer, software must inspect the affected words to determine where the error occurred. |
| 10 | INVDRIS | R | 0h | Invalid Data Raw Interrupt Status This bit is cleared by writing 1 to the INVMISC bit in the FCMISC register. 0h = An interrupt has not occurred. 1h = An interrupt is pending because a bit that was previously programmed as 0 is now being requested to be programmed as 1. |
| 9-2 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
| 1 | PRIS | R | 0h | Programming Raw Interrupt Status This bit provides status on programming cycles which are write or erase actions generated through the FMC or FMC2 register bits. This bit is cleared by writing 1 to the PMISC bit in the FCMISC register. 0h = The programming or erase cycle has not completed. 1h = The programming or erase cycle has completed. This status is sent to the interrupt controller when the PMASK bit in the FCIM register is set. |
| 0 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
FCIM is shown in Figure 21-5 and described in Table 21-6.
This register controls whether the flash memory controller generates interrupts to the controller.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | |||||||
| R-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | |||||||
| R-0h | |||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | PROGMSK | RESERVED | ERMSK | INVDMSK | RESERVED | ||
| R-0h | R-0h | R-0h | R-0h | R-0h | R-0h | ||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | PMSK | RESERVED | |||||
| R-0h | R-0h | R-0h | |||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-14 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
| 13 | PROGMSK | R | 0h | Program Verify Error Interrupt Mask 0h = The PROGRIS interrupt is suppressed and not sent to the interrupt controller. 1h = An interrupt is sent to the interrupt controller when the PROGRIS bit is set. |
| 12 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
| 11 | ERMSK | R | 0h | Erase Verify Error Interrupt Mask 0h = The ERRIS interrupt is suppressed and not sent to the interrupt controller. 1h = An interrupt is sent to the interrupt controller when the ERRIS bit is set. |
| 10 | INVDMSK | R | 0h | Invalid Data Interrupt Mask 0h = The INVDRIS interrupt is suppressed and not sent to the interrupt controller. 1h = An interrupt is sent to the interrupt controller when the INVDRIS bit is set. |
| 9-2 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
| 1 | PMSK | R | 0h | Programming Interrupt Mask This bit controls the reporting of the programming raw interrupt status to the interrupt controller. 0h = The PRIS interrupt is suppressed and not sent to the interrupt controller. 1h = An interrupt is sent to the interrupt controller when the PRIS bit is set. |
| 0 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
FCMISC is shown in Figure 21-6 and described in Table 21-7.
Return to Summary Table.
This register provides two functions. First, it reports the cause of an interrupt by indicating which interrupt source or sources are signaling the interrupt. Second, it serves as the method to clear the interrupt reporting.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | |||||||
| R-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | |||||||
| R-0h | |||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | PROGMISC | RESERVED | ERMISC | INVDMISC | RESERVED | ||
| R-0h | R/W1C-0h | R-0h | R/W1C-0h | R/W1C-0h | R-0h | ||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | PMISC | RESERVED | |||||
| R-0h | R/W1C-0h | R-0h | |||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-14 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
| 13 | PROGMISC | R/W1C | 0h | PROGVER Masked Interrupt Status and Clear Writing 1 to this bit clears PROGMISC and also the PROGRIS bit in the FCRIS register. 0h = When read, 0 indicates that an interrupt has not occurred. A write of 0 has no effect on the state of this bit. 1h = When read, 1 indicates that an unmasked interrupt was signaled. |
| 12 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
| 11 | ERMISC | R/W1C | 0h | ERVER Masked Interrupt Status and Clear Writing 1 to this bit clears ERMISC and also the ERRIS bit in the FCRIS register 0h = When read, 0 indicates that an interrupt has not occurred. A write of 0 has no effect on the state of this bit. 1h = When read, 1 indicates that an unmasked interrupt was signaled. |
| 10 | INVDMISC | R/W1C | 0h | Invalid Data Masked Interrupt Status and Clear Writing 1 to this bit clears INVDMISC and also the INVDRIS bit in the FCRIS register 0h = When read, 0 indicates that an interrupt has not occurred. A write of 0 has no effect on the state of this bit. 1h = When read, 1 indicates that an unmasked interrupt was signaled. |
| 9-2 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
| 1 | PMISC | R/W1C | 0h | Programming Masked Interrupt Status and Clear Writing 1 to this bit clears PMISC and also the PRIS bit in the FCRIS register 0h = When read, 0 indicates that a programming cycle complete interrupt has not occurred. A write of 0 has no effect on the state of this bit. 1h = When read, 1 indicates that an unmasked interrupt was signaled because a programming cycle completed. |
| 0 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
FMC2 is shown in Figure 21-7 and described in Table 21-8.
Return to Summary Table.
When this register is written, the flash memory controller initiates the appropriate access cycle for the location specified by the Flash Memory Address (FMA) register. If the access is a write access, the data in the Flash Write Buffer (FWB) registers is written. This register must be the final register written, as it initiates the memory operation.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| WRKEY | |||||||
| W-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| WRKEY | |||||||
| W-0h | |||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | |||||||
| R-0h | |||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | WRBUF | ||||||
| R-0h | R/W-0h | ||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-16 | WRKEY | W | 0h | Flash Memory Write Key This field contains a write key, which is used to minimize the incidence of accidental flash memory writes. The value 0xA442 is used as a key to initiate the appropriate access cycle for the location specified by the address in the FMA register. Writes to the FMC2 register without this WRKEY value are ignored. A read of this field returns the value 0. |
| 15-1 | RESERVED | R | 0h | Software should not rely on the value of a reserved bit. To provide compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. |
| 0 | WRBUF | R/W | 0h | Buffered Flash Memory Write This bit is used to start a buffered write to flash memory. When read, 1 indicates that the previous buffered flash memory write access is not complete. 0h = A write of 0 has no effect on the state of this bit. When read, 0 indicates that the previous buffered flash memory write access is complete. 1h = Set this bit to write the data stored in the FWBn registers to the location specified by the contents of the FMA register. |
FWBVAL is shown in Figure 21-8 and described in Table 21-9.
Return to Summary Table.
This register provides a bitwise status of which FWBn registers have been written by the processor since the last write of the flash memory write buffer. The entries with a 1 are written in the next write of the flash memory write buffer.
This register is cleared after the write operation by hardware. A protection violation on the write operation also clears this status.
Software can program the same 32 words to various flash memory locations by setting the FWB[n] bits after they are cleared by the write operation. The next write operation then uses the same data as the previous one. In addition, if an FWBn register change should not be written to flash memory, software can clear the corresponding FWB[n] bit to preserve the existing data when the next write operation occurs.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| FWB[n] | |||||||||||||||||||||||||||||||
| R/W-0h | |||||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-0 | FWB[n] | R/W | 0h | Flash Memory Write Buffer Bit 0 corresponds to FWB0, offset 0x100, and bit 31 corresponds to FWB31, offset 0x13C. 0h = The corresponding FWBn register has no new data to be written. 1h = The corresponding FWBn register has been updated since the last buffer write operation and is ready to be written to flash memory. |
FWBn is shown in Figure 21-9 and described in Table 21-10.
Return to Summary Table.
These 32 registers hold the contents of the data to be written into the flash memory on a buffered flash memory write operation. The offset selects one of the 32-bit registers. Only FWBn registers that have been updated since the preceding buffered flash memory write operation are written into the flash memory, so it is not necessary to write the entire bank of registers to write one or two words. The FWBn registers are written into the flash memory with the FWB0 register corresponding to the address in FMA. FWB1 is written to the address FMA+0x4, and so forth. Only data bits that are 0 result in modified flash memory. A data bit of 1 leaves the content of the flash memory bit at its previous value.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| DATA | |||||||||||||||||||||||||||||||
| R/W-0h | |||||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-0 | DATA | R/W | 0h | Data to be written into the flash memory |