S32K148 CSEc

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

S32K148 CSEc

1,058 Views
dpchoudh
Contributor II

How does the CSEc, if enabled, prevent a hacker from programming the flash via JTAG? A part can be, for example, taken offline (e.g. stolen) and then reprogrammed with an arbitrary program image; how is this prevented?

0 Kudos
Reply
1 Reply

1,009 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @dpchoudh 

There's an option to enable Flash Security feature via the FSEC byte in flash configuration field. Take a look at following sections in S32K1 reference manual:
"5.2.1 Flash memory security"
"36.4.4.1.4 Flash Security Register (FSEC)"

If mass erase option is not disabled by MEEN bit field in FSEC, it is possible to run mass erase function even if the device is secured. Then new program can be loaded. If you disable mass erase by MEEN, it's not possible to read the flash and it's not possible to run mass erase.

If CSEc is enabled, the mass erase cannot be perform regardless of MEEN. It's blocked by CSEc. The only option to remove the partition (i.e. disable CSEc) and to enable mass erase again is to run CMD_DBG_CHAL and CMD_DBG_AUTH commands with knowledge of MASTER_ECU_KEY.

So, to answer your questions directly - if CSEc is enabled and if flash security is enabled by FSEC, it's not possible to read the flash and to reprogram the device via JTAG.

Regards,
Lukas

0 Kudos
Reply