Secure JTAG for i.MXRT1160

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Secure JTAG for i.MXRT1160

911 Views
gsbalajikrishnan
Contributor II

Hi Team,

I am using iMXRT1160 for my project.

1. In HAB-Open board, I tried to connect the board using jlink without writing the password on JTAG specific register, I can read and connect the target through JTAG successfully.

gsbalajikrishnan_0-1673341567178.png

2. In HAB-Closed, I have written the 128-bit character as JTAG password on JTAG_RESP [127:0] in order to Secure JTAG debug mode and locked the JTAG_RESP_RLOCK [3:0] efuse register.

To run and read secure JTAG mode successfully, I used to follow the reference Secure JTAG for i.MXRT1170 (nxp.com).

Then, I did the following procedure that was given in the AN13133.pdf

jlink.exe -JLinkScriptFile NXP_RT1160_SecureJTAG.JlinkScript -device CORTEX-M7 -if JTAG -speed 30 -autoconnect 1 -JTAGConf -1, -1

 

gsbalajikrishnan_2-1673348924844.png

gsbalajikrishnan_3-1673348958224.png

gsbalajikrishnan_1-1673344400102.png

I could not connect the target board after doing the steps referred in AN13133.pdf

Now, I would like to know how i can set and change the JTAG_MOD pin settings and the JTAG_MOD pin is connected with R403 (10k) resistor by default the pin is set with 0 in board. Should I need to solder the pin?

Kindly let me know, is there any procedure to follow?

Thanks & Regards,

Balajikrishnan.G.S

 

 

 

 

0 Kudos
Reply
3 Replies

844 Views
gsbalajikrishnan
Contributor II

Hi...

I have given the steps in last queries that was completely wrong and followed for i. MXRT1060. forSecure JTAG Mode. 

For i. MXRT1160 Secure JTAG Mode, I have written the 128-bit character as JTAG password on JTAG_RESP [127:0] in order to Secure JTAG debug mode and locked the JTAG_RESP_RLOCK [3:0] efuse register.

To run and read secure JTAG mode successfully, I used to follow the reference Secure JTAG for i.MXRT1170 (nxp.com).  in which JTAG_MOD pin settings has not been mentioned in the script and Default JTAG_MOD logic is 0 whenever we check the JTAG_MOD pin.

Then, I did the following procedure that was given in the AN13133.pdf and I have provided the secure jtag script that i followed.

int InitTarget(void) {
int v;
int Key0;
int Key1;
int Key2;
int Key3;

// Secure response stored @ [0xcb0-0xce0] in eFUSE region (OTP memory)
Key0 = 0x12345678;
Key1 = 0x12345678;
Key2 = 0x12345678;
Key3 = 0x12345678;

JLINK_CORESIGHT_Configure("IRPre=0;DRPre=0;IRPost=0;DRPost=0;IRLenDevice=4");
CPU = CORTEX_M7;

JLINK_SYS_Sleep(100);
JLINK_JTAG_WriteIR(0x9); // Output Challenge instruction 0b1001

// Readback Challenge, Shift 64 dummy bits on TDI, receive Challenge bits on TDO
JLINK_JTAG_StartDR();

JLINK_JTAG_WriteDRCont(0xffffffff, 32); // 32-bit dummy write on TDI / read 32 bits on TDO
v = JLINK_JTAG_GetU32(0);
JLINK_SYS_Report1("Challenge UUID0:", v);

JLINK_JTAG_WriteDREnd(0xffffffff, 32);
v = JLINK_JTAG_GetU32(0);
JLINK_SYS_Report1("Challenge UUID1:", v);

JLINK_JTAG_WriteIR(0x1); // Input Response instruction 0b0001

JLINK_JTAG_StartDR();
JLINK_JTAG_WriteDRCont(Key0, 32);
JLINK_JTAG_WriteDRCont(Key1, 32);
JLINK_JTAG_WriteDRCont(Key2, 32);
JLINK_JTAG_WriteDREnd(Key3, 32);

return 0;
}

jlink.exe -JLinkScriptFile NXP_RT1160_SecureJTAG.JlinkScript -device CORTEX-M7 -if JTAG -speed 30 -autoconnect 1 -JTAGConf -1, -1

I can't connect the target properly after doing the above-mentioned steps and I attached the result below.

gsbalajikrishnan_0-1674134945957.png

 

How to connect the target board for i. MXRT1160 Secure JTAG Mode?

Kindly let me know is there any procedure need to follow.

 

 

0 Kudos
Reply

800 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

The steps are correct. I suggest you verify that the keys are correct. Additionally, once Secure JTAG is enabled I suggest you try to connect JTAG bypassing the secure state through software, please consult chapter 2.4 for more details.

Best regards,
Omar

0 Kudos
Reply

878 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
I hope you are well. 

Yes, the user should do it manually by changing the pin polarity on board. If the pin is routed to the JTAG connector and the tool supports the control of this signal, the tool can do it automatically.

Best regards,
Omar

0 Kudos
Reply