EEEWrite functions

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

EEEWrite functions

Jump to solution
1,272 Views
BriceC
Contributor II

Hello,

We are a bit confused about the EEE system to flash in a back-up memory.

What we understood so far, is that we can configure on S32K146 a FlexRAM of 0kB or 4kB, if the EEE_ENABLE flag is set, we will use this EEE memory of 4kB as a buffer to read and write to E-Flash.

We would like to have the best endurance, so we configured a E-Flash of 64kB.

Let's say we have some Monitoring data, like version of the software or some values, all in a structure. And some default data, open load, shorted low etc.. in another structure.

And we want to write the monitoring data every 10 min, and default data everytime something happend.

How does the EEE state machine will proceed ? How does he know which data i am passing, either the monitoring structure or the defaults structure ?

If we have theses structures in our program, we will have twice the data ? Once in the FlexRAM and once in the code somewhere ?

Can we partition the EEE memory to write several structures ? And then have only one structure in RAM ?

In the flash_partitionning example, we can write some data from a base address, and then try to update from that address + 1u a byte. What will happen in the E-Flash backup ? He will write another structure after with the first one with the modification ? Or he will modify the first already written ?

We have seen the FME calculator, to compute the maximum life time of the E-Flash backup. But how can we compute the life time with asynchronous interrupts ? Like for the defaults, we will write them as soon as they appears.

I know it is a lot of questions, but i'll be very thankfull if you can answer them

Best regards,

Brice

Labels (1)
0 Kudos
1 Solution
1,245 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @BriceC,

When a record is written to a specific address in FlexRAM, the EEPROM state machine creates a backup in FlexNVM that includes the data and the address of the data in FlexRAM.

 

You can create a new section in the linker file for the FlexRAM variables.

Please refer to Example: S32K144 EEEPROM usage

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/Example-S32K144-EEEPROM-usage/ta-p/110...

 

Default EEPROM data has been discussed in the thread below already:

https://community.nxp.com/t5/S32K/S32K144-FlexRAM-as-Emulated-EEPROM-Initial-Values/m-p/808582

 

Not sure what you mean by the partitioning of the EEEPROM, there is 4KB of EEEPROM, the records can be 8bit, 16bit or 32bit long.

 

We can write some data from a base address, and then try to update from that address + 1u a byte. What will happen in the E-Flash backup?

The EEPROM will create two records, one for each byte, each byte is stored together with the address of the byte in FlexRAM, that is the base_address and base_address + 1.

We have seen the FME calculator, to compute the maximum life time of the E-Flash backup. But how can we compute the life time with asynchronous interrupts? Like for the defaults, we will write them as soon as they appears.

If the number of updates is unknown, it can't be estimated.

But the Set FlexRAM Function (FTFC command) with 0x77 Control code, returns the number of Sector Erase Count.

danielmartynek_0-1660139910410.png

 

Regards,

Daniel

 

 

 

 

 

 

View solution in original post

0 Kudos
2 Replies
1,205 Views
BriceC
Contributor II

Hi Daniel,

Thank you for your answer, we understand better now.

Best regards,

Brice

0 Kudos
1,246 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @BriceC,

When a record is written to a specific address in FlexRAM, the EEPROM state machine creates a backup in FlexNVM that includes the data and the address of the data in FlexRAM.

 

You can create a new section in the linker file for the FlexRAM variables.

Please refer to Example: S32K144 EEEPROM usage

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/Example-S32K144-EEEPROM-usage/ta-p/110...

 

Default EEPROM data has been discussed in the thread below already:

https://community.nxp.com/t5/S32K/S32K144-FlexRAM-as-Emulated-EEPROM-Initial-Values/m-p/808582

 

Not sure what you mean by the partitioning of the EEEPROM, there is 4KB of EEEPROM, the records can be 8bit, 16bit or 32bit long.

 

We can write some data from a base address, and then try to update from that address + 1u a byte. What will happen in the E-Flash backup?

The EEPROM will create two records, one for each byte, each byte is stored together with the address of the byte in FlexRAM, that is the base_address and base_address + 1.

We have seen the FME calculator, to compute the maximum life time of the E-Flash backup. But how can we compute the life time with asynchronous interrupts? Like for the defaults, we will write them as soon as they appears.

If the number of updates is unknown, it can't be estimated.

But the Set FlexRAM Function (FTFC command) with 0x77 Control code, returns the number of Sector Erase Count.

danielmartynek_0-1660139910410.png

 

Regards,

Daniel

 

 

 

 

 

 

0 Kudos