s32K31x Flash writing problem

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

s32K31x Flash writing problem

Jump to solution
3,389 Views
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.

Tags (1)
0 Kudos
Reply
1 Solution
3,333 Views
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

 

 

View solution in original post

0 Kudos
Reply
4 Replies
3,364 Views
xsong
Contributor I

xsong_0-1730287275981.png

 

0 Kudos
Reply
3,334 Views
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 Kudos
Reply
3,317 Views
xsong
Contributor I

Hi Daniel

Thank you very much, I will try it.

Regards,

xsong

0 Kudos
Reply
2,083 Views
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 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1984589%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Es32K31x%20Flash%20writing%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1984589%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWhen%20I%20was%20using%20s32k310%20for%20boot%20development%2C%20I%20found%20that%20I%20could%20not%20write%20to%20the%20flash%20after%200x440000%2C%20and%20the%20PEP%20register%20of%20MCRS%20was%20set%20to%201.%20There%20would%20be%20no%20such%20problem%20if%20I%20operated%20on%200x400000-0x43ffff.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2095503%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20s32K31x%20Flash%20writing%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2095503%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EMay%20I%20ask%20how%20you%20cleared%20this%20SPELOCK%20register%20to%200%3F%20I%20tried%20to%20clear%20it%20but%20it%20showed%20that%20it%20was%20a%20const%20modified%20d%20value%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1985898%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20s32K31x%20Flash%20writing%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1985898%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%3CSPAN%3E%20Daniel%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThank%20you%20very%20much%2C%20I%20will%20try%20it.%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3Exsong%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1985590%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20s32K31x%20Flash%20writing%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1985590%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F242726%22%20target%3D%22_blank%22%3E%40xsong%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EThe%20first%20half%20of%20the%20512KB%20block%20is%20protected%20by%20super%20sector%20locks.%3C%2FP%3E%0A%3CP%3EYou%20need%20to%20clear%20the%20corresponding%20super%20sector%20lock%20in%20PFCBLK0_SSPELOCK.%3C%2FP%3E%0A%3CP%3EPlease%20check%20the%20register%20before%20any%20flash%20operation%20at%20the%20sectors.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1984704%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20s32K31x%20Flash%20writing%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1984704%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22xsong_0-1730287275981.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22xsong_0-1730287275981.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F307685i1F96AE0E73325A5E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22xsong_0-1730287275981.png%22%20alt%3D%22xsong_0-1730287275981.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E