AnsweredAssumed Answered

Eeprom Driver Question(s)

Question asked by Christopher Holland on Jul 23, 2018



I got the Eeprom driver (EEE_Driver_v1.3.0) to work.

So now I have a few questions as to what it is actually doing.

The processor is an MPC5746C.



1. I don't quite understand what swap means?

I am using 2 16 KB "Active" blocks [Block 0 (F9000 - F93FFF) and Block 1(F94000 - F97FFF)]

The example seems to quit when the number of swaps >= 16

 The swaps occur when writing id's (19, 28, 37, 46, 55, 64, 73, 2, 11, 20, 29, 38, 47, 56, 65, 74)

"Swapping: After several record writings, the active block may not have enough free space for a new data record. It is needed to copy all the latest data records to alternative block to clean up the EEPROM. This procedure is called “swapping” and after swapping, the alternative block will become the new active block and the old active block will be formatted as new alternative block."

"Flash Block: It is the smallest portion of flash that can be erased. The minimum block size 16KB"

There is plenty of room in the block for records.



2. I don't understand the eeprom record arrangement?

I took a look at the memory map of the eeprom records.

When I created 338 records, they were all in order.

The example creates 0x50 records. Then, I believe, it over writes the records with new ones?

There is a copy of eeprom records 40 - 4F in the first Block section.

First Block [F90000 - F93FFF]

   128 byte Header

   40 - 4F  (Copy of eeprom records 40 - 4F?)

   00 - 4F  (First Records written)

   00 - 49  (Rewriting records?)

Second Block [F94000 - F97FFF]

   128 byte Header


         (No 4B - 4f, too many swaps)


3) Eeprom Record I.D. 41 is written 3 times. Each record looks the same. How do we differentiate?

[00F90080] FFFF0000 FFFFFFFF 00414041 42434445

[00F91E80] FFFF0000 FFFFFFFF 00414041 42434445

[00F93C80] FFFF0000 FFFFFFFF 00414041 42434445


4) What is the difference between the Number of blocks and number of active blocks?




Thanks for your help,