S32K118 - JTAG lock

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

S32K118 - JTAG lock

Jump to solution
2,643 Views
JiriTak
Contributor II

Hello, is there chance to read out memory content if MCU is secured for JTAG connection using flash configuration bytes. Also is configured backdoor access key (which is known) and mass erase is disabled.

I am able to unlock MCU in application (content of FSEC_SEC is 10b) and also can perform mass erase from application. But I would like to have an option to connect to this device and read content of MCU using debugger. I am using the Segger j-link Plus debugger and IAR studio. Is it possible to be able e.g. via j-link commander to connect to MCU and read the memory content?

 

Thanks and regards,

Jiri

0 Kudos
1 Solution
2,611 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Once the MCU has been unlocked via the Backdoor key, it stays unlocked until the MCU is reset.

So, the debugger must not reset the MCU, the debugger has to be just attached to the running MCU.

Please read this article:

Attaching to a Running Target with Segger J-Link, GDB and Eclipse

https://mcuoneclipse.com/2015/03/20/attaching-to-a-running-target-with-segger-j-link-gdb-and-eclipse...

 

Thanks,

Daniel

View solution in original post

0 Kudos
6 Replies
2,609 Views
JiriTak
Contributor II

Thank you for this, I will ask then Segger, if they can help me. I am using IAR Embeded Workbench and not Eclipse.

0 Kudos
2,627 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Jiri,

The debugger cannot read the content of the MCU if the MCU is secure (FSEC_SEC != 10b).

The MCU needs to be unlocked first (FSEC_SEC == 10b).

The debugger can only mass erase the MCU to unlock it provided this option is enabled (FSEC_MEEN != 10b).

 

Regards,

Daniel

 

0 Kudos
2,626 Views
JiriTak
Contributor II

Hello Daniel,

yes I know about this. My question is, if debugger, can unlock device via JTAG/SWD?

Jiri

0 Kudos
2,621 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Only through mass erase.

The debugger can access the MDM-AP status and control registers.

Please refer to the RM, Section 58.6.

 

Regards,

Daniel

0 Kudos
2,616 Views
JiriTak
Contributor II

Ok, another question. If I unlock MCU in application (e.g. sent via LIN/UART/... key, and sucessfully compared), will be able to read out memory? Tried using J-Flash, but it always return error, that it cannot access the memory.

0 Kudos
2,612 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Once the MCU has been unlocked via the Backdoor key, it stays unlocked until the MCU is reset.

So, the debugger must not reset the MCU, the debugger has to be just attached to the running MCU.

Please read this article:

Attaching to a Running Target with Segger J-Link, GDB and Eclipse

https://mcuoneclipse.com/2015/03/20/attaching-to-a-running-target-with-segger-j-link-gdb-and-eclipse...

 

Thanks,

Daniel

0 Kudos