MPC5777C_MCAL4_0_RTM_1_0_1 AUTOSAR FEE MODULE NOT WORKING. (EB TRESOS CONFIGURATION )

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

MPC5777C_MCAL4_0_RTM_1_0_1 AUTOSAR FEE MODULE NOT WORKING. (EB TRESOS CONFIGURATION )

Jump to solution
1,694 Views
Macar
Contributor III

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.

Macar_0-1676630180634.png

 

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

Macar_1-1676883249741.png

 

Macar_0-1676883103127.png

 

0 Kudos
1 Solution
1,598 Views
cuongnguyenphu
NXP Employee
NXP Employee

Hi @Macar 
I noticed that you haven't enable Fls Job End Notification.

cuongnguyenphu_0-1677038011208.png

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.

View solution in original post

0 Kudos
11 Replies
1,638 Views
Macar
Contributor III

**********

0 Kudos
1,617 Views
cuongnguyenphu
NXP Employee
NXP Employee

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?

cuongnguyenphu_0-1676965682050.png


Fls_Init(NULL_PTR);

 

0 Kudos
1,612 Views
Macar
Contributor III

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.

Macar_1-1676969177564.png

 

0 Kudos
1,605 Views
Macar
Contributor III
I have tried different ways so far but the problem is still not solved
0 Kudos
1,599 Views
cuongnguyenphu
NXP Employee
NXP Employee

Hi @Macar 
I noticed that you haven't enable Fls Job End Notification.

cuongnguyenphu_0-1677038011208.png

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.

0 Kudos
1,566 Views
Macar
Contributor III

Macar_0-1677141622777.png

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.

 

0 Kudos
1,556 Views
cuongnguyenphu
NXP Employee
NXP Employee

Hi @Macar ,
The reason why data is written forward is because of the Data organization of Fee cluster:

cuongnguyenphu_0-1677150297977.png


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

 

0 Kudos
1,554 Views
Macar
Contributor III

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.

Macar_0-1677151349116.png

Why is data with the same block number written to different addresses? instead of overwriting 

0 Kudos
1,544 Views
cuongnguyenphu
NXP Employee
NXP Employee

@Macar 
I attached 1 more link for detail reason of using FEE:
https://www.nxp.com/docs/en/application-note/AN4868.pdf

cuongnguyenphu_0-1677155131030.png


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.

0 Kudos
1,542 Views
Macar
Contributor III
I completely understood the subject and implemented it in my project, thank you very much for your valuable contributions.
0 Kudos
1,587 Views
Macar
Contributor III
Thank u so much, my problem is solved.
0 Kudos