S32K14x JTAG lock

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

S32K14x JTAG lock

1,785 Views
zhou_gaga
Contributor I

I use backdoor_key_verify to implement JTAG unlock, and CAN send FTFC-&gt before and after using backdoor_key_verify; The FSEC state, we see from the beginning FSEC[SEC]=11b changes to FSEC[SEC]=10b, so the jtag unlocked, but I still won't get through the J-FLASH burning program.

0 Kudos
Reply
8 Replies

1,771 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @zhou_gaga,

The MCU stays unloked as long as the MCU is not reset.

After any reset, the MCU is locked again.

So, the programmer must not reset the MCU.

Please contact SEGGER support if you want to reprogram the MCU using J-Flash.

 

Thank you,

BR, Daniel

0 Kudos
Reply

1,768 Views
zhou_gaga
Contributor I
Do you mean that j-flash burning program will cause a reset? In addition, j-flash read back to flash is also failed. So I wanted to know exactly what the unlocked swd mode feature would do.
0 Kudos
Reply

1,763 Views
danielmartynek
NXP TechSupport
NXP TechSupport

For example, the PEMicro plugin in the S32DS IDE has this feature that allow connecting the programmer without reset.

danielmartynek_0-1676038785167.png

This way, we can attach the debugger while the MCU is unlocked and running.

For more information about the J-Flash flashing algorithm, please contact SEGGER.

 

Thank you,

BR, Daniel

0 Kudos
Reply

1,680 Views
zhou_gaga
Contributor I
Suddenly it can read. But I still have a question, if PE is configured as "Attach to Running Target", then will MCU load the previous program or the program of the current project? Also, if I unlock through backdoors, how do I burn new programs?
0 Kudos
Reply

1,661 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @zhou_gaga,

In the attach debug session, the MCU is not being programmed, it is just attached to the MCU while the MCU is running the previously loaded project.

I would recommend contacting PEMicro support and ask for an algorithm the does not reset the MCU before the flashing.

You could also you J-link commander:

Once the MCU is unlocked, a special J-Link script is necessary, which can be found here: https://wiki.segger.com/S32Kxxx#Attach_to_debug_session

J-Link commander need to be called in the following way:

C:\Programm\SEGGER\JLink\JLink.exe -JLinkScriptFile NXP_Kinetis_S32_Attach.JLinkScript

Then, the MCU is not reseted and access to all memory and registers is possible.

You can try to load the project via the commander.

Or please contact SEGGER support.

 

Regards,

Daniel

 

0 Kudos
Reply

1,738 Views
zhou_gaga
Contributor I
I tried the method you said, but the PE displayed "Warning: Unable to go to background. Core is running", but the CAN message showed FSEC[SEC]=10b (unsecured).
0 Kudos
Reply

1,719 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @zhou_gaga,

You are supposed to get a warning, the core is running.

The debugger is attached to a running target.

Can you halt the execution?

danielmartynek_0-1676365764660.png

Regards,

Daniel

0 Kudos
Reply

1,760 Views
zhou_gaga
Contributor I

Besides, can I burn a new program after jtag unlocked? If so, how to operate it?

0 Kudos
Reply