Hello, I installed MPC5777C_MCAL4_0_RTM_1_0_1 AUTOSAR MCAL package for MPC5777 series from NXP's site, I made the necessary configurations for FEE and FLS over EB tresos, but I could not access flash via FEE. I would be very happy if you help.
I am attaching my project(to see the APIs I use) and EB Tresos configuration files for you to review.
Note: I cut off some parts because the whole project was too big.
Note: I think this is where I'm stuck. I always see 0 here because init fails to do its work properly.
Thanks NXP.
Update: I updated the code a bit by looking at the examples I saw on the site. but I stucked here. Can't pass to Fee_Write function because ; ->cant run CLR_HDR_PARSE Block
已解决! 转到解答。
Hi @Macar
I noticed that you haven't enable Fls Job End Notification.
Please enable it first, because after initial process from Fls finish, it will notify to Fee by this function. then Fee module can continue to process the initial phase.
Hello @Macar ,
I have a look into your config file in Fls module,
As you choose Config Variant of Fls is VariantPreCompile, so the input parameter of Fls_Init should be NULL_PTR, as same as Fee module.
Let's modify this point in the source code to see whether the issue solved?
Fls_Init(NULL_PTR);
Thanks for your answer,
I did what you said and revised my code based on your answers to other questions. but it doesn't work, can't get out of the while loop
I also noticed this; Although the job is FEE_JOB_INT_SCAN_CLR_HDR_PARSE, it cannot do this job due to the switch case structure.
Hi @Macar
I noticed that you haven't enable Fls Job End Notification.
Please enable it first, because after initial process from Fls finish, it will notify to Fee by this function. then Fee module can continue to process the initial phase.
So why write the next data 32 bytes forward even though written to the same block number, is there a way to prevent this?
Even though the block number is the same, I couldn't understand the reason why I didn't overwrite it.
Hi @Macar ,
The reason why data is written forward is because of the Data organization of Fee cluster:
Block ID header increase to the end of Cluster, while Block data is written from the end of cluster address backward to Block ID header.
I get this snapshot from the User Manual of S32K1XX, however the approach way for Fee in these 2 targets is the same. For more information, you can check in the attachment
Hello, Thank u for your answer, I studied the FEE data organization and understood its structure, but I understood why different flash address were written even though the "block number" was the same.
Why is data with the same block number written to different addresses? instead of overwriting
@Macar
I attached 1 more link for detail reason of using FEE:
https://www.nxp.com/docs/en/application-note/AN4868.pdf
Summary:
Flash: a non-volatile memory that can store data. Data can be read and modified (erased/changed) when it is located in flash. Typically, Flash supports reading data in one-byte length, writing data in word-size length, but erasing (deleting data) must be done in one whole flash sector.
When a portion of data needs to be updated (delete or change to other value), the whole sector might have to be erased. It would badly effect to life-cycle of Flash memory
FEE: a software improvement and is applied here to handle the above restrictions of using Flash. It emulates the way EEPROM treat the data, in other word, FEE tries to act like EEPROM, even the actual memory is Flash. Data will be written in one byte-length (from user interface), it also will be written into memory without any pre-erasing that user have to prepare, hence that leads to improve endurance of memory
FEE actually use the Flash memory, so it's unable to overwrite the stored data, It only can update block of data by write into another address, and update the valid address to the Block header again.