In s32k118 Cant write FSEC bit Setting using T32

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

In s32k118 Cant write FSEC bit Setting using T32

Jump to solution
1,032 Views
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

Labels (1)
0 Kudos
1 Solution
1,021 Views
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

 

View solution in original post

3 Replies
1,022 Views
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

 

979 Views
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 Kudos
959 Views
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 Kudos