Cannot partition flash when using S32K148

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

Cannot partition flash when using S32K148

Jump to solution
1,754 Views
wenfengyao
Contributor II

action:

1. Clear the keys in the CSEc module
2. Burn a bin file without CSEc function
3. After the programming is successful, power on and start again, and in J-flash, use the F4 command to manually erase the chip.

4. After the erasing is successful, use J-Commender: unlock kinetis to unlock the chip
5. After unlocking successfully, re-use J-flash to burn a bin file.
6. The bin file shows that the burning is successful, but the operation is not normal. Through S32DS-debug, it is found that the code for the flash partition cannot be executed during initialization, and it has been restarted there repeatedly.

wenfengyao_0-1654843471696.png

When reading the MDM-AP status register, it shows 0x00000000:

wenfengyao_1-1654843554203.png

Perform mass erase on the chip and then read the display as:

wenfengyao_3-1654843724621.png

May I ask what caused the inability to partition the flash and how to solve it?

 

 

0 Kudos
Reply
1 Solution
1,729 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Jacky,

do you mean the code is executed from flash? There's a note in the initFlashForCsecOperation:

lukaszadrapa_0-1655193837033.png

 

Maybe this is the reason.

Regards,

Lukas

View solution in original post

0 Kudos
Reply
3 Replies
1,730 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Jacky,

do you mean the code is executed from flash? There's a note in the initFlashForCsecOperation:

lukaszadrapa_0-1655193837033.png

 

Maybe this is the reason.

Regards,

Lukas

0 Kudos
Reply
1,411 Views
luyu
Contributor I

Hello

     I met the same issue as the customer did. I exported the example from s32ds to IAR, and when I use the Ram.icf file. There is no problem. But when I use the flash icf for the first download or after the erase key. It happens something wrong in the  initFlashForCsecOperation.  But if we want to SOP, I think we will only use one icf file for IAR, and I don't know which functions should be put in Ram. I see there is a 

START_FUNCTION_DEFINITION_RAMSECTION in front of the FLASH_DRV_CommandSequence. and it means FLASH_DRV_CommandSequence is put into Ram, but if still not work when using flash icf. Could you give me information and help about it ?

0 Kudos
Reply
1,716 Views
wenfengyao
Contributor II

thankyou, I think this is the reason for this problem

0 Kudos
Reply