Code Security Module (CSM)
151
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
System Control and Interrupts
1.10.3.3 Unsecuring Considerations for Zones With/Without Code Security
Case 1 and Case 2 provide unsecuring considerations for zones with and without code security.
Case 1: Zone With Code Security
A zone with code security should have a predetermined password stored in the password locations of that
zone. The following are steps to unsecure any secure zone:
1. Perform a dummy read of the password locations of that zone.
2. Write the password into the CSMKEY registers.
3. If the password is correct, the zone becomes unsecure; otherwise, it stays secure.
Case 2: Zone Without Code Security
A zone without code security should have 0x FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF (128 bits of
all ones) stored in the password locations. The following are steps to use this zone:
1. At reset, the CSM will lock memory regions protected by the CSM.
2. Perform a dummy read of the password locations.
3. Since the password is all ones, this alone will unlock the zone, and all secure memories dedicated to
that zone are fully accessible immediately after this operation is completed.
NOTE:
Even if a zone is not protected with a password (all password locations all ones), the CSM
will lock at reset. Thus, a dummy read operation must still be performed on these zones prior
to reading, writing, or programming secure memory if the code performing the access is
executing from outside of the CSM protected memory region. The Boot ROM code does this
dummy read for convenience.
1.10.3.3.1 C Code Example to Unsecure C28x Zone1
volatile long int *CSM = (volatile long int *)0x000AE0; //CSM register file
volatile long int *CSMPWL = (volatile long int *)0x0013FFF8; //CSM Password location
volatile int tmp;
int I;
// Read the 128-bits of the CSM password locations (PWL)
//
for (i=0; i<4; i++) tmp = *+;
// If the password locations (CSMPWL) are all = ones (0xFFFF),
// then the zone will now be unsecure. If the password
// is not all ones (0xFFFF), then the code below is required
// to unsecure the CSM.
// Write the 128-bit password to the CSMKEY registers
// If this password matches that stored in the
// CSLPWL then the CSM will become unsecure. If it does not
// match, then the zone will remain secure.
// An example password of:
// 0x11112222333344445555666677778888 is used.
*CSM++ = 0x22221111; // Register CSMKEY0 at 0xAE0
*CSM++ = 0x44443333; // Register CSMKEY1 at 0xAE2
*CSM++ = 0x66665555; // Register CSMKEY2 at 0xAE4
*CSM++ = 0x88887777; // Register CSMKEY3 at 0xAE6