SWCU193A April 2023 – August 2024 CC2340R2 , CC2340R5 , CC2340R5-Q1
Program multiple whole, back-to-back MAIN sectors of the flash.
This allows the entire MAIN bank to be programmed with only one SACI command, with high performance.
For this command, SACI has data buffers for two MAIN sectors. This enables pipelined programming:
When SACI receives the last word of a sector, this triggers or pends programming of that sector. When SACI finishes programming of a sector, a response is generated for that sector. This can overwrite the response for the previous sector if the host has not yet read that.
If SACI fails to program a sector (e.g. due to protection), the command ends, and the response for that sector indicates the error. If the host skips/misses reading the response for a sector, the host can assume that the sector was successfully programmed if the host sees the response for a later sector.
The host must not write data for another sector while one sector is being programmed, and another sector is pending. This means:
The host should always wait for and check the response for the last sector.
These conditions must be true:
Each sector can be protected by:
Words | Bits | Field | Value | Description |
---|---|---|---|---|
0 | 7:0 | cmdId | 0x0F | Command ID |
15:8 | respSeqNumber | User defined | Base response sequence number | |
31:16 | reserved0 | 0x0000 | Reserved | |
1 | 31:0 | key | 0xB7E3A08F | Flash operation key (magic number) |
2 | 31:0 | firstSectorAddr | - | Address of the first byte of the first sector to be programmed |
Then, for each flash sector:
Words | Bits | Field | Value | Description |
---|---|---|---|---|
511:0 | 31:0 | data | User defined |
Sector data:
|
This response is generated after each sector has been programmed:
Words | Bits | Field | Value | Description |
---|---|---|---|---|
0 | 7:0 | cmdId | 0x0F | Command ID, copied from the first command parameter word |
15:8 | respSeqNumber | User defined |
Response sequence number. For the first sector, the number is equal to the respSeqNumber in the first parameter. For later sectors, the number increments by 1 for each sector. |
|
23:16 | result | - |
Command result. One of the common results, or:
|
|
31:24 | dataWordCount | 0 | Size of additional response data, in number of 32-bit words |
These checks are performed before command execution, in the indicated order:
These checks are performed before programming of each sector, in indicated order:
The command finishes prematurely when a buffer overflow condition occurs, with result PARAM_BUFFER_OVERFLOW.