S32K146 MCU "Device is secure, Erase to unsecure"

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

S32K146 MCU "Device is secure, Erase to unsecure"

Jump to solution
1,832 Views
makouda
Contributor I

using S32K146 with Multilink and S32 design studio, I flashed the memory area 0x0-0x500 with 0xFF.

thus the option bytes are overwritten

Then when I try to flash, I'm getting error "Device is secure, Erase to unsecure".

makouda_1-1618493962121.png

I click yes, but then the debugger disconnect and I got this window 

makouda_0-1618493858926.png

As I have flashed 0xFF everywhere, it means I have mass erase enabled, the device is secure and factory access is granted. but it's not the case.

note that I'm using the  CSE and keys are already generated. is it the cause? but what I understand is that the paragraph below is relevant when we try to erase all flash blocs using code, not debugger !!!!!!

From  S32K1xx Series Reference Manual 

NOTE
For CSEc enabled parts, the presence of any (1 or more) Flash
Keys will prevent this command from executing. Refer to the
commands CMD_DBG_CHAL and CMD_DBG_AUTH for the
procedures to pass a challenge/authentication process which
will first remove the keys, then (assuming successful execution)
allow this command to be executed.

 

 

0 Kudos
Reply
1 Solution
1,810 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

mass erase will not work if CSE is enabled. It doesn't matter if mass erase operation is launched by your code or by JTAG/SWD device.

The only option is to run CMD_DBG_CHAL and CMD_DBG_AUTH commands to destroy the partition and then you can run mass erase. But because you can't establish connection via JTAG/SWD anymore and there's no code in the flash that could do that, the device is bricked.

The only option is to replace the chip.

Regards,

Lukas

 

 

View solution in original post

0 Kudos
Reply
1 Reply
1,811 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

mass erase will not work if CSE is enabled. It doesn't matter if mass erase operation is launched by your code or by JTAG/SWD device.

The only option is to run CMD_DBG_CHAL and CMD_DBG_AUTH commands to destroy the partition and then you can run mass erase. But because you can't establish connection via JTAG/SWD anymore and there's no code in the flash that could do that, the device is bricked.

The only option is to replace the chip.

Regards,

Lukas

 

 

0 Kudos
Reply