avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] Programming the efuse on ATmega1280


From: Joerg Wunsch
Subject: Re: [avr-chat] Programming the efuse on ATmega1280
Date: Sun, 3 Feb 2013 22:04:01 +0100 (MET)

Ormund Williams <address@hidden> wrote:

> Now this works fine because 0xF4 sets the correct BOD level so
> it's not a problem but I was just curious, why is bit3 of the efuse
> flipping?

It's not "flipping", it (apparently) *is* set to 0, for whatever
reason.

Presumably, the fuse does exist in the chip, and is already set.

avrdude.conf contains:

    memory "efuse"
        size            = 1;
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
                          "x x x x  x x x x  x x x x  x i i i";

        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
                          "x x x x  x x x x  o o o o  o o o o";

That means, it only ever tries to write the lowest three bits of that
fuse, but it reads back all 8 bits.  Now, if one of the bits not to be
written reads back as "0", it doesn't match your expectation.

You could turn the last line into:

                          "x x x x  x x x x  x x x x  x o o o";

to only consider the lowest three bits, but I'm afraid AVRDUDE is then
going to mask out all the upper 5 bits, so you have to specify the
value as 0x04 in order to get it to verify correctly.

Yes, the latter should be changed ...

Alternatively, you could specify it as 0xf4 in the first place.
-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]