unable to change flash security?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

unable to change flash security?

ソリューションへジャンプ
1,643件の閲覧回数
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 件の賞賛
返信
1 解決策
1,617件の閲覧回数
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?

元の投稿で解決策を見る

9 返答(返信)
825件の閲覧回数
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 件の賞賛
返信
1,638件の閲覧回数
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 件の賞賛
返信
1,635件の閲覧回数
JeorgeB
Contributor III

It was a typing mistake.

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

0 件の賞賛
返信
1,631件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信
910件の閲覧回数
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 件の賞賛
返信
901件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信
898件の閲覧回数
ZEROOO
Contributor IV

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

0 件の賞賛
返信
1,629件の閲覧回数
JeorgeB
Contributor III

No, I use IAR and debug tool is jlink.

0 件の賞賛
返信
1,618件の閲覧回数
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?