s32k 146 flash wtrite error

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

s32k 146 flash wtrite error

1,407 Views
shiqi_seventeen
Contributor III
Hello friends in the community, I have encountered an issue and come here for help. I am developing my project using the S32K146. When using the flash memory, I want to write 256 bytes of data into the flash (with the start address being 0x80000), but in the actual process, a problem occurred: not all data was written to the specified address.

 

The details are as follows:
I. I used EB Tresos to configure the PFlash, as shown in the figure (only one sector is selected for demonstration purposes).
shiqi_seventeen_0-1757236339799.png

 


II. This is a data test function I used to write data into the flash, as shown in the figure.
shiqi_seventeen_1-1757236350044.png

 


III. This is the result during debugging:

 

  1. This is where I called my function.
  2. I used the Mem_43_INFLS_GetJobResult function to determine whether the writing was successful, and the return value was 2 (indicating MEM_43_INFLS_JOB_FAILED).
  3. Some data was written to the flash at the address 0x80000, but only a part of it—this obviously does not meet my requirements.

shiqi_seventeen_2-1757236362899.png

My question:
Did I make a mistake in the configuration, or is there a missing step that prevents me from writing 256 bytes of data?
0 Kudos
Reply
4 Replies

1,065 Views
witness248
Contributor II

hi,shiqi

I have also encountered the same issue when performing OTA test recently, we are using S32K324, RTD500. Have you fixed the issue? if yes, could you please tell me the solution, looking forward to your reply, thanks!

0 Kudos
Reply

1,348 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @shiqi_seventeen,

Can you share screenshots of the whole INFLS configuration?

Which revision of the drivers do you use?

 

Thank you,

BR, Daniel

0 Kudos
Reply

1,341 Views
shiqi_seventeen
Contributor III

shiqi_seventeen_0-1757348183409.png

shiqi_seventeen_1-1757348407167.png

 

Hi,@danielmartynek

The version of the drivers is Autosar 4.7  V2.0.0

0 Kudos
Reply

1,250 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @shiqi_seventeen,

I'm sorry for the delay, I was out of office for two days.

Can you share the whole INFLS configuration?

Do you copy the INFLS code to SRAM using the option highlighted below, or is it executed from the flash? Do you have any code in the block that you program?

danielmartynek_0-1757593009981.png

danielmartynek_1-1757593118250.png

 

Can you use Mem_43_INFLS_BlankCheck() between the erase and the write operations?

 

I don't see anything wrong in the code snippet. Maybe you can share the complete project via a support ticket privately so that I can test it on my side.

 

Regards,

Daniel

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2164710%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Es32k%20146%20flash%20wtrite%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2164710%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%20class%3D%22%22%3EHello%20friends%20in%20the%20community%2C%20I%20have%20encountered%20an%20issue%20and%20come%20here%20for%20help.%20I%20am%20developing%20my%20project%20using%20the%20S32K146.%20When%20using%20the%20flash%20memory%2C%20I%20want%20to%20write%20256%20bytes%20of%20data%20into%20the%20flash%20(with%20the%20start%20address%20being%200x80000)%2C%20but%20in%20the%20actual%20process%2C%20a%20problem%20occurred%3A%20not%20all%20data%20was%20written%20to%20the%20specified%20address.%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%20class%3D%22%22%3EThe%20details%20are%20as%20follows%3A%3CBR%20%2F%3EI.%20I%20used%20EB%20Tresos%20to%20configure%20the%20PFlash%2C%20as%20shown%20in%20the%20figure%20(only%20one%20sector%20is%20selected%20for%20demonstration%20purposes).%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22shiqi_seventeen_0-1757236339799.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22shiqi_seventeen_0-1757236339799.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F355826i200482D666251BBD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22shiqi_seventeen_0-1757236339799.png%22%20alt%3D%22shiqi_seventeen_0-1757236339799.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3EII.%20This%20is%20a%20data%20test%20function%20I%20used%20to%20write%20data%20into%20the%20flash%2C%20as%20shown%20in%20the%20figure.%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22shiqi_seventeen_1-1757236350044.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22shiqi_seventeen_1-1757236350044.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F355827i766B53AABD3136E2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22shiqi_seventeen_1-1757236350044.png%22%20alt%3D%22shiqi_seventeen_1-1757236350044.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3EIII.%20This%20is%20the%20result%20during%20debugging%3A%3C%2FDIV%3E%3CBR%20%2F%3E%3COL%3E%3CLI%3EThis%20is%20where%20I%20called%20my%20function.%3C%2FLI%3E%3CLI%3EI%20used%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EMem_43_INFLS_GetJobResult%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efunction%20to%20determine%20whether%20the%20writing%20was%20successful%2C%20and%20the%20return%20value%20was%202%20(indicating%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EMEM_43_INFLS_JOB_FAILED).%3C%2FLI%3E%3CLI%3ESome%20data%20was%20written%20to%20the%20flash%20at%20the%20address%200x80000%2C%20but%20only%20a%20part%20of%20it%E2%80%94this%20obviously%20does%20not%20meet%20my%20requirements.%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22shiqi_seventeen_2-1757236362899.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22shiqi_seventeen_2-1757236362899.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F355828iAEACE3EACEEBC028%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22shiqi_seventeen_2-1757236362899.png%22%20alt%3D%22shiqi_seventeen_2-1757236362899.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%20class%3D%22%22%3EMy%20question%3A%3CBR%20%2F%3EDid%20I%20make%20a%20mistake%20in%20the%20configuration%2C%20or%20is%20there%20a%20missing%20step%20that%20prevents%20me%20from%20writing%20256%20bytes%20of%20data%3F%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2173865%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20s32k%20146%20flash%20wtrite%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2173865%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehi%EF%BC%8Cshiqi%3C%2FP%3E%3CP%3EI%20have%20also%20encountered%20the%20same%20issue%20when%20performing%20OTA%20test%20recently%2C%20we%20are%20using%20S32K324%2C%26nbsp%3BRTD500.%20Have%20you%20fixed%20the%20issue%3F%20if%20yes%2C%20could%20you%20please%20tell%20me%20the%20solution%2C%20looking%20forward%20to%20your%20reply%2C%20thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2167870%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20s32k%20146%20flash%20wtrite%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2167870%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F224509%22%20target%3D%22_blank%22%3E%40shiqi_seventeen%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EI'm%20sorry%20for%20the%20delay%2C%20I%20was%20out%20of%20office%20for%20two%20days.%3C%2FP%3E%0A%3CP%3ECan%20you%20share%20the%20whole%20INFLS%20configuration%3F%3C%2FP%3E%0A%3CP%3EDo%20you%20copy%20the%20INFLS%20code%20to%20SRAM%20using%20the%20option%20highlighted%20below%2C%20or%20is%20it%20executed%20from%20the%20flash%3F%20Do%20you%20have%20any%20code%20in%20the%20block%20that%20you%20program%3F%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22danielmartynek_0-1757593009981.png%22%20style%3D%22width%3A%20623px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22danielmartynek_0-1757593009981.png%22%20style%3D%22width%3A%20623px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F356508i3D586C1B6F566A10%2Fimage-dimensions%2F623x323%3Fv%3Dv2%22%20width%3D%22623%22%20height%3D%22323%22%20role%3D%22button%22%20title%3D%22danielmartynek_0-1757593009981.png%22%20alt%3D%22danielmartynek_0-1757593009981.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22danielmartynek_1-1757593118250.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22danielmartynek_1-1757593118250.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F356509iEAD892004DC21026%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22danielmartynek_1-1757593118250.png%22%20alt%3D%22danielmartynek_1-1757593118250.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ECan%20you%20use%26nbsp%3BMem_43_INFLS_BlankCheck()%20between%20the%20erase%20and%20the%20write%20operations%3F%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EI%20don't%20see%20anything%20wrong%20in%20the%20code%20snippet.%26nbsp%3BMaybe%20you%20can%20share%20the%20complete%20project%20via%20a%20support%20ticket%20privately%20so%20that%20I%20can%20test%20it%20on%20my%20side.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2165288%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20s32k%20146%20flash%20wtrite%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2165288%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%22shiqi_seventeen_0-1757348183409.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22shiqi_seventeen_0-1757348183409.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F355946iB232FDF7BADFCC34%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22shiqi_seventeen_0-1757348183409.png%22%20alt%3D%22shiqi_seventeen_0-1757348183409.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%22shiqi_seventeen_1-1757348407167.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22shiqi_seventeen_1-1757348407167.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F355948i3A65A4BB31ED8EF0%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22shiqi_seventeen_1-1757348407167.png%22%20alt%3D%22shiqi_seventeen_1-1757348407167.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EHi%EF%BC%8C%40%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F160001%22%20target%3D%22_self%22%3E%3CSPAN%20class%3D%22%22%3Edanielmartynek%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%3CP%3EThe%20ver%3CSPAN%3Esion%20of%20the%20drivers%20is%20%3CSTRONG%3EAutosar%204.7%26nbsp%3B%20V2.0.0%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2165003%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20s32k%20146%20flash%20wtrite%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2165003%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F224509%22%20target%3D%22_blank%22%3E%40shiqi_seventeen%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3ECan%20you%20share%20screenshots%20of%20the%20whole%20INFLS%20configuration%3F%3C%2FP%3E%0A%3CP%3EWhich%20revision%20of%20the%20drivers%20do%20you%20use%3F%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThank%20you%2C%3C%2FP%3E%0A%3CP%3EBR%2C%20Daniel%3C%2FP%3E%3C%2FLINGO-BODY%3E