Program all or a part of one MAIN sector (see Chapter 7).
The programming starts when the specified number of bytes (padded to a whole number of words) has been received by SACI.
Restrictions
These conditions must be true:
- Fcfg.permissions.allowFlashProgram = 0xA (FCFG_PERMISSION_ALLOW)
- If CCFG is valid:
- Ccfg.permissions.allowFlashProgram= 0xA (CCFG_PERMISSION_ALLOW)
- If SCFG is valid:
- Scfg.permissions.allowFlashProgram= 0xA (SCFG_PERMISSION_ALLOW)
The sector can be protected by:
- Fcfg.flashProt.writeEraseProt.mainSectors0_31 and
Ccfg.flashProt.writeEraseProt.mainSectors0_31 (1 sector per bit)
- Fcfg.flashProt.writeEraseProt.mainSectors32_255 and
Ccfg.flashProt.writeEraseProt.mainSectors32_255 (8 sectors per bit)
- Fcfg.flashProt.writeEraseProt.mainSectors256_511 and
Ccfg.flashProt.writeEraseProt.mainSectors256_511 (8 sectors per bit)
Parameter Words
Table 9-41 Parameter Words
| Words |
Bits |
Field |
Value |
Description |
| 0 |
7:0 |
cmdId |
0x0E |
Command ID |
| 15:8 |
respSeqNumber |
User
defined |
Optional response sequence number, included in the
response header |
| 31:16 |
byteCount |
- |
Number of bytes to program. If 0, the command has
no effect. |
| 1 |
31:0 |
key |
0xB7E3A08F |
Flash operation key (magic number) |
| 2 |
31:0 |
firstByteAddr |
- |
Address of the first byte to be programmed |
| 3+ |
31:0 |
data |
User
defined |
Bytes to be
programmed:
- The first
byte is in bits 7:0 of word 3
- Zero-padding
must be added to the most significant part of the last word
if byteCount is not a multiple of 4.
|
Response Words
Table 9-42 Response Words
| Words |
Bits |
Field |
Value |
Description |
| 0 |
7:0 |
cmdId |
0x0E |
Command ID, copied from the first command
parameter word |
| 15:8 |
respSeqNumber |
User
defined |
Optional sequence number, copied from the first
command parameter word |
| 23:16 |
result |
- |
Command result.
One of the common results, or:
- INVALID_KEY_PARAM if the key parameter is incorrect
- INVALID_ADDRESS_PARAM if the firstByteAddr parameter is
invalid
- INVALID_SIZE_PARAM if the byteCount parameter is invalid
(address range spans over multiple MAIN sectors)
- FLASH_FSM_ERROR if the flash hardware FSM reported an
error
- May
indicate that the sector was retained by chip erase
during the current SACI session
- NOT_ALLOWED
if restrictions are not met (the command has no effect)
|
| 31:24 |
dataWordCount |
0 |
Size of additional response data, in number of
32-bit words |
Check Sequence
These checks are performed before command
execution, in the indicated order:
- If firstByteAddr is invalid:
Fail with result INVALID_ADDRESS_PARAM
- If byteCount = 0: Succeed
with result SUCCESS
- If byteCount is invalid: Fail
with result INVALID_SIZE_PARAM
- If any restriction is
violated: Fail with result NOT_ALLOWED
- If key is invalid: Fail with
result INVALID_KEY_PARAM