2054339_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2054339_en-US

2054339_en-US

S32K344 Flash Memory Erase Cycles life
 
#define FLS_MASTER_ID                0U
#define FLS_BUF_SIZE                 80U
#define FLS_SECTOR_ADDR              0x00600000U
#define FLS_SECTOR_TEST              C40_CODE_ARRAY_0_BLOCK_2_S256
 
 void FlashWrite()
 {
     /* Unlock sector if needed */
    if (STATUS_C40_IP_SECTOR_PROTECTED == C40_Ip_GetLock(FLS_SECTOR_TEST))
    {
        C40_Ip_ClearLock(FLS_SECTOR_TEST, FLS_MASTER_ID);
    }
 
    /* Erase sector */
    C40_Ip_MainInterfaceSectorErase(FLS_SECTOR_TEST, FLS_MASTER_ID);
    do
    {
        C40Status = C40_Ip_MainInterfaceSectorEraseStatus();
    }
    while (STATUS_C40_IP_BUSY == C40Status);
    /* Check job result */
    Fls_ExampleAssert(STATUS_C40_IP_SUCCESS == C40Status);
 
    /* Write data */
    C40_Ip_MainInterfaceWrite(FLS_SECTOR_ADDR, FLS_BUF_SIZE, TxBuffer, FLS_MASTER_ID);
    do
    {
        C40Status = C40_Ip_MainInterfaceWriteStatus();
    }
    while (STATUS_C40_IP_BUSY == C40Status);
    /* Check job result */
    Fls_ExampleAssert(STATUS_C40_IP_SUCCESS == C40Status);
 
    /* Compare the data in memory with TxBuffer */
    C40Status = C40_Ip_Compare(FLS_SECTOR_ADDR, FLS_BUF_SIZE, TxBuffer);
    /* Check job result */
    Fls_ExampleAssert(STATUS_C40_IP_SUCCESS == C40Status);
 
 
 }
 
I am Calling this function FlashWrite() for every 1 Minute and MCU is working 24HRs so considering that how much flash memory life i'll get. Also let me know how to calculate it?
 
Re: S32K344 Flash Memory Erase Cycles life

Dear  @lukaszadrapa and @narsimh_kamath  Thanks for the detailed information and calculations. This is what i was looking for.

Re: S32K344 Flash Memory Erase Cycles life

Thank you @lukaszadrapa 

The simplified calculation & insight you offer is very helpful!

It does look like if the interval for writing 32B data were increased from 'every 1 min' to ' every 2 min' , then certainly the desired EEPROM emulation can be achieved with a 15 year lifetime. Would you agree?


Re: S32K344 Flash Memory Erase Cycles life

There's 128KB of data flash.
Even if I do not consider any overhead caused by Emulated EEPROM mechanism:

"data flash size" / "user data" = 128KB / 2KB = 64 updates

So, the data flash will be full just after 64 updates.

We can perform 100,000 cycles on data flash, so it will gives us 6,400,000 updates.

Doing this every 1 minute for 24 hours a day for 15 years:

6,400,000 / 60 / 24 / 365 = 12 years

But that's ideal situation without any EEE overhead. Fee needs additional data in flash, so it will be less than 12 years.


If you add additional 1MB from code flash:

1024KB / 2KB = 512 updates

We can perform 1000 cycles on code flash: 512,000 updates

512,000 / 60 / 24 / 365 = 1 year


So, this also does not make a difference.

If you want to know the endurance exactly (with EEE overhead), you can find section "3.6.9 Endurance calculation" in Fee user manual.

c:\NXP\S32DS.3.5\S32DS\software\PlatformSDK_S32K3\RTD\Fee_TS_T40D34M50I0R0\doc\RTD_FEE_UM.pdf

But you are not able to reach 15 years in this use-case.

Regards,
Lukas

Re: S32K344 Flash Memory Erase Cycles life

Hi @lukaszadrapa , thanks. I notice we now support FEE in the latest MBDT for S32K3 (V1.6.0) .

Could you help share some insight to the calculation involved for estimating if a certain use-case is feasible or not (in terms of Flash / emulated EEPROM specifications for S32K3).

E.g. , if I need to write 2KB of data every 1 minute for 24 hours a day for 15 years , can this be supported assuming I am able to use FEE & can implement a round-robin sector scheme?


Re: S32K344 Flash Memory Erase Cycles life

Hi @jerryrig 

This is 1MB block on S32K344, so this specification applies:

 

image.png

I can see you are erasing still the same sector in a loop. And because one sector erase == one P/E cycle, you have only 1000 cycles available. So, if you erase the same sector each minute, you have less than 17 hours.

To achieve much better numbers, I would consider to use data flash block which provides  100,000 cycles and I would use EEPROM Emulation feature. There's Autosar Fee driver in RTD for this (notice that it's not available in non-Autosar Ip layer).

Regards,

Lukas

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎11-21-2025 04:25 PM
更新者: