MPR/MIB User’s Manual
Wireless Sensor Networks
Doc. # 7430-0021-06 Rev. A
Page 33
10 A
TMEGA
128 F
USES
The ATMega128L processor on the Motes has many programmable fuses to control various
parameters. Refer to Atmel’s technical information for the ATMega128L for a complete
discussion of the fuses (
http://www.atmel.com/dyn/resources/prod_documents/2467s.pdf
). There
are two fuses that TinyOS users should be aware of as setting these fuses incorrectly will cause
the unit to not operate correctly.
10.1.1
Atmega103 compatibility mode fuse
This fuse put the ATMega128 in the ATMega103 compatible mode. This fuse was set for the
older generation MICA units. It must be disabled for MICA2 and MICA2DOTs.
10.1.2
JTAG fuse
This fuse enables users to use the Atmel JTAG pod for in-circuit code debugging. Units are
shipped with JTAG enabled. As discussed in the previous section on battery voltage monitoring,
if JTAG is enabled, it will cause inaccurate measurements on ADC channel 7.
10.1.3
Using UISP to set fuses
The UISP utility used to download code to the MICAz, MICA2, or MICA2DOT on a
programming board can also be used to set and unset fuses of the Atmel
®
ATMega128.
Table 10-1.
UISP Commands for Setting the ATMega128’s Fuses.
Action
Command
Disable JTAG fuse
uisp -dprog
=<programmer>
--wr_fuse_h=0xD9
Enable JTAG fuse
uisp -dprog=
<programmer>
--wr_fuse_h=0x19
Enable native 128 mode
uisp -dprog=
<programmer>
--wr_fuse_e=ff
<programmer>
is the device you are using to interface to the Mote from a computer. The current options
are
dapa
(for an MIB500),
mib510
for a MIB510; and
EPRB
for a MIB600.
Users can also edit the file called
profile
in the
cygwin/etc/
directory and enter an alias. One
example is this alias to disable the JTAG fuse:
alias fuse_dis="uisp -dprog=
<programmer>
--wr_fuse_h=0xD9"
Therefore, when
fuse_dis
and is entered into a Cygwin command line, the script will be
executed.