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 DEVICESDevice 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.

../_images/device_configuration_cc23xx.png

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

../_images/bootloader_configuration_cc23xx.png

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.

  1. Allow SWD Debug Port: controls the SWD Debug Port to allow debugging. If enabled, debug access is still dependent on the Debug ConfigurationDebug Authorization Configuration setting.

  2. Allow Flash Verify: checks the integrity of the flash content against a CRC32 value, and it does not return any flash contents.

  3. Allow Flash Program: allows to make changes to flash through SACI commands after initial programming.

  4. Allow Chip Erase: allows the device to be reprogrammed through SACI or ROM serial Bootloader.

  5. 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.

../_images/enable_CCFG_sector_protection.png
  1. Lock the debug access and make it available only after a chip erase:

    1. Go to SysConfig → TI Devices → Device Configuration → “Device Permission Settings” and disable the Allow SWD Debug Port. You can additionally disable Allow Flash program and Allow Flash Verify if that helps meet your security goals. Make sure to keep Allow Chip Erase enabled.

      ../_images/ccfg_permissions.png
    2. Go to SysConfig → TI Devices → Device Configuration → “Debug Configuration” and select Debug not allowed inside the Debug Authorization Configuration field.

      ../_images/disable_debug_ccfg.png
    3. Save the modifications, build and flash the device.

    4. 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.

    5. 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.

    6. 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 the New Configuration window. Once connected you can perform an erase but cannot read back any memory contents.

      ../_images/chiperase_UniFlash.png
  1. Enable debug access with authentication:

    1. Go to SysConfig → TI Devices → Device Configuration → “Device Permission Settings” and enable Allow SWD Debug Port. You can however disable Allow Flash program and Allow Flash Verify if that helps meet your security goals. Make sure to keep Allow Chip Erase enabled.

      ../_images/ccfg_permissions_enableSWD.png
    2. Go to SysConfig → TI Devices → Device Configuration → “Debug Configuration” and select Require debug authentication inside the Debug Authorization Configuration field.

      ../_images/authenticate_debug_ccfg.png
    3. 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.

    4. Use an online SHA256 tool to calculate the hash.

      ../_images/sha256_tool.png

      Note

      The default password is “Open Sesame!” to produce the default hash in SysConfig.

    5. 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.

    6. Populate SysConfig with the values found from the above steps.

      ../_images/require_debug_authentication.png
    7. Save the SysConfig file, re-build the project, and flash the CC23xx or CC27xx device.

    8. 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.

      ../_images/debug_error.png

      To resolve this, right-click on the ProjectDebug AsDebug Configurations. Then select your active project, enter TargetFlash Settings tab, and set the debug password according to the Device Configuration (CCFG) settings.

      ../_images/debug_flash_settings_password.png
    9. Click on Apply and Debug to proceed with a typical debug session.