s32K31x Flash writing problem

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

s32K31x Flash writing problem

跳至解决方案
4,352 次查看
xsong
Contributor I

When I was using s32k310 for boot development, I found that I could not write to the flash after 0x440000, and the PEP register of MCRS was set to 1. There would be no such problem if I operated on 0x400000-0x43ffff.

标记 (1)
0 项奖励
回复
1 解答
4,296 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @xsong,

The first half of the 512KB block is protected by super sector locks.

You need to clear the corresponding super sector lock in PFCBLK0_SSPELOCK.

Please check the register before any flash operation at the sectors.

 

Regards,

Daniel

 

 

在原帖中查看解决方案

0 项奖励
回复
4 回复数
4,327 次查看
xsong
Contributor I

xsong_0-1730287275981.png

 

0 项奖励
回复
4,297 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @xsong,

The first half of the 512KB block is protected by super sector locks.

You need to clear the corresponding super sector lock in PFCBLK0_SSPELOCK.

Please check the register before any flash operation at the sectors.

 

Regards,

Daniel

 

 

0 项奖励
回复
4,280 次查看
xsong
Contributor I

Hi Daniel

Thank you very much, I will try it.

Regards,

xsong

0 项奖励
回复
3,046 次查看
Embedded_novice
Contributor III

May I ask how you cleared this SPELOCK register to 0? I tried to clear it but it showed that it was a const modified d value

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-1984589%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Es32K31x%20Flash%E5%86%99%E5%85%A5%E9%97%AE%E9%A2%98%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1984589%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E5%9C%A8%E4%BD%BF%E7%94%A8s32k310%E8%BF%9B%E8%A1%8Cboot%E5%BC%80%E5%8F%91%E7%9A%84%E6%97%B6%E5%80%99%E5%8F%91%E7%8E%B0%E5%9C%A80x440000%E4%B9%8B%E5%90%8E%E6%97%A0%E6%B3%95%E5%86%99%E5%85%A5flash%EF%BC%8C%E8%80%8C%E4%B8%94MCRS%E7%9A%84PEP%E5%AF%84%E5%AD%98%E5%99%A8%E8%A2%AB%E8%AE%BE%E7%BD%AE%E4%B8%BA1%E3%80%82%E5%A6%82%E6%9E%9C%E6%88%91%E6%93%8D%E4%BD%9C%E7%9A%84%E6%98%AF0x400000-0x43ffff%E5%B0%B1%E4%B8%8D%E4%BC%9A%E5%87%BA%E7%8E%B0%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%E4%BA%86%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2095503%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9As32K31x%20Flash%E5%86%99%E5%85%A5%E9%97%AE%E9%A2%98%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2095503%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E8%AF%B7%E9%97%AE%E6%82%A8%E6%98%AF%E5%A6%82%E4%BD%95%E5%B0%86%E8%BF%99%E4%B8%AA%20SPELOCK%20%E5%AF%84%E5%AD%98%E5%99%A8%E6%B8%85%E9%9B%B6%E7%9A%84%EF%BC%9F%E6%88%91%E5%B0%9D%E8%AF%95%E8%BF%87%E6%B8%85%E9%9B%B6%EF%BC%8C%E4%BD%86%E5%AE%83%E6%98%BE%E7%A4%BA%E8%BF%99%E6%98%AF%E4%B8%80%E4%B8%AA%20const%20%E4%BF%AE%E9%A5%B0%E7%9A%84%20d%20%E5%80%BC%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1985898%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9As32K31x%20Flash%E5%86%99%E5%85%A5%E9%97%AE%E9%A2%98%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1985898%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%97%A8%EF%BC%8C%3CSPAN%3E%E4%B8%B9%E5%B0%BC%E5%B0%94%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E9%9D%9E%E5%B8%B8%E6%84%9F%E8%B0%A2%EF%BC%8C%E6%88%91%E4%BC%9A%E5%B0%9D%E8%AF%95%E7%9A%84%E3%80%82%3C%2FP%3E%3CP%3E%E6%AD%A4%E8%87%B4%EF%BC%8C%3C%2FP%3E%3CP%3E%E5%AE%8B%3C%2FP%3E%3C%2FLINGO-BODY%3E