9 PERFORMANCE

Effective Endurance:

Determining effective endurance is not a trivial calculation because it is dependent on many factors. Traditionally, endurance is defined as the number of times a single address can be safely written. This definition does not apply to emulated data EEPROM for a few different reasons.

First, writing a data EEPROM address five times does not mean five erase/write cycles of endurance were consumed. From the perspective of the program memory, five writes were made to five different program memory addresses. These five writes will not cost any additional endurance cycles until the page is filled and the pack routine is called.

Second, calculating effective endurance is more than simply multiplying program memory page size and the size of the emulated data EEPROM. The entire page is not available for emulation. The page status information is stored in the beginning of the page, which is either one location of program memory for the 16-bit algorithm or two for 8-bit. In addition, more locations will be consumed after the pack routine depending on how many data EEPROM addresses were written. As a result, writing an address once has a significant impact to endurance because one less location is available after the array is packed.

Based on the discussion to this point, a simplified equation, Equation-1 can be made for total effective endurance. For more information on the terms, refer to “Definition of Terms”.

Working through an example for the PIC24FJ128GA010, this device has a 512-word page. The 16-bit algorithm reserves one location for page status.

Equation-2 provides the formula for calculating two pages of program memory, 10 locations of emulated data EEPROM and the typical endurance limit.

An average effective endurance can be calculated by dividing the total effective endurance by the size of the emulated data EEPROM bank, but this does not tell the whole story. It assumes that every data EEPROM address is updated at the same rate. In most applications, this is not true. Some data, such as calibration data or user information, may be rarely updated, while sensor information can be written more frequently. Addresses written more often will consume a greater amount of program memory endurance. Therefore, how writes are distributed across the data EEPROM addresses significantly affects effective endurance. Ratios could be assigned to each address to create a more accurate calculation, but this is still only an approximation. It is difficult to predict how often each address will be written during an application’s lifetime.

EQUATION 1: EFFECTIVE ENDURANCE

Calculated Total Effective endurance = (Page Size – Page Status Size – Maximum Data EE Size Per Bank) x Number of Pages Flash Pages Per EEPROM Bank x Requested Total Effective Endurance.

EQUATION 2: EFFECTIVE ENDURANCE CALCULATION EXAMPLE

Calculated Total Effective endurance = (512 – 1 – 10) x 2 x 1000 = 1002000 Cycles

Note: In devices with ECC , the flash page size to be used for calculation should be (flash page size /2) because the hardware has one ECC per two instruction words, but DEE operate at a single instruction word level. So for devices with ECC, DEE uses every other instruction word only.