Add comment about calculating EEPROM lifetime

This commit is contained in:
Julian Metzler 2022-10-21 17:41:44 +02:00
parent e04724794d
commit 59e8fb3a16
1 changed files with 3 additions and 0 deletions

View File

@ -140,6 +140,9 @@ uint32_t* clock_findEepromStartAddress() {
// Scan through EEPROM to find the first location with less than
// the number of cycles specified for wear leveling
// Entry format: <16 Bit Write Counter> <8 Bit Hour> <8 Bit Minute>
// To calculate the time until wrap-around, not taking into account
// Time changed that require a large series of pulses:
// Lifetime (years) = (EEPROM size / 4) * EEPROM_MAX_WRITE_COUNTER / 525960
uint16_t* startAddr = 0;
uint32_t counter = 0;