Device Configuration (CCFG)¶
After importing a SysConfig enabled Proprietary RF project into CCS, by double clicking
on the *.syscfg
file, a GUI will appear where the project can be configured
more easily. In the TI DEVICES → Device Configuration view, you can
modify the CCFG area of dedicated flash which is used by boot ROM and TI drivers
to configure the device through the ti_radio_config.c/h
files generated by
SysConfig.
This section will cover the most utilized features of the Device Configuration module.
Note
The CC23xx or CC27xx device must be re-programmed using the existing configuration for the new settings to take effect.
Low Frequency Clock Source: LF RCOSC can be selected instead of LF XOSC, but should only be done if the Proprietary RF configuration allows the additional LF clock inaccuracy which will be introduced
Bootloader Configuration¶
Default FCFG bootloader is the standard selection. This incorporates the following settings:
Serial Bootloader enabled
Serial IO Configuration Index 2 for UART RX/TX to DIO pins 22/20, respectively
Pin Trigger enabled for DIO 21, active low on reset
The Serial IO Configuration Index and Pin Trigger DIO for blank devices or FCFG default values are fully described in the ROM Serial Bootloader Interfaces section of the CC23xx SimpleLink Wireless MCU Technical Reference Manual. By using Default FCFG bootloader, with CCFG settings instead, users can select custom values for each of the above settings. Alternatively, Any bootloader forbidden will fully disable the bootloader.
Device Permission Settings¶
This is where device permissions are controlled. Some of the most relevant CCFG permissions are explained below.
Allow SWD Debug Port: controls the SWD Debug Port to allow debugging. If enabled, debug access is still dependent on the Debug Configuration → Debug Authorization Configuration setting.
Allow Flash Verify: checks the integrity of the flash content against a CRC32 value, and it does not return any flash contents.
Allow Flash Program: allows to make changes to flash through SACI commands after initial programming.
Allow Chip Erase: allows the device to be reprogrammed through SACI or ROM serial Bootloader.
Allow Return To Factory: provides only to Texas Instruments a way to unlock the device and do full failure analysis (including flash).
For more information on these CCFG permissions, and instructions for entering the SACI mode, please consult their respective sections within the CC23xx SimpleLink Wireless MCU Technical Reference Manual.
Flash Configurations for Debug and Production¶
In this section we will suggest two ways of locking the CC23xx or CC27xx devices Flash to avoid unwanted read operations while in production.
Note
Make sure to enable CCFG Sector protection by setting the Write/Erase Protection, CCFG Sector
flag in SysConfig as seen below.
Lock the debug access and make it available only after a chip erase:
Go to SysConfig → TI Devices → Device Configuration → “Device Permission Settings” and disable the
Allow SWD Debug Port
. You can additionally disableAllow Flash program
andAllow Flash Verify
if that helps meet your security goals. Make sure to keepAllow Chip Erase
enabled.Go to SysConfig → TI Devices → Device Configuration → “Debug Configuration” and select
Debug not allowed
inside theDebug Authorization Configuration
field.Save the modifications, build and flash the device.
Now the debug access is completely blocked and the debug access point is no longer available. The only access to the device is through SACI which does not provide any method for readback of the device contents.
To enter SACI again your tools will need to allow a sequence where the device is held in reset via the hardware pin reset and the SWD enable procedure is done. This is the state noted in the CC23xx SimpleLink Wireless MCU Technical Reference Manual section 8.3.
From SACI you can perform a full erase of the device, including CCFG which contains the debug and SWD access control fields. Once the full erase is complete then the device is back to state it was when you received it from TI. This erase procedure using SACI can be accomplished with UNIFLASH by enabling the
Apply pin reset when waking up from the dormant state
option inside theNew Configuration
window. Once connected you can perform an erase but cannot read back any memory contents.
Enable debug access with authentication:
Go to SysConfig → TI Devices → Device Configuration → “Device Permission Settings” and enable
Allow SWD Debug Port
. You can however disableAllow Flash program
andAllow Flash Verify
if that helps meet your security goals. Make sure to keepAllow Chip Erase
enabled.Go to SysConfig → TI Devices → Device Configuration → “Debug Configuration” and select
Require debug authentication
inside theDebug Authorization Configuration
field.Choose a password between 12 to 64 characters in multiples of four (i.e. 32-bit word length). Characters can be letters, numbers or special characters.
Use an online SHA256 tool to calculate the hash.
Select a 32-bit password-ID. This ID typically helps in case you want to have different passwords (e.g. if you want to update the password daily on the production line). That way, you can check the password-ID loaded on the device and look-up the password.
Populate SysConfig with the values found from the above steps.
Save the SysConfig file, re-build the project, and flash the CC23xx or CC27xx device.
Afterwards, starting a debug session in the chosen IDE (e.g. IAR or CCS) will produce the following error since the debugger has not been provided the chosen password.
To resolve this, right-click on the Project → Debug As → Debug Configurations. Then select your active project, enter Target → Flash Settings tab, and set the debug password according to the Device Configuration (CCFG) settings.
Click on Apply and Debug to proceed with a typical debug session.