Part Number: TMS320F28377D
I am trying to read CSM OTP area of after following the unlocking procedure but not able to read the programmed values correctly. (See Lines 21 to 23)
It returns ALL_0's any idea why ? Here's the snipped of the code
Also, I am sure the password is correct, we have been using the same function to unlock the protected area successfully to perform write erase operations.
void DCSMUnsecureZone_D()
{
int i;
volatile long int *CSM = (volatile long int *)0x5F010; // CSM register file
volatile long int *CSMPWL = (volatile long int *)0x78028; // CSM password file
volatile long int *OTP_Ptr = (volatile uint16_t *)0x78020; // CSM password file
volatile int tmp;
EALLOW;
// Dummy read of CSM password file required from unsecure zone to unlock DCSM
for(i = 0; i < 4; i++) {
tmp = *CSMPWL++;
}
*CSM++ = PASSWORD; //DcsmZ1Regs.Z1_CSMKEY0
*CSM++ = PASSWORD; //DcsmZ1Regs.Z1_CSMKEY1
*CSM++ = PASSWORD; //DcsmZ1Regs.Z1_CSMKEY2
*CSM++ = PASSWORD; //DcsmZ1Regs.Z1_CSMKEY3
ptr_shared_data_to_user->DebugReg[3] = OTP_Ptr[0];
ptr_shared_data_to_user->DebugReg[4] = OTP_Ptr[4];
ptr_shared_data_to_user->DebugReg[5] = OTP_Ptr[8];
EDIS;
}
Thanks