Cannot partition flash when using S32K148

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

Cannot partition flash when using S32K148

跳至解决方案
1,330 次查看
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 项奖励
回复
1 解答
1,305 次查看
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 项奖励
回复
3 回复数
1,306 次查看
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 项奖励
回复
987 次查看
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 项奖励
回复
1,292 次查看
wenfengyao
Contributor II

thankyou, I think this is the reason for this problem

0 项奖励
回复