S32M244 erase/write pflash in ram failed

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

S32M244 erase/write pflash in ram failed

Jump to solution
2,898 Views
Helloyt
Contributor III

run flash erase/write code in ram is easily failed ,picture below is SDK version,in the project Cache is disabled,and i debug with PE

企业微信截图_17418328858168.png

企业微信截图_17418329366582.png

here i want to erase 0x9000,length is 8,but erase failed

企业微信截图_17418330539132.png

the project source is in attach file

0 Kudos
Reply
1 Solution
2,869 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Helloyt

I tested your code several times on my S32M244EVB and did not encounter your problem, which bothered me.
You can look at the FSTAT register.

View solution in original post

0 Kudos
Reply
2 Replies
2,870 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Helloyt

I tested your code several times on my S32M244EVB and did not encounter your problem, which bothered me.
You can look at the FSTAT register.

0 Kudos
Reply
2,848 Views
Helloyt
Contributor III

the problem also disappeard after I used another board to test the code

when I tried to read the FSTAT in the error board,I found the MCU was locked by mistake because the CSEC was enabled and i erased the sector0 without write 0x40d 

So it hard to reaappear

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2060854%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32M244%20erase%2Fwrite%20pflash%20in%20ram%20failed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2060854%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Erun%20flash%20erase%2Fwrite%20code%20in%20ram%20is%20easily%20failed%20%EF%BC%8Cpicture%20below%20is%20SDK%20version%EF%BC%8Cin%20the%20project%20Cache%20is%20disabled%EF%BC%8Cand%20i%20debug%20with%20PE%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17418328858168.png%22%20style%3D%22width%3A%20613px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17418328858168.png%22%20style%3D%22width%3A%20613px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327830iCE331F514FCCB6C9%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17418328858168.png%22%20alt%3D%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17418328858168.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17418329366582.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17418329366582.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327831i5D5AC35656C1D087%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17418329366582.png%22%20alt%3D%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17418329366582.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Ehere%20i%20want%20to%20erase%200x9000%2Clength%20is%208%EF%BC%8Cbut%20erase%20failed%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17418330539132.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17418330539132.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F327832i5649B5941EA0C20D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17418330539132.png%22%20alt%3D%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17418330539132.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Ethe%20project%20source%20is%20in%20attach%20file%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2062415%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32M244%20erase%2Fwrite%20pflash%20in%20ram%20failed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2062415%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ethe%20problem%20also%20disappeard%20after%20I%20used%20another%20board%20to%20test%20the%20code%3C%2FP%3E%3CP%3Ewhen%20I%20tried%20to%20read%20the%20FSTAT%20in%20the%20error%20board%EF%BC%8CI%20found%20the%20MCU%20was%20locked%20by%20mistake%20because%20the%20CSEC%20was%20enabled%20and%20i%20erased%20the%20sector0%20without%20write%200x40d%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20it%20hard%20to%20reaappear%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2061764%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32M244%20erase%2Fwrite%20pflash%20in%20ram%20failed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2061764%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CSPAN%3EHelloyt%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EI%20tested%20your%20code%20several%20times%20on%20my%20S32M244EVB%20and%20did%20not%20encounter%20your%20problem%2C%20which%20bothered%20me.%3CBR%20%2F%3EYou%20can%20look%20at%20the%20FSTAT%20register.%3C%2FP%3E%3C%2FLINGO-BODY%3E