Code Security Module (CSM)
155
SPRUHE8E – October 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
System Control and Interrupts
1.10.3.6 ECSL Disable Considerations for any Zone
Case 1 and Case 2 provide ECSL disable considerations for any Zone.
Case 1:
A secure zone with ECSL enabled should have a predetermined ECSL password stored in the ECSL
password locations in flash. The following are steps to disable the ECSL for any particular zone:
1. Perform a dummy read of ECSL password locations of that zone.
2. Write the password into the ECSLKEYx registers corresponding to that zone.
3. If the password is correct, the ECSL gets disabled; otherwise, it stays enabled.
Case 2:
A secure zone with ECSL disabled should have 0x FFFF FFFF FFFF FFFF (64 bits of all ones) stored in
the ECSL password locations of that zone. The following are steps to use this zone:
1. At reset, the ECSL will be locked hence any access to secure memory will terminate the JTAG
connection.
2. Perform a dummy read of the ECSL password locations.
3. Since the ECSL password is all ones, this alone will unlock the specific secure zone. Now onwards any
access to secure memories associated with that particular zone will not cause termination of JTAG
connection.
NOTE:
Even if a secure zone’s ECSL is not locked with a password (all password locations all
ones), the ECSL will be locked at reset. Thus, a dummy read operation must still be
performed for that zone prior to any access to the memories associated with that zone. The
Boot ROM code does these dummy reads for all the zones for convenience. Also if the CSM
of a zone gets unlocked, ECSL also gets disabled for that zone.
1.10.3.6.1 C Code Example to Disable ECSL for C28x-Zone1
volatile long int *ECSL = (volatile int *)0x000AF0; //ECSL register file
volatile long int *ECSLPWL = (volatile int *)0x0013FFF4; //ECSL Password location
volatile int tmp;
int I;
// Read the 64-bits of the password locations (PWL)
// in flash at address 0x3F 7FF8 - 0x3F 7FFF
// If the zone is secure, then the values read will
// not actually be loaded into the temp variable, so
// this is called a dummy read.
for (i=0; i<2; i++) tmp = *+;
// If the ECSL password locations (ECSLPWL) are all = ones (0xFFFF),
// then the ECSL will now be disbale. If the password
// is not all ones (0xFFFF), then the code below is required
// to disable the ECSL.
// Write the 64-bit password to the ECSLKEY registers
// If this password matches that stored in the
// ECSLPWL then ECSL will get disable. If it does not
// match, then the zone will remain secure.
// An example password of:
// 0x1111222233334444 is used.
*ECSL++ = 0x22221111; // Register ECSLKEY0 at 0xAF0
*ECSL++ = 0x44443333; // Register ECSLKEY1 at 0xAF2
shows different conditions for any zone's ECSL to be secure or non-secure.