Hi,
We are using MPC5746C MCU with S32DS editor and try to understand the EEPROM Emulation driver working.
There are many functions that prepared for EEPROM Emulation operation in EAR SDK " eee driver".
I've got a question about swap function on message ID number.
We can select flash memory block for EEPROM Emulation via driver setting and we can define ID, the read-write desired value in it at normal working sequence. But when a block is full fill and calling swap function, some ID group do not copy to alternate block why?
The document mentions about swap operation like that;
"the EEPROM emulation software performs a block swap by copying the valid records from the active block to an alternate block."
What is the rule of the valid or invalid of ID message? Which ID message is a member of the valid ID group, which ID message is not?
You can see the ID message in the first image (filled 0x00F9000 address space not swapping yet.) and the second image shows after swap operation ID messages(filled 0x00F9400 address). Some message disappears example 05, 06, 07 Id message do not copy, ID message 04, 08, 0C copies.
Thanks...
Hi,
first, you are talking about "EAR SDK". Notice that there's already BETA 2.9.0 version in latest Update 10 and RTM 3.0.0 will be released soon. It's highly recommended to use the latest version.
Invalid message ID means that you have deleted a record using function EEE_DRV_DeleteRecord(). This command will not delete the record physically but the record won't be copied to new block during next swap operation. So, it will be lost after swap operation.
All valid IDs should be still available after the swap.
Regards,
Lukas
Hi Lukas,
Thanks for your kindly support.
Invalid message ID is OK but I had mentioned the swap function without any using EEE_Drv_Record() function situation.
I had used "eeprom_emulation_mpc5746c" S32 example project and shared the above image of the swap operation before and after. ID 4, 5, 6... exist at the first block, after swap operation, only ID 0x4, 0x8, 0x10 exist.
When you call "EEE_DRV_ReadEeprom()" function and want to reach any lost ID message, function return "STATUS SUCCESS" but the data buffer is empty. Normally function should return "STATUS_EEE_ERROR_DATA_NOT_FOUND" this situation.
Thanks.
Hi,
I couldn't see such behavior. Could you share your project? Where did you stop it?
Regards,
Lukas
Hi,
I've added extra only read function between line 273 - line 310 for looking message ID 0x07U, ID 0x09U except for ID 0x10U on the "eeprom_emulation_mpc5746C" EAR SDK V0.8.1 example project. You can see the breakpoint following image.
It can be seen buffer and return value from watch table. ID 0x7, 0x9, and 0x10 return "STATUS_SUCCESS" but only ID 0x10 buffer includes the value, other ID buffer are empty.
Hi,
as I already mentioned, please use the latest SDK version. There were some changes in the drivers. We can't support EAR versions. If you can see the same behavior in latest RTM 2.0.0 or in latest BETA 2.9.0, just let me know and I can test it and report possible issues to SDK team.
Thanks,
Lukas
Hi,
You can find the related project in the attachment. I've added extra read function between line 273 - line 310 for looking message ID 0x07U, ID 0x09U except ID 0x10U.
It can be seen buffer and return value from watch table. ID 0x7, 0x9, and 0x10 return "STATUS_SUCCESS" but only ID 0x10 buffer includes the value, other ID buffer are empty.
Best regards
Eyüp ÖZER