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.

TMS320F2809: How to unlock a TMS320F2809 (CCS 5.5) ?

Part Number: TMS320F2809
Other Parts Discussed in Thread: UNIFLASH

Context

 

Target : TMS320F2809 on a custom board ;

Code Composer Version :

(no choice, it is an old project by my predecessor colleague how did not use an emulator)

Emulation : Spectrum Digital XDS100v2

 

Tries

 

Regarding http://software-dl.ti.com/ccs/esd/documents/ccsv7_debugging_jtag_connectivity_issues.html#c28x-device-locked (Note: It is not my CCS version, but it is a way.)

 

First try

Regarding,

https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/489852/1768334

 

From the first message by Vivek Singh, in Boot Mode SCI, I have :

So I do not have 0x0000 for all keys.

 

(currently, I do not know the definition/description of CSMSCR/SECURE register)

 

Second try

If I try to unlock on the "On-Chip Flash" view, with the [Unlock] button,

 

I have :

 

And Console said me,

Note 1 : Impossible to erase the Flash, same error :

 

Note2 : I was connected,

 

 

Third try

Try with UniFlash

I have the same results for Unlock device action, Erase memory action and Password content at memory address.

 

I have try too to erase all sectors exception for Sector A, as described in https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/248836?F2806x-Flash-locked (solution by Manoj, frist message by him)

=> Same error "[ERROR] C28xx: Flash Programmer: Error erasing flash memory. Device is locked or not connected. Operation cancelled" ;

 

Depletion recovery action failed too => "[ERROR] C28xx: Flash Programmer: Error when performing depletion recovery. Device is locked or not connected. Operation cancelled."

 

Questions

 

  1. Regarding,

https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/489852/1768334

From the last message by Vivek Singh,

  1. I do not know how have information from .map. In fact, I have :

CSM_PWL               003f7ff8   00000008 00000008 00000000 RWIX

CSM                   00000ae0   00000010 00000010 00000000 RWIX

csm_rsvd   0   003f7f80   00000076    

                 003f7f80   00000076     DSP280x_CSMPasswords.obj (csm_rsvd)

csmpasswds

*         0   003f7ff8   00000008    

                 003f7ff8   00000008     DSP280x_CSMPasswords.obj (csmpasswds)

CsmRegsFile

*         1   00000ae0   00000010     UNINITIALIZED

                 00000ae0   00000010     DSP280x_GlobalVariableDefs.obj (CsmRegsFile)

CsmPwlFile

*         1   003f7ff8   00000008     UNINITIALIZED

                 003f7ff8   00000008     DSP280x_GlobalVariableDefs.obj (CsmPwlFile)

00000ae0     2b (00000ac0)     _CsmRegs

 

  1. In fact, I have in the <DSP280x_CSMPasswords.asm> file this content :

     .sect "csmpasswds"

 

     .int        0xFFFF                ;PWL0 (LSW of 128-bit password)

     .int        0xFFFF                ;PWL1

     .int        0xFFFF                ;PWL2

     .int        0xFFFF                ;PWL3

     .int        0xFFFF                ;PWL4

     .int        0xFFFF                ;PWL5

     .int        0xFFFF                ;PWL6

     .int        0xFFFF                ;PWL7 (MSW of 128-bit password)

       .sect "csm_rsvd"

       .loop (3F7FF5h - 3F7F80h + 1)

             .int 0x0000

       .endloop

 

  1. From .out file: I do not know how can I have password from it !???
  1. Have you a track to solve it or to explain my situation, for me, please?

 

Thanks.

  • Hi Julien,

    So I do not have 0x0000 for all keys.

    KEYx values are user entry and not the password value programmed. So this does not tells that passwords values are not ALL_0.

    You need to know the correct password to unlock the device. If you are using a device programmed by someone else and you do not know the password, nothing much can be done. You need to use new device and program new password values.

    Regards,

    Vivek Singh

  • Hi Vivek,

    Sorry, I have referenced to your first message of the thread : https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/489852/1768334

    Extract :
    "If you see all the content as 0x0 then device is indeed LOCK."

    So it is not my case. I precised that to exclude some tracks to solve my problem.

    You need to know the correct password to unlock the device. 

    Ok, but, sorry, I do know how to set the password. I have access to the Source Code and I do not have a setting from it. The assembler file <DSP280x_CSMPasswords.asm> does not contain specifical password. You have an extract in my first message.

    Thanks Vivek!

  • Hi,

    Extract :
    "If you see all the content as 0x0 then device is indeed LOCK."

    So it is not my case. I precised that to exclude some tracks to solve my problem.

    What do you mean by it it not your case. Do you see the flash content as non-zero value in CCS memory watch window? Can you post the snapshot of CCS memory watch window?

    Also please see following note in my last post.

    If you are using a device programmed by someone else and you do not know the password, nothing much can be done. You need to use new device and program new password values.

    Regards,

    Vivek Singh

  • Hi,

    Thanks again Vivek.

    Vivek Singh said:

    Extract :
    "If you see all the content as 0x0 then device is indeed LOCK."

    So it is not my case. I precised that to exclude some tracks to solve my problem.

    What do you mean by it it not your case.

    Regarding the screenshot of my Registers window, I do not have 0x0 but 0xFF ;

    Vivek Singh said:

    Do you see the flash content as non-zero value in CCS memory watch window? Can you post the snapshot of CCS memory watch window?

    Sure,

    Vivek Singh said:

    Also please see following note in my last post.

    If you are using a device programmed by someone else and you do not know the password, nothing much can be done. You need to use new device and program new password values.

    The custom board whare I am looking for debug with my XDS100v2 comes from factory. So it was never use to debug. I have access to the source code and I have given an extract to my assembler file (if it is the good source to known if a password was set). For me the password was never set, but I do not understand why the DSP is locked. Do you have some resources to know How To set a secured password?

    Regards,
    Julien MÊME.

  • Julien,

    The snapshot you have provided is for memory map registers and not the flash. You need to check the value in flash sectors.

    If password were never programmed then it could be possible that an ongoing flash operation got interrupted and that left the flash location including passwords as 0x0 hence device got permanent locked. In such case user need to use new device.

    Regards,

    Vivek Singh

  • Vivek,

    Vivek Singh said:

    The snapshot you have provided is for memory map registers and not the flash. You need to check the value in flash sectors.

    So I missed something. How to check the value in Flash sectors?

    Vivek Singh said:

    If password were never programmed then it could be possible that an ongoing flash operation got interrupted and that left the flash location including passwords as 0x0 hence device got permanent locked. In such case user need to use new device.

    RIP... Is there a register to know if the device is locked permanently?

    What is the register CSMSCR/SECURE (cf screenshot in my first post)?

    Regards,

    Julien MÊME.

  • Hi,

    What is the register CSMSCR/SECURE (cf screenshot in my first post)?

    Yes, you can check that bit also to make sure device is secure or not.

    Regards,

    Vivek Singh

  • Hi,

    Do you have any further queries on this?

    Vivek Singh

  • Hi Vivek,

    In fact, after change the device (sad and expensive), I can debug it normaly.

    Yes, I have some questions.

    1- How to have, from registers, the difference between "can be secure", in "secure mode" or "secured" (definitively locked?)?

    2- How to check the value in Flash sectors?

    Thanks,

  • Hi Julien,

      1- How to have, from registers, the difference between "can be secure", in "secure mode" or "secured" (definitively locked?)?

    There are only two state. Secure or non-secure and that can be checked by reading value of SECURE bit in CR register. We do not have a way to tell if the password values are ALL_0.

    [quote] When device is secure value in all the flash sector will show 0x0 in CCS memory watch window. After connecting to CCS, just open CCS memory watch window and enter flash address and it will show the value.

    Hope this clarifies.

    Regards,

    Vivek Singh

  • Thanks for all!