Quick Tip: Reading Fuse Bits in an Arduino

If you are playing around with avrdude and fuses in an Arduino, you might run into an error like:

This is because the Arduino bootloader cannot access fuses in the ATmega. To fix this, we can use another Arduino as an in-system programmer (ISP).

First, hook up your Arduino-as-ISP and target microcontroller as shown in the ArduinoISP tutorial.

Then, run the command (Windows, Mac, and Linux should all be about the same):

which will give you a verbose reading of the LFUSE (along with lots of other good information). Note that you might have to change the following options depending on your setup:

  • -p is the target microcontroller. m328p is an ATmega328p
  • -P is your serial port connected to the Arduino acting as an ISP. This might be something like /dev/ttyUSB0 on Linux.
  • -b is the baud rate. An UNO is 57600.
  • -U is which part of memory (in the target microcontroller) we want to read. The ‘-‘can be replaced by a filename if you want to save the output.

Read more about avrdude options here.

Reading fuses on an Arduino with avrdude

11 Responses

  1. Hi,
    I’ve a broken Sparkfun pro Micro 3V3/8Mhz and tried to reporgram it with a second one as ISP.
    Seems reprogramming works partly, because device is accepting windows7 USB driver again, when connected to PC.
    But behavoir is not as should, e.g.:
    – bootloader doesnt accept the second reset
    – scetches do not run at all

    so I fear that some fuses are set wrongly.
    So I tried to read out the fuses as follows, but result is only “not in sync”.

    Any Ideas what to do?

    Here my results as I got at screen:

    C:\Tools\WinAVR-20100110\bin.2010>avrdude -c avrisp -p m32u4 -P com31 -b 19200 -U lfuse:r:-:i -v

    avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
    Copyright (c) 2007-2009 Joerg Wunsch

    System wide configuration file is “C:\Tools\WinAVR-20100110\bin.2010\avrdude.conf”

    Using Port : com31
    Using Programmer : avrisp
    Overriding Baud Rate : 19200
    avrdude: stk500_getsync(): not in sync: resp=0x00

    avrdude done. Thank you.

    Best Regards

      1. Hello,
        yes, I’ve a second one. But what to test?
        This one runs fine.
        (but I’m afraid to use it outside Arduino Suite, because may also brick)
        I tried to use this one as “pro Micro as ISP” to repair the first one, but I failed.
        My assumption is, that the “Adruion as ISP” scetch is not suitable for “pro Micro”. Because I don’t own a programmer I do not know what to do to unbrick the pro Micro.
        Do you know whether there is a scetch like “pro Micro as ISP” which may help to reprogram a broken “pro Micro”?
        Best Regards

        1. I was curious if you had another Arduino other than the 2 Pro Micros (the drivers for the Pro Micro are known to be very finicky). Were you able to upload the ArduinoISP example sketch to the working Pro Micro? I also recommend checking your wiring with the last entry in this forum post.

          1. Hello,
            yes I already upload the example and did the wiring as described in “forum post” above (didn’t know this post while doing that). But the result was as described above:
            the bootloader didn’t react on the second reset.
            And if I loaded a scetch afterwards, nothing happend (sometimes green led was on, nothing else).

            I was able to repair my first Pro Micro last weekend by accident.
            As described:
            – I selected “Arduino as ISP” as programmer,
            – used my second Pro Micro as ISP
            – per accident I selected “Arduino Nano” as board / target
            – after command “burn bootloader” I figured out, that now a bootloader was available which was detecting the second reset. (Don’t ask me how that can work, because the target µC is Atmega 328 not 32u4)
            – afterwards I loaded an empty Arduino project
            – burned the Pro Micro Bootloader via “Arduino as ISP”
            -> and afterwards I was able to run scetches successful.

            As I said: I don’t have any glue why it’s working now and why it didn’t work before (just by burning the “Pro Micro” bootloader), may be somebody has an idea.
            Nevertheless, I’m happy to have my Pro Micro well working again.

            Best Regards

  2. Hi Thanks for the post really helpful I still get the same problem though with all the fuses been reported as :
    avrdude: safemode: lfuse reads as 0
    avrdude: safemode: hfuse reads as 0
    avrdude: safemode: efuse reads as 0
    I am using a UNO as ISP to a Atmega328. I have the boot loader working.

    1. Definitely double-check your wiring. Just last night, I spent an hour trying to figure out why my ATtiny wasn’t communicating with my UNO (set as ISP). Turns out, I forgot to connect VCC and GND.

Leave a Reply