I found a problem when I debug the S32K344 FEE code.
If we write 4 bytes data we need the define a 6 bytes variable to read it or else
we cannot get the correct data.Why this happened?
The source code is as below
uint8 Eeprom_1[4];
uint8 EepromRead_1[6]={0};
for(uint8 i=0;i<4;i++)
{
Eeprom_1[i]=i;
}
Fls_Init(NULL_PTR);
Fee_Init(NULL_PTR);
while(Fee_GetStatus()!=MEMIF_IDLE)
{
Fls_MainFunction();
Fee_MainFunction();
}
Fee_Write(FeeConf_FeeBlockConfiguration_FeeBlockConfiguration_0,Eeprom_1);
while(Fee_GetStatus()!=MEMIF_IDLE)
{
Fls_MainFunction();
Fee_MainFunction();
}
Fee_Read(FeeConf_FeeBlockConfiguration_FeeBlockConfiguration_0,0,EepromRead_1,4);
while(Fee_GetStatus()!=MEMIF_IDLE)
{
Fls_MainFunction();
Fee_MainFunction();
}