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.

CCS/RM46L852: unlocking the protected device

Part Number: RM46L852
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Hi,

I have problem with unlocking the locked RM46L852 device. I am using my own development board, the CCS in version 6.2.0.00050 and XDS200 USB debugger. 

I have programmed the AJSM location in OTP memory with some test pattern of AJSM keys, generated in Halcogen. It is the test pattern key, so I can share the content of ajsm.asm file:

----------------------------------------------------------------------------------------------------------------------------------------------------------

.sect ".ajsm"
.arm

AJSM0 .word 0x2DBC7B78U
AJSM1 .word 0x0DC61B8CU
AJSM2 .word 0x94D129A0U
AJSM3 .word 0x9AA33545U


.sect ".ajsmecc"
.arm

AJSMECC0 .byte 0x2CU
AJSMECC1 .byte 0x00U


;/****************************************************************************/
;
; For the above visible key selected, for unlocking scan pattern below
;
; dbgauth key : 654ccaba6b2cd65ef239e473c2418487
; CCS:
; unlock key bits 31:00 = 0xc2418487
; unlock key bits 63:32 = 0xf239e473
; unlock key bits 95:64 = 0x6b2cd65e
; unlock key bits 127:96 = 0x654ccaba
;
;/****************************************************************************/

----------------------------------------------------------------------------------------------------------------------------------------------------------

The programming of AJSM was succesful and I try to unlock the device and it not work. I obtain an error message:

Connecting to target device...
Disconnected from target.
A scan manager error (-414) occurred:
Failed to find the specified device name in the board config info'.

I followed the unlock steps as in the post https://e2e.ti.com/support/microcontrollers/hercules/f/312/p/686560/2530171#2530171

The "Test conenction" seems to be OK:

----------------------------------------------------------------------------------------------------------------------------------------------------------

[Start: Texas Instruments XDS2xx USB Debug Probe]

Execute the command:

%ccs_base%/common/uscif/dbgjtag -f %boarddatafile% -rv -o -S integrity

[Result]


-----[Print the board config pathname(s)]------------------------------------

C:\Users\TLEHOT~1\AppData\Local\TEXASI~1\
CCS\ti\0\0\BrdDat\testBoard.dat

-----[Print the reset-command software log-file]-----------------------------

This utility has selected a 560/2xx-class product.
This utility will load the program 'xds2xxu.out'.
The library build date was 'Jul 27 2016'.
The library build time was '17:54:51'.
The library package version is '6.0.407.3'.
The library component version is '35.35.0.0'.
The controller does not use a programmable FPGA.
The controller has a version number of '13' (0x0000000d).
The controller has an insertion length of '0' (0x00000000).
This utility will attempt to reset the controller.
This utility has successfully reset the controller.

-----[Print the reset-command hardware log-file]-----------------------------

This emulator does not create a reset log-file.

-----[Perform the Integrity scan-test on the JTAG IR]------------------------

This test will use blocks of 64 32-bit words.
This test will be applied just once.

Do a test using 0xFFFFFFFF.
Scan tests: 1, skipped: 0, failed: 0
Do a test using 0x00000000.
Scan tests: 2, skipped: 0, failed: 0
Do a test using 0xFE03E0E2.
Scan tests: 3, skipped: 0, failed: 0
Do a test using 0x01FC1F1D.
Scan tests: 4, skipped: 0, failed: 0
Do a test using 0x5533CCAA.
Scan tests: 5, skipped: 0, failed: 0
Do a test using 0xAACC3355.
Scan tests: 6, skipped: 0, failed: 0
All of the values were scanned correctly.

The JTAG IR Integrity scan-test has succeeded.

-----[Perform the Integrity scan-test on the JTAG DR]------------------------

This test will use blocks of 64 32-bit words.
This test will be applied just once.

Do a test using 0xFFFFFFFF.
Scan tests: 1, skipped: 0, failed: 0
Do a test using 0x00000000.
Scan tests: 2, skipped: 0, failed: 0
Do a test using 0xFE03E0E2.
Scan tests: 3, skipped: 0, failed: 0
Do a test using 0x01FC1F1D.
Scan tests: 4, skipped: 0, failed: 0
Do a test using 0x5533CCAA.
Scan tests: 5, skipped: 0, failed: 0
Do a test using 0xAACC3355.
Scan tests: 6, skipped: 0, failed: 0
All of the values were scanned correctly.

The JTAG DR Integrity scan-test has succeeded.

[End: Texas Instruments XDS2xx USB Debug Probe]

----------------------------------------------------------------------------------------------------------------------------------------------------------

I am attaching the testBoard.dat file.3225.testBoard.dat

In Windows command line I run :

What can be the reason for this unsuccessful unlock? 

Thanks for help!

Best regards,

Tomas

  • Hello,

    1. Please store the attached xml file to: C:\ti\ccsv6\ccs_base\common\targetdb\devices\

    4682.rm46l852_secure.xml

    2. create a folder \ajsm in C:\ti\ccsv6\ccs_base\emulation\gel\, then save the attached two gel files to C:\ti\ccsv6\ccs_base\emulation\gel\ajsm\

    2134.ajsm_util.gel

    0763.dap_util.gel

    3. Generate board file using the new xml file:

    4. then use dbgauth to unlock the JTAG

    C:\ti\ccs6\ccs_base\common\uscif\dbgauth.exe -c C:\Users\...\AppData\Local\TEXASI~1\CCS\ti\1\0\BrdDat\testBoard.dat -s ajsm -t cortexr4 -k 654ccaba6b2cd65ef239e473c2418487 -m 1

  • Hi QJ,

    thank you for your support - with your files I can succesfful unlock the device! 

    We will be use in the future another RM4x devices(RM42, RM44,..). So I expect, that similar "problem" with unlock happens again. So the question is, if am I able to generate the similar "to be unlock files" myself. Especially, the unlock *xml file. I expect that gel files, you have posted, can be used for every RM4x device.
    Exist some step-by-step tutorial how to generate the unlock xml file?

    Thank you for your answer!

    Best regards,

    Tomas

  • Hi Tomas,

    1. The gel files can be used for every Hercules devices.

    2. Fox xml file:

        The original xml file for Hercules devices are located in C:\ti\ccsvX\ccs_base\common\targetdb\devices\

        Please copy the existing *.xml in the devices folder and append _secure to the filename

        IE. RM42.xml to RM42_secure.xml

    These are the changes:

    1. Line 7: Add " (SECURE" to the description. <device id=”RM42”… desc=”RM42 (SECURE)

    2. Add Line 18 below DAP GEL:
       <property Type="filepathfield" Value="../../emulation/gel/ajsm/dap_util.gel" id="GEL File"/>

    3. Add Line 98 AJSM PORT18 below PORT17:

    <subpath desc="Port18" id="Port18">
         <property Type="numericfield" Value="18" id="Port Number"/>
              <instance XML_version="1.2" desc="AJSM" href="cpus/ajsm.xml" id="AJSM" xml="ajsm.xml" xmlpath="cpus"/>
              <cpu HW_revision="1.0" XML_version="1.2" description="AJSM" deviceSim="false" id="AJSM" isa="AJSM">
                  <property Type="filepathfield" Value="../../emulation/gel/ajsm/ajsm_util.gel" id="GEL File"/>
              </cpu>
    </subpath>