summaryrefslogtreecommitdiff
path: root/digital/avr
diff options
context:
space:
mode:
authorNicolas Schodet2008-05-27 22:02:22 +0200
committerNicolas Schodet2008-05-27 22:02:22 +0200
commit384e257d56a053a7ef5f85dacf05632c24042ecd (patch)
treee06c46e9d635e6d227fae794fc1f07fc077ff053 /digital/avr
parentb27012ed2747e77675387f2c92af7409db5e4a68 (diff)
* digital/avr/doc:
- added fuse setting.
Diffstat (limited to 'digital/avr')
-rw-r--r--digital/avr/doc/fuses.txt58
1 files changed, 58 insertions, 0 deletions
diff --git a/digital/avr/doc/fuses.txt b/digital/avr/doc/fuses.txt
new file mode 100644
index 00000000..3f353fcd
--- /dev/null
+++ b/digital/avr/doc/fuses.txt
@@ -0,0 +1,58 @@
+===================
+ AVR fuses setting
+===================
+:Author: Ni
+
+AVR devices are shipped with fuses programmed to run on the internal 1 MHz
+oscillator.
+
+Please be very careful when programming fuses as a bad setup can make the AVR
+hard to program again.
+
+Here are the settings used at APBTeam:
+
+====== ===== ===== =====
+Device lfuse hfuse efuse
+====== ===== ===== =====
+m8 0xff 0xc1 --
+m16 0xff 0xc1 --
+m32 0xff 0xc1 --
+m64 0xff 0xc1 0xff
+m128 0xff 0xc1 0xff
+====== ===== ===== =====
+
+This correspond to ('!' means unprogrammed, i.e. '1'):
+
+=== === === === ==== =======
+m8 m16 m32 m64 m128 Meaning
+=== === === === ==== =======
+l7 l7 l7 l7 l7 !BODLEVEL (BOD trigger level)
+l6 l6 l6 l6 l6 !BODEN (BOD enabled)
+l5 l5 l5 l5 l5 !SUT1 (start up time)
+l4 l4 l4 l4 l4 !SUT0 (start up time)
+l3 l3 l3 l3 l3 !CKSEL3 (clock source select)
+l2 l2 l2 l2 l2 !CKSEL2 (clock source select)
+l1 l1 l1 l1 l1 !CKSEL1 (clock source select)
+l0 l0 l0 l0 l0 !CKSEL0 (clock source select)
+--- --- --- --- ---- -------
+h7 .. .. .. .. !RSTDISBL (no reset pin disabled)
+.. h7 h7 h7 h7 !OCDEN (OCD enabled)
+h6 .. .. .. .. !WDTON (no watchdog always on)
+.. h6 h6 h6 h6 !JTAGEN (JTAG enabled)
+h5 h5 h5 h5 h5 SPIEN (spi programming enabled)
+h4 h4 h4 h4 h4 CKOPT (clock option)
+h3 h3 h3 h3 h3 EESAVE (eeprom preserved on chip erase)
+h2 h2 h2 h2 h2 BOOTSZ1 (boot size)
+h1 h1 h1 h1 h1 BOOTSZ0 (boot size)
+h0 h0 h0 h0 h0 !BOOTRST (use boot reset vector)
+--- --- --- --- ---- -------
+.. .. .. e1 e1 !M103C (ATmega103 compatibility)
+.. .. .. e0 e0 !WDTON (watchdog always on)
+=== === === === ==== =======
+
+- CKSEL321 = 111, CKOPT = 0 corresponds to external crystal, more than 1 MHz.
+- CKSEL0 = 1, SUT10 = 11 corresponds to crystal, slowly rising power, this is
+ the longest start-up time.
+
+In the future, we should try to enable BOD (Brown Out Detector) to fix EEPROM
+corruption problems.