SWCU194 March 2023 CC1314R10 , CC1354P10 , CC1354R10 , CC2674P10 , CC2674R10
The COMMAND_SET_CCFG command is sent to the bootloader to configure the defined fields in the Flash CCFG area that are read by the ROM boot firmware. The command sends the ACK signal in response to the command after the actual Flash program operation is performed. This command does not execute any erase operation before the write operation.
The command consists of two 32-bit values that are all transferred MSB first. The first 32-bit value is the CCFG Field ID, which identifies the CCFG parameter to be written. The second 32-bit value is the Field Value to be programmed. The command handler masks out Field Value bits not corresponding to the CCFG parameter size.
The only way to change CCFG parameter value bits from 0 to 1 is by erasing the complete CCFG Flash sector. The command sends the ACK signal in response to the command after the actual Flash programming has terminated.
The programming operation fails if the CCFG area is write-protected by the protect bit in FCFG1 or in CCFG.
The format of the packet including the command ID is as follows:
unsigned char ucPacket[11];
ucPacket[0] = <size=11>;
ucPacket[1] = <checksum>;
ucPacket[2] = COMMAND_SET_CCFG;
ucPacket[3] = <Field Id [31:24]>;
ucPacket[4] = <Field Id [23:16]>;
ucPacket[5] = <Field Id [15:8]>;
ucPacket[6] = <Field Id [7:0]>;
ucPacket[7] = <Field Value [31:24]>;
ucPacket[8] = <Field Value [23:16]>;
ucPacket[9] = <Field Value [15:8]>;
ucPacket[10] = <Field Value [7:0]>;Defined CCFG field IDs with corresponding field values are described in Table 10-5.
| Field ID | Field Value | Description |
|---|---|---|
| 0: ID_SECTOR_PROT | Bit[31:0]: The number of the Flash sector to be protected from being program and erase |
The ID_SECTOR_PROT field is used to update the CCFG:WEPROT_31_O_BY2K field. This allows the first 32 sectors to be write erase protected. This command also sets the sticky sector protect bit in the Flash wrapper registers upon the next boot. A single sector can be protected per ID_SECTOR_PROT update. If a 0xF is passed for instance, the CCFG will be updated to write erase protect the 15th sector. |
| 1: ID_IMAGE_VALID | Bit[31:0]: 0x00000000 | For the boot sequence to transfer execution control to a Flash image, this Field Value must be set to the start address of the Flash image vector table |
| 2: ID_TEST_TAP_LCK | Bit[31:8]: Don’t Care Bit[7:0]: 0xC5 = TAP Unlocked |
Any other value than 0xC5 forces a locked TAP after a following boot sequence |
| 3: ID_PWRPROF_TAP_LCK | Bit[31:8]: Don’t Care Bit[7:0]: 0xC5 = TAP Unlocked |
Any other value than 0xC5 forces a locked TAP after a following boot sequence |
| 4: ID_CPU_DAP_LCK | Bit[31:8]: Don’t Care Bit[7:0]: 0xC5 = DAP Unlocked |
Any other value than 0xC5 forces a locked DAP after a following boot sequence. |
| 5: ID_AON_TAP_LCK | Bit[31:8]: Don’t Care Bit[7:0]: 0xC5 = TAP Unlocked |
Any other value than 0xC5 forces a locked TAP after a following boot sequence. |
| 6: ID_PBIST1_TAP_LCK | Bit[31:8]: Don’t Care Bit[7:0]: 0xC5 = TAP Unlocked |
Any other value than 0xC5 forces a locked TAP after a following boot sequence |
| 7: ID_PBIST2_TAP_LCK | Bit[31:8]: Don’t Care Bit[7:0]: 0xC5 = TAP unlocked |
Any other value than 0xC5 forces a locked TAP after a following boot sequence. |
| 8: ID_BANK_ERASE_DIS | Bit[31:1]: Don’t Care Bit[0]: 0 = Bank Erase Disable |
If set to 0, the COMMAND_BANK_ERASE bootloader command does not force any erase operation. |
| 9: ID_CHIP_ERASE_DIS | Bit[31:1]: Don’t Care Bit[0]: 0 = Chip erase disable |
If set to 0, the start-up sequence does not perform any chip erase operation regardless of any chip erase request. |
| 10: ID_TI_FA_ENABLE | Bit[31:8]: Don’t Care Bit[7:0]: 0xC5 = TI FA enable |
Any value other than 0xC5 disables the TIFA enable functionality in a following boot. |
| 11: ID_BL_BACKDOOR_EN | Bit[31:8]: Don’t Care Bit[7:0]: 0xC5 = Bootloader Backdoor Enable |
Any other value than 0xC5 forces the bootloader backdoor to be disabled in a following boot sequence. |
| 12: ID_BL_BACKDOOR_PIN | Bit[31:8]: Don’t Care Bit[7:0]: Bootloader Backdoor I/O Pin Number |
If the pin number exceeds number of I/O pins on the device, the highest I/O pin number on the device is selected. |
| 13: ID_BL_BACKDOOR_LEVEL | Bit[31:1]: Don’t Care Bit[0]: Bootloader backdoor pin active level |
0 = Active low |
| 14: ID_BL_ENABLE | Bit[31:8]: Don’t Care Bit[7:0]: Bootloader Enable |
Any value other than 0xC5 forces the bootloader to ignore any received command. |
| 15: ID_CCFG_PROT | Bit[31:1]: Don’t Care Bit[0]: Write/Erase Protect the CCFG |
If set to 0, the CCFG is protected against Write and Erase operations |
| 16: ID_TI_IDAU_CFG_ENABLE | Bit[31:8]: Don’t Care Bit[7:0]: 0xC5 = IDAU Configuration Disabled |
Any other value than 0xC5 will enable IDAU configuration. |
| 17: ID_TZ_FLASH_NS_BOUND_HIGH | Bit[31:1]: Don’t Care Bit[0]: Boundary Address [7] |
Flash Non-secure boundary address This address will
be written to PRCM:NVMNSADDR.BOUNDARY by ROM Boot FW only if |
| 18: ID_TZ_FLASH_NS_BOUND_LOW |
Bit[31:16]: Don’t
Care |
|
| 19: ID_TZ_FLASH_NSC_BOUND_HIGH | Bit[31:2]: Don’t Care Bit[1]: Boundary Address [9] Bit[0]: Boundary Address [8] |
Flash Non-secure callable boundary address This address will be written to PRCM:NVMNSCADDR.BOUNDARY by ROM Boot FW only if CCFG_TI_OPTIONS.IDAU_CFG_ENABLE != 0xC5 |
| 20: ID_TZ_FLASH_NSC_BOUND_LOW | Bit[31:8]: Don’t Care Bit[7:0]: Boundary Address [7:0] |
|
| 21: ID_TZ_SRAM_NS_BOUND_HIGH | Bit[31:2]: Don’t Care Bit[1]: Boundary Address [8] Bit[0]: Boundary Address [7] |
SRAM Non-secure boundary address This address will
be written to PRCM:SRAMNSADDR.BOUNDARY by ROM Boot FW only if
|
| 22: ID_TZ_SRAM_NS_BOUND_LOW |
Bit[31:2]: Don’t
Care |
|
| 23: ID_TZ_SRAM_NSC_BOUND_HIGH | Bit[31:1]: Don’t Care Bit[0]: Boundary Address [8] |
SRAM Non-secure callable boundary address This address will
be written to PRCM:SRAMNSCADDR.BOUNDARY by ROM Boot FW only if
|
| 24: ID_TZ_SRAM_NSC_BOUND_LOW | Bit[31:2]: Don’t Care Bit[7:0]: Boundary Address [7:0] |
|
| 25: ID_CPU_LOCK_LOCKNSVTOR |
Bit[31:5]: Don’t
Care |
0 = Locked Lock/Unlock the Non-secure vector table base address |
| 26: ID_CPU_LOCK_LOCKSVTAIRCR |
Bit[31:4]: Don’t
Care |
0 = Locked Lock/Unlock the following regions:.
|
| 27: ID_CPU_LOCK_LOCKSAU |
Bit[31:3]: Don’t
Care |
0 = Locked Lock/Unlock the SAU regions |
| 28: ID_CPU_LOCK_LOCKNSMPU |
Bit[31:2]: Don’t
Care |
0 = Locked Lock/Unlock the Non-secure MPU |
| 29: ID_CPU_LOCK_LOCKSMPU | Bit[31:1]: Don’t Care Bit[0]: Lock/Unlock |
0 = Locked Lock/Unlock the Secure MPU |
| 30: ID_DEB_AUTH_INTSPNIDEN |
Bit[31:4]: Don’t
Care |
Internal Secure non-invasive debug enable. Overrides the external Secure non-invasive debug authentication interfaces. This value will be written to CPU_DCB:DAUTHCTRL.INTSPNIDEN by ROM boot FW |
| 31: ID_DEB_AUTH_SPNIDENSEL |
Bit[31:3]: Don’t
Care |
Secure non-invasive debug enable select. Selects between DAUTHCTL and the eternal authentication interface for control of Secure non-invasive debug. This value will be written to CPU_DCB:DAUTHCTRL.SPNIDENSEL by ROM boot FW. |
| 32: ID_DEB_AUTH_INTSPIDEN |
Bit[31:2]: Don’t
Care |
Internal Secure invasive debug enable. Overrides the external Secure invasive debug authentication interfaces. This value will be written to CPU_DCB:DAUTHCTRL.INTSPIDEN by ROM boot FW |
| 33: ID_DEB_AUTH_SPIDENSEL | Bit[31:1]: Don’t Care Bit[0]: Debug Select/De-select |
Secure invasive debug enable select. Selects between DAUTHCTL and the eternal authentication interface for control of Secure invasive debug. This value will be written to CPU_DCB:DAUTHCTRL.SPIDENSEL by ROM boot FW. |
| 34: ID_BUS_CFG | Bit[31:8]: Don’t Care Bit[7:0]: Bus CFG |
Bus interconnect security and firewall configuration. This value will be written to PRCM:BUSSECCFG.BUS_CFG by ROM boot FW. |