SPRUJF8 May 2026 TMS320F28P551SG
volatile long int *CSMKEY = (volatile long int *)0x5F010; //CSM Key register file volatile
long int *CSMPSWD = (volatile long int *)0x78020; //CSM Password location (assuming default Zone Select Block)
volatile long int tmp;
int I;
// Read the 128-bits of the CSM password locations
//
for (I=0;I<4; I++) tmp = *CSMPSWD++;
// Write the 128-bit password to the CSMKEY registers
// If this password matches that stored in the CSLPWL,
// then the CSM becomes unsecure. If this password does not match,
// then the zone remains secure.
// An example password of: // 0x11112222333344445555666677778888 is used.
*CSMKEY++ = 0x22221111; // Register Z1_CSMKEY0 at 0x5F010
*CSMKEY++ = 0x44443333; // Register Z1_CSMKEY1 at 0x5F012
*CSMKEY++ = 0x66665555; // Register Z1_CSMKEY2 at 0x5F014
*CSMKEY++ = 0x88887777; // Register Z1_CSMKEY3 at 0x5F016