Change fuse settings to preserve the eeprom when reprogramming.
authorPat Thoyts <patthoyts@users.sourceforge.net>
Wed, 6 Nov 2013 22:18:25 +0000 (22:18 +0000)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Wed, 6 Nov 2013 22:18:25 +0000 (22:18 +0000)
This allows the serial number and calibration setting to be written once
and preserved subsequently.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Makefile

index 00c04f7f5b0d32ab6b342492cec8793692b1d263..06df2560fe18d0d4db48cf9afb358fa0cb91b41e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -64,8 +64,9 @@ flash:        all
 #        +-------------------- CKDIV8 (divide clock by 8 -> don't divide)
 # For 16.5MHz internal: -U hfuse:w:0xdd:m -U lfuse:w:0xe1:m
 # For 12MHz crystal: -U hfuse:w:0xdd:m -U lfuse:w:0b11111111:m
+# Note: 0xd5 is as per 0xdd but with EESAVE enabled.
 fuse:
-       $(AVRDUDE) -U hfuse:w:0xdd:m -U lfuse:w:0xe1:m
+       $(AVRDUDE) -U hfuse:w:0xd5:m -U lfuse:w:0xe1:m
 
 readcal:
        $(AVRDUDE) -U calibration:r:/dev/stdout:i | head -1