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.

TMS320F280049C: TMS320F280049C device unlocking issue

Part Number: TMS320F280049C


Tool/software:

I am using the TMS320F280049C DSP. The boot mode is wait mode. The DCSM module is not initialized, but I am still getting the following error. I have tried different boot modes as well but getting the same error. Can you please help me to unlock the device. 

 

  • Hi Akshay,

    Have you always gotten this error with this device? Or did this only start happening after you attempted to program something in flash or RAM?

    Thank you,

    Luke

  • Hi Luke,

    Thank you for your reply.

    I have programmed numerous example projects into RAM and Flash without any issues. However, after flashing an old project from a different development team—which was programmed successfully—I am now encountering this error.

    Best Regards,

    Akshay

  • Can you send a screenshot of the memory browser starting at address 0x78000? I would like to evaluate whether there are any irregular values programmed at these locations.

    Thank you,

    Luke

  • Here it is:

    Thank You,

    Akshay

  • Based on this the device should be unlocked after reset. Do you have any source files for the project that caused this error? If you attempt to flash the device with the projects that work successfully, are you able to program, or this the device permanently unable to be reflashed?

    Thank you,

    Luke

  • Other programs work successfully. I have attached part of the code related to the code security module. 

    //****************************************************************
    //  Interface Function: PRG_unlock()
    //
    // Unlock the Code Security Module.
    //
    // Parameters:
    //
    // Return Value:
    //
    // Notes:
    //-------------------------------------------------------------------
    
    #pragma CODE_SECTION(PRG_unlock,"FlashBoot");
    
    void PRG_unlock(void)
    {
        volatile  Uint32 temp;
        volatile Uint32 *CSMPWL = (volatile Uint32 *)0x78028; //CSM Password location
    
        // Read the 128-bits of the CSM password locations (PWL)
    
        temp = *CSMPWL++;
        temp = *CSMPWL++;
        temp = *CSMPWL++;
        temp = *CSMPWL++;
    
        // 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.
    
        DcsmBank0Z1Regs.Z1_CSMKEY0 = 0xFFFF55AA;//0xFFFFFFFF;//
        DcsmBank0Z1Regs.Z1_CSMKEY1 = 0x47FFAA55;//0xFFFFFFFF;//
        DcsmBank0Z1Regs.Z1_CSMKEY2 = 0xFFFF5A5A;//0xFFFFFFFF;//
        DcsmBank0Z1Regs.Z1_CSMKEY3 = 0xFFFFA5A5;//0xFFFFFFFF;//
    }
    

  • Hi Akshay,

    The code you've shared will actually lock the DCSM module. Anytime the values in Z1_CSMKEY do not match the OTP passwords at address 0x78028, the DCSM will be locked. Since your GRABSECT values are all default, all of the securable flash will be inaccessible and unable to be reprogrammed.

    Could you comment out the PRG_unlock function call and see if you get the same behavior? You should not have to call this function since the OTP passwords are default(the Boot ROM code will unlock the DCSM for you).

    Thank you,

    Luke