Implement a way of tracking how many erase-rewrite cycles a part has

undergone.  This utilizes the last two bytes of EEPROM to maintain a
counter that is incremented each time the part is erased.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@138 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Brian S. Dean
2002-08-01 01:00:03 +00:00
parent 5b12f02975
commit 4d2df35736
5 changed files with 152 additions and 11 deletions

View File

@@ -293,6 +293,30 @@ Tells
.Nm
to enter the interactive ``terminal'' mode instead of up- or downloading
files. See below for a detailed description of the terminal mode.
.It Fl y
Tells
.Nm
to use the last two bytes of the connected parts' EEPROM memory to
track the number of times the device has been erased. When this
option is used and the
.Fl e
flag is specified to generate a chip erase, the previous counter will
be saved before the chip erase, it is then incremented, and written
back after the erase cycle completes. Presumably, the device would
only be erased just before being programmed, and thus, this can be
utilized to give an indication of how may erase-rewrite cycles the
part has undergone. Since the FLASH memory can only endure a finite
number of erase-rewrite cycles, one can use this option to track when
a part is nearing the limit. The typical limit for Atmel AVR FLASH is
1000 cycles. Of course, if the application needs the last two bytes
of EEPROM memory, this option should not be used.
.It Fl Y Ar cycles
Instructs
.Nm
to initialize the erase-rewrite cycle counter residing at the last two
bytes of EEPROM memory to the specified value. If the application
needs the last two bytes of EEPROM memory, this option should not be
used.
.El
.Ss Terminal mode
In this mode,