SPIU023 August 2026 TMS320F28P551SG
Sets up data and issues 512-bit (32 16-bit words) AutoEcc generation mode program command to valid flash or OTP memory addresses.
Fapi_StatusType
Fapi_issueAutoEcc512ProgrammingCommand (
uint32 *pu32StartAddress,uint16*pu16DataBuffer,
uint16u16DataBufferSizeInWords
)| Parameters | Description |
|---|---|
| pu32StartAddress [in] | Start address in flash for the data and ECC to be programmed. |
| pu16DataBuffer [in] | Pointer to the data buffer address. Address of the data buffer must be 512-bit aligned. |
| u16DataBufferSizeInWords [in] | Number of 16-bit words in the data buffer. Maximum data buffer size in words must not exceed 32. |
This function automatically generates eight bytes of ECC data for the user-provided 512-bit data (second parameter) and programs the data and ECC together at the user-provided 512-bit aligned flash address (first parameter). When this command is issued, the flash state machine programs all of the 512 bits along with ECC. Hence, when using this mode, data not supplied is treated as all 1s (0xFFFF). Once ECC is calculated and programmed for a 512-bit data, those 512 bits cannot be reprogrammed (unless the sector is erased) even if the ECC is programming a bit from 1 to 0 in that 512-bit data, since the new ECC value collides with the previously programmed ECC value.
SECTIONS
{
.text : > FLASH, ALIGN(32)
.cinit : > FLASH, ALIGN(32)
.const : > FLASH, ALIGN(32)
.init_array : > FLASH, ALIGN(32)
.switch : > FLASH, ALIGN(32)
}If you do not align the sections in flash, you need to track incomplete 512-bit words in a section and combine these words with the words in other sections that complete the 512-bit word. This is difficult to do. Hence, TI recommends aligning your sections on 512-bit boundaries.
Some 3rd party flash programming tools or TI flash programming kernel examples (C2000Ware) or any custom flash programming option can assume that the incoming data stream is all 512-bit aligned and does not necessarily expect that a section starts on an unaligned address. Thus, the tool can try to program the maximum possible (512-bits) words at a time assuming that the address provided is a 512-bit aligned address. This can result in a failure when the address is not aligned. So, TI suggests aligning all the sections (mapped to flash) on a 512-bit boundary.
For allowed programing range for the function, see Table 3-11.
| FlashAPI | Main Array | DCSM OTP | ECC | Link pointer |
|---|---|---|---|---|
| Fapi_issueAutoEcc512ProgrammingCommand() | Allowed | Allowed | Allowed | Not allowed |
Example implementation for this function will be released in the next C2000ware release.