In s32k118 Cant write FSEC bit Setting using T32

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

In s32k118 Cant write FSEC bit Setting using T32

跳至解决方案
2,457 次查看
mose
Contributor I

Hi. nxp team

i'm trying to update FSEC bit to make my MCU jtag locking.

so I attempted startup.s code modifying like this,

mose_0-1665028684866.png

and I checked my sec file that the FSEC register was updated at 400.

mose_1-1665034699679.png

but even after data load on target, FSEC register still 0xFE, not 0xFC

mose_0-1665034637255.png

It seems impossible to change the memory adress 0x0_0400

 

Please help me to resolve this issue.

Thanks,

MOSE

标签 (1)
0 项奖励
回复
1 解答
2,446 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Mose,

there's a protection against unintended modification of this flash configuration field.

The solution can be found in this file used for programming:

c:\T32\demo\arm\flash\s32k.cmm

 

lukaszadrapa_0-1665076776610.png

 

lukaszadrapa_1-1665076834814.png

Regards,

Lukas

 

在原帖中查看解决方案

3 回复数
2,447 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Mose,

there's a protection against unintended modification of this flash configuration field.

The solution can be found in this file used for programming:

c:\T32\demo\arm\flash\s32k.cmm

 

lukaszadrapa_0-1665076776610.png

 

lukaszadrapa_1-1665076834814.png

Regards,

Lukas

 

2,404 次查看
mose
Contributor I

Thank you for your reply.

now i set my mcu to secure, but i have one more problem.. 

i want to unsecure my mcu using masserase in trace32,

so i setup mass erase command, MDM-AP Control Register[0] == 1

Data.Set EDBG:0x40000104 %Long 0x00000001

but it doesn't work. it still locking

Please help me to resolve this issue.

Thanks,

MOSE

0 项奖励
回复
2,384 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

I can see two possible reasons:

- the mass erase is disabled in flash configuration field in FSEC by MEEN. This should be reflected also in bit 5 in MDM-AP Status register

- CSEc is enabled. This note can be found in description of Program Partition command:

lukaszadrapa_0-1666021300491.png

Regards,

Lukas

0 项奖励
回复