summaryrefslogtreecommitdiff
path: root/digital/avr/doc/fuses.txt
blob: 1345c0ef6777ec49a5684c1458d2e1f37a57cbac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
===================
 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
usb128  0xff  0xd1  0xf3
====== ===== ===== =====

This correspond to ('!' means unprogrammed, i.e. '1'):

=== === === === ==== ====== =======
m8  m16 m32 m64 m128 usb128 Meaning
=== === === === ==== ====== =======
l7  l7  l7  l7  l7   ..     !BODLEVEL (BOD trigger level)
l6  l6  l6  l6  l6   ..     !BODEN (BOD enabled)
..  ..  ..  ..  ..   l7     !CKDIV8 (divide clock by 8)
..  ..  ..  ..  ..   l6     !CKOUT (clock output)
l5  l5  l5  l5  l5   l5     !SUT1 (start up time)
l4  l4  l4  l4  l4   l4     !SUT0 (start up time)
l3  l3  l3  l3  l3   l3     !CKSEL3 (clock source select)
l2  l2  l2  l2  l2   l2     !CKSEL2 (clock source select)
l1  l1  l1  l1  l1   l1     !CKSEL1 (clock source select)
l0  l0  l0  l0  l0   l0     !CKSEL0 (clock source select)
--- --- --- --- ---- ------ -------
h7  ..  ..  ..  ..   ..     !RSTDISBL (no reset pin disabled)
..  h7  h7  h7  h7   h7     !OCDEN (OCD enabled)
h6  ..  ..  ..  ..   ..     !WDTON (no watchdog always on)
..  h6  h6  h6  h6   h6     !JTAGEN (JTAG enabled)
h5  h5  h5  h5  h5   h5      SPIEN (spi programming enabled)
h4  h4  h4  h4  h4   ..      CKOPT (clock option)
..  ..  ..  ..  ..   h4     !WDTON (watchdog always on)
h3  h3  h3  h3  h3   h3      EESAVE (eeprom preserved on chip erase)
h2  h2  h2  h2  h2   h2      BOOTSZ1 (boot size)
h1  h1  h1  h1  h1   h1      BOOTSZ0 (boot size)
h0  h0  h0  h0  h0   h0     !BOOTRST (use boot reset vector)
--- --- --- --- ---- ------ -------
..  ..  ..  e1  e1          !M103C (ATmega103 compatibility)
..  ..  ..  e0  e0          !WDTON (watchdog always on)
..  ..  ..  ..  ..   e3      HWBE (hardware boot enable)
..  ..  ..  ..  ..   e2      BODLEVEL2 (brown-out detector select)
..  ..  ..  ..  ..   e1     !BODLEVEL1 (brown-out detector select)
..  ..  ..  ..  ..   e0     !BODLEVEL0 (brown-out detector select)
=== === === === ==== ====== =======

- 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.