Device is secure.

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

Device is secure.

Jump to solution
1,044 Views
ABC1024
Contributor I

Hi,

I am trying to use CSEcc, so run CSec_ Boot_ Protection_ S32K144 project, register status is as follows:

ABC1024_0-1698115219603.png

 


1. After erasing the chip with j-flash, it cannot be connected again. Click on' connect' but display ERROR: InitTarget(): PCode returned with error code -1. Use the J-link commander to unlock kinesis, display OK but still unable to connect.
2. Download the program using PE and display Device is secure Erase to unsecure? Clicking 'yes' does not work.
May I ask if this chip is unusable? Is there any other way to save it?

Thank you.

Best regards,

YE

0 Kudos
Reply
1 Solution
999 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

If the flash was erased but the Flash Configuration Field was not restored to unsecured state AND if CSEc is enabled, I'm afraid that there's no way to recover.

If CSEc is enabled, the mass erase is blocked regardless of MEEN configuration.

Regards,

Lukas

View solution in original post

0 Kudos
Reply
4 Replies
1,027 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi

Once the CSEc is enabled by partitioning, it’s not possible to run mass erase (Erase All Blocks command). To be able to perform the mass erase, it’s necessary to destroy the partition by CMD_DBG_CHAL and CMD_DBG_AUTH commands with knowledge of MASTER_ECU_KEY. If MASTER_ECU_KEY is not programmed yet (i.e. only CSEc is enabled by partitioning but nothing more), it’s necessary to load some MASTER_ECU_KEY and then you will be able to destroy the partition by mentioned commands.

Once CSEc is enabled, tools from Pemicro (OpenSDA on EVB, Multilink probes…) should work as expected when loading new project because these tools are not using mass erase. The Pemicro tools erase the flash using Erase Flash Block command, so there’s no problem. However, J-Link uses mass erase when loading new project, so it doesn’t work. If I can remember, this was also mentioned in SDK documentation.

The scenario you described suggests that the flash was erased, the FSEC was not restored to unsecured state and now the debuggers cannot establish the connection because mass erase needed for unsecuring is blocked by enabled CSEc.

But one thing is not clear to me – you showed the screenshot of registers. Do you mean that you can’t load new project but you can still connect the debugger?

Regards,

Lukas

1,022 Views
ABC1024
Contributor I
Hi

The register was captured before erasing with j-link, and after erasing, unable to download new programs or connect to debugger.

What should I do next to unlock the chip? Could you be more specific?

Thank you.
0 Kudos
Reply
1,014 Views
ABC1024
Contributor I
My confusion is that from the register perspective, although the simulation of EEPROM partitioning was successful, [SEC] 10b indicates unsecured, and [MEEN]11b indicates mass erase enabled. Why erasing can cause chip lockup?
0 Kudos
Reply
1,000 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

If the flash was erased but the Flash Configuration Field was not restored to unsecured state AND if CSEc is enabled, I'm afraid that there's no way to recover.

If CSEc is enabled, the mass erase is blocked regardless of MEEN configuration.

Regards,

Lukas

0 Kudos
Reply