This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2674R10: CCFG TrustZone Boundary Configuration

Part Number: CC2674R10
Other Parts Discussed in Thread: SYSCONFIG

Hello,

Could someone please help me to better understand how to configure the SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY parameter in the CCFG for a project that does not use the TrustZone?

The default value from source/ti/devices/cc13x4_cc26x4/startup_files/ccfg.c is 0x0, and the comments seem to suggest that this secures only the first 8KB of flash:

#ifndef SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY
#define SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY    0x0        // Min value; set all except the lowest 8KB of flash as nonsecure
//#define SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY  0x3FF      // Max value; all flash is secure-only
#endif

As such, I was surprised to see that the default value from SysConfig is 0x1. The SysConfig template for CC26XX (source/ti/devices/.meta/templates/ti_devices_CC26XX_config.c.xdt) states that 0x0 is a "special" value that makes the entire flash secure-only:

% if(!(system.modules["/ti/utils/TrustZone"])) {
// Set all of flash to non-secure, except the lowest 8 KB
#define SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY    0x1
% } else if(inst.markAllFlashSecure) {
// Set all of flash to secure-only access, using the special value of 0
#define SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY    0x0
% }

In light of this confusion, my questions are:

  • Does setting SET_CCFG_TRUSTZONE_FLASH_CFG_NSADDR_BOUNDARY to 0 secure the entire flash, or just the first 8KB?
  • Is it possible to set the entire flash as nonsecure? If so, how? If not, why?
  • What value would I use to secure the first 16KB of flash? (0x2?)

Thank you!
Peter