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.

TMS570LC4357: TMS570LC4357 LaunchPad unlocking problem after its AJSM locking

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Hello QJ.

I locked my TMS570LC4357 based launchpad with AJSM and now I experience a problem to unlock it.
I followed the described in the spna232 instructions.
Before device locking I generated a corresponded .dat file with AJSM port.
Then I generated an AJSM key with Halcogen and programmed a corresponded OTP memory region with this generated key. I checked in the CCS memory browser that the programmed memory values are equal with a key (correct memory programming).
After that I unpowered the launchpad and powered it again.
To unlock the device with 'dbgauth' utility I use the generated before .dat file and the generated by Halcogen key for unlocking.
I attach the .dat file to this thread. And the file with generated by Halcogen keys I send to your e-mail directly to prevent to discover it.
My tools versions:
  - CCS: 8.3.1.00004
  - Emupack: 8.4.0.00006
  - Halcogen: 04.07.00

I use the next command line to unlock the device:
'dbgauth -c 570LC43-Lnx-WithAjsmPort.dat -s ajsm -t cortexr5 -k xxx_generated_unlock_key -m 1'
where 'xxx_generated_unlock_key' is the generated by Halcogen unlock key.
but I get the next message on my try to unlock it:

----------------
Using board config file:
C:\TI\ccsv8\ccs_base\common\uscif\570LC43-Lnx-WithAjsmPort.dat
Connecting to target device...
Scanning unlock key value...
Testing that the device is unlocked...
Disconnected from target.
The unlock routine failed; the target device is still locked.
Check the unlock key and board configuration.
----------------


So I experience a problem with my launchpad unlocking. Could you please help me?
Could you please check if my .dat file is correct. I followed the described instructions on its generation, but I am not sure still that it is correct. If my .dat file is incorrect - please share with me a correct one.
And could you please check if the generated key works fine on your device and you may successfully unlock your device with the corresponded generated unlock code in my HL_ajsm.asm file?

Thanks in advance for your help,
Oleg


  • QJ,

    I cannot attach the .dat file here so I will email it to you directly.

  • Hello Oleg,

    I will take a look, and come back to you soon.

  • The unlock key generated by HALCoGen 4.07.00 is not correct. The byte 0 and byte 3 are swapped, and byte 1 and byte 2 are swapped.

    Please correct the key first before unlcoking the JTAG.

    Example:

    The unlock key generated by HALCoGen:

    ;/****************************************************************************/
    ;
    ; dbgauth key : be2d7c7afde9fbd6bdff7bff84f909f2
    ;
    ; unlock key bits 31:00 = 0x84f909f2
    ; unlock key bits 63:32 = 0xbdff7bff
    ; unlock key bits 95:64 = 0xfde9fbd6
    ; unlock key bits 127:96 = 0xbe2d7c7a

    ;/****************************************************************************/

    The corrected unlock key is:

    ;/****************************************************************************/
    ; corrected unlock code: 7a7c2dbed6fbe9fdff7bffbdf209f984

    ;
    ; unlock key bits 31:00 = 0xf209f984
    ; unlock key bits 63:32 = 0xff7bffbd
    ; unlock key bits 95:64 = 0xd6fbe9fd
    ; unlock key bits 127:96 = 0x7a7c2dbe
    ;
    ;/****************************************************************************/

    command to unlock in CMD terminal:

    C:\\ti\\ccsv8\\ccs_base\\common\\uscif\\dbgauth.exe -c C:\\Users\\xxxxxx\\AppData\\Local\\TEXASI~1\\CCS\\ti\\1\\0\\BrdDat\\testBoard.dat -s ajsm -t cortexr5 -k 7a7c2dbed6fbe9fdff7bffbdf209f984 -m 1");

  • Thanks a lot QJ!!!

    Your recommendation resolves my problem!
    I swapped the key value bytes as you described and now I am able to unlock my device successfully!
    Thanks again!

    It would be good if somewhere it would be mentioned (for example, in spna232) that it is required to use the last version of Halcogen for key generation and that the previous version of Halcogen generates unlock key incorrectly.

    Also please tell me if the reported by me CCS GUI AJSM bug had been resolved.

    Thanks and regards,
    Oleg.

  • Hello Oleg,

    I reported this bug several years ago. It supposed to be solved in the latest HAL release.

    You can add the unlock process to the GEL file to save you time. spna232 should have the example of updating the gel file to unlock the ajsm.

  • Thank you QJ for your suggestion.
    I follow this way.