S32K148 Secured?

cancel
Showing results for 
Search instead for 
Did you mean: 

S32K148 Secured?

Jump to solution
1,148 Views
EE_CW
Contributor III

Hi together

We have prototype board, where we use a S32K148.

I tried the flash partitioning example and made my own out of this (see attachment).

This worked fined a few times, always with changing the code and flash it onto the MCU.

After then I disconnected the supply to check if the written value written remain in the Flash orrectly.

After trying to flash a new programm onto the MCU, the following message showed up:

pastedImage_1.png

It doesn't matter if I choose YES or NO, I can no longer connect to MCU.

Even if I try to connect by J-Link directly, I'm not able to connect to the MCC and this Message always shows up.

Because of this problem I checked the community. I found another question, but there is another MCU involved (TWR-K65F180M board unintentionally secured).

The Reset pin shows a saw tooth signal. We had the problem of the saw tooth signal once, but with flashing by J-Link this could be solved. But not so this time.

This Situation brings up some questions for me:

How to unsecure the MCU?

Where are the setting in S32DS to secure or ensecure a MCU after flashing (used for production)?

Thanky for your help.

Regards

Mario

0 Kudos
1 Solution
995 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Mario,

Please refer to AN12130 Production Flash Programming Best Practices for S32K1xx MCUs

4.1 Flash configuration field

4.3 Secured part

5 Common problems

In S32DS, the flash configuration filed is initialized in the Startup_S32K148.S file at 0x400 - 0x410 (S32K1xx_flash.ld)

pastedImage_2.png

and loaded from the Flash configuration field to the FSEC[SEC] register out of reset.

Once the MCU is secure, the debugger can still access the MDM_AP Status and Control registers.

S32K1xx RM rev12, Section 58.6 MDM-AP status and control registers.

AN12120,

3.1.1 SWD connection steps

3.2.1.1 SWD mass erase

You can follow the connection steps in J-link commander using the commands from this thread:

https://community.nxp.com/message/1166947?commentID=1166947#comment-1166947 

And use the "unlock Kinetis" command to trigger the SWD mass erase operation while the MCU is held in reset (connect PTA5 reset_b to VSS).

Regards,

Daniel

View solution in original post

3 Replies
996 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Mario,

Please refer to AN12130 Production Flash Programming Best Practices for S32K1xx MCUs

4.1 Flash configuration field

4.3 Secured part

5 Common problems

In S32DS, the flash configuration filed is initialized in the Startup_S32K148.S file at 0x400 - 0x410 (S32K1xx_flash.ld)

pastedImage_2.png

and loaded from the Flash configuration field to the FSEC[SEC] register out of reset.

Once the MCU is secure, the debugger can still access the MDM_AP Status and Control registers.

S32K1xx RM rev12, Section 58.6 MDM-AP status and control registers.

AN12120,

3.1.1 SWD connection steps

3.2.1.1 SWD mass erase

You can follow the connection steps in J-link commander using the commands from this thread:

https://community.nxp.com/message/1166947?commentID=1166947#comment-1166947 

And use the "unlock Kinetis" command to trigger the SWD mass erase operation while the MCU is held in reset (connect PTA5 reset_b to VSS).

Regards,

Daniel

995 Views
EE_CW
Contributor III

Hi Daniel

Thanks for your answer and all the information.

The unlock was successfull.

Now I will investigate in the first point about the Flash configuration field.
Because I never intended to write in these fields. I have checked the address 0x400 after my program did the write and read the on the flash, but these registers did not changed.

Regards

Mario

0 Kudos
858 Views
sandeepsandeepk
Contributor II

Can you explain me how you solved your problem because i also having the same problem but with S32K144.

0 Kudos