s32k 146 flash wtrite errorHello 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).

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

III. This is the result during debugging:
- This is where I called my function.
- 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).
- Some data was written to the flash at the address 0x80000, but only a part of it—this obviously does not meet my requirements.

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?
Re: s32k 146 flash wtrite errorhi,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!
Re: s32k 146 flash wtrite errorHello @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?


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
Re: s32k 146 flash wtrite error

Hi,@danielmartynek
The version of the drivers is Autosar 4.7 V2.0.0
Re: s32k 146 flash wtrite errorHi @shiqi_seventeen,
Can you share screenshots of the whole INFLS configuration?
Which revision of the drivers do you use?
Thank you,
BR, Daniel