unable to change flash security?

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

unable to change flash security?

Jump to solution
1,440 Views
JeorgeB
Contributor III

hi.

I use S32k144 and want to activate the security for prevent illegal access to memory from debugger. I change the "startup_S32K142.s" file according to available examples in the forum.

__FlashConfig
DCD 0x12345622 ; 8 bytes backdoor comparison key
DCD 0x12345678 ;
DCD 0xFFFFFFFF ; 4 bytes program flash protection bytes
DCD 0xFFFF7FBF ; FDPROT:FEPROT:FOPT:FSEC
__FlashConfig_End

 

But when I use debugger the memory is accessible and when disconnect debugger from MCU and read the location 0x408 it returned 0xFFFF7DFE !! (also in debugger). Backdoor phrases are write well.

 

0 Kudos
1 Solution
1,414 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Since you are using IAR, have you add --enable_config_write? refer: Using IAR EWARM to program flash configuration field?

View solution in original post

9 Replies
622 Views
ZEROOO
Contributor IV

The problem has been solved, thank you! When downloading the program in the security zone, the general debugger will not download the security zone by default, and it is necessary to configure the corresponding Settings before modifying the security zone value, but this will have the risk of the chip being permanently locked, how to set the specific setting can ask the debugger technical support.

0 Kudos
1,435 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi JeorgeB,

S32k144 should modify the "startup_S32K144.s". Why you change the "startup_S32K142.s"?


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,432 Views
JeorgeB
Contributor III

It was a typing mistake.

I try that in S32K142 and there was the same problem.

0 Kudos
1,428 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Have you try to use S32DS with P&E Micro debugger?

0 Kudos
707 Views
ZEROOO
Contributor IV

Hi Robin,

I also encountered such a problem in the S32DS, the SREC is BF, and the BE is when viewing after burning. What is the solution.

0 Kudos
698 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

If you are using Segger J-Link, please select (allow security) when configure Target Device Settings.

0 Kudos
695 Views
ZEROOO
Contributor IV

The debugger I use is ic5000, I do not know why this phenomenon occurs, any suggestions

0 Kudos
1,426 Views
JeorgeB
Contributor III

No, I use IAR and debug tool is jlink.

0 Kudos
1,415 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Since you are using IAR, have you add --enable_config_write? refer: Using IAR EWARM to program flash configuration field?