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.

TMS320F28377D: CSM Reading

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

  • Hi Rahul,

    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. 

    You mean same function was working earlier and now not working ? If Zone is unlock then you should be able to read the OTP values. Did you check the value of UNSECURE bit in Z1_CR register ?

    Regards,

    Vivek Singh

  • Thanks for the response Vivek it worked correctly there was some other problem related to other part of the code.

    Wanted to confirm one more thing can we read Zone1 OTP area by code running from the Zone1 WITHOUT unlocking it ? 

  • Rahul,

    All the values except password are available in memory map registers so that can be read. Password can not be read when zone is locked. User need to unlock the zone to read the password values.

    Regards,

    Vivek Singh