bugAVR Downloader/UploaDEr - Bugs: bug #18803, Fuse reading regression in avrdude...


You are not allowed to post comments on this tracker with your current authentification level.

bug #18803: Fuse reading regression in avrdude 5.3.1 with avr910 programmer

Submitted by:  Andreas Beckmann <anbe>
Submitted on:  Tue Jan 16 17:02:02 2007  
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Name: anbe
Open/Closed: ClosedRelease: None
Programmer hardware: Device type: 

(Jump to the original submission Jump to the original submission)

Mon May 21 16:23:52 2007, comment #12:


you are right for the avr109 Protocol. Fuse reading is implemented, writing not (sure for bootloader).
This was pointed wrong from me.

The universal SPI commands are implemented only in the avr910 protocol to keep this a little bit "future aware" for new controllers. (I suppose so)

AFAIK this commands were used in previous Versions of avrdude for high and extendet Fusebits (in avr910 Mode).

But all this is true only for updated avr910 Programmer (eg. devicecodes for new devices) as all the "old" devices do not support high and extendet fuses.

So may be this should better be placed in the "feature request list" for avrdude.

I will test the 5.4 Version to double check.
Bye, Klaus

Klaus Leidinger <kllei>
Wed May 16 05:09:53 2007, comment #11:

Fixed in avr910.c, it now falls back to avr_read_byte_default()
and avr_write_byte_default() again, respectively, except for
eeprom and flash which are handled internally.

You err about the AVR109 protocol: it does have a method to
read fuses, and the fallback to generic SPI commands would not
work for a bootloader anyway. Of course, it does not offer a
method to write fuses, but that's a limitation of the AVR itself.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Thu May 3 18:12:18 2007, comment #10:


thanks for having a look at this. I expect the changes fix the fuse update problem, but will not fix the fuse read/write.

Fuse reading and writing, especially for the newer chips with extendet fuse and hfuse has no command in avr910 and avr109. However both protocols have the "." new universal command and ":" universal Command. You can send the SPI Codes to the Controller this way.

This commands were used in previous Versions of avrdude to read and write fuses. (And also Atmels AVRProg does it in this way)

"unfotunately" I'm on vacation the next 2 weeks, I will have a look after this.


Klaus Leidinger <kllei>
Thu May 3 02:06:17 2007, comment #9:

ps: the changes I made won't affect the actual reading, you should still get the calibration byte error for example. But it shouldn't make it as hard for you to test this now.

Colin O Flynn <c_oflynn>
Project Member
Wed May 2 23:09:22 2007, comment #8:

I made some changes to the safemode code in CVS. It doesn't fail out when prompted with a programmer that doesn't support fuse writing.

I misunderstood what a return code of 'operation not supported' meant, and for some reason thought it meant the operation failed.

When safemode sees this happen, it just silently turns itself off. It makes a lot more sense this way. And by "more sense" I mean the old way of doing it made zero sense... except in my mind at the time apparently ;-)

Also if you put a little verbose (-v) safemode will let you know it's turning itself off. If you put a lot (-vvvv) it will let you know the value of each fuse it tries to read. So future problems should be easier to see.

Could you let me know if this does the trick?



Colin O Flynn <c_oflynn>
Project Member
Tue Apr 10 21:03:03 2007, comment #7:

Looks like the fuse bit reading has changed in Version 5.3.1 ?

Previous Versions used the '.' (new universal command) of avr910 commandset.

When setting -u flag 5.3.1 sets the addres from 0xFC to 0xFF and tries to read data memory (eeprom).

Without -u flag avrdude seems to abort after Signature reading. I could not see any serial commands with Portmon.

Klaus Leidinger

Klaus Leidinger <kllei>
Wed Feb 28 21:48:08 2007, comment #6:

One more file...

(file #12069)

Steffe <mrstef>
Wed Feb 28 21:46:41 2007, comment #5:

Just to supply more info, I have also attached the avrdude.conf which is actually different between the two distributions!

Best Regards

Stefan Nilsson

(file #12068)

Steffe <mrstef>
Wed Feb 28 21:39:21 2007, comment #4:

I see the same problems on Windows XP sp2 (AMD Athlon64 CPU). I am using the WinAVR distribution, and the one which includes avrdude 5.1 works fine, but when switching to avrdude 5.3.1, it fails! The command line is:

avrdude -p at90s2313 -P lpt1 -vvvv -c stk200 -U flash:w:dimmer.hex

I am, as you can see, using a STK200 on the parallell port! I have attached the full output from both versions! (winxp_ad_5.3.1.txt and winxp_ad_5.1.txt)!

Best Regards

Stefan Nilsson

(file #12066, file #12067)

Steffe <mrstef>
Tue Feb 27 06:06:21 2007, comment #3:

same problems here.

OS: Gentoo(~amd64)
Programmer: AVR910-Prog v3.8 from Klaus Leidinger
Config: "vanilla" (not touched)
Target: mega8/mega32
Commandline: avrdude -vvvv -c avr910 -t -p m32 -P /dev/ttyUSB0 -b 115200

output attached.

gruss, bjoern.

(file #12050, file #12051)

Bjoern Mueller <salival>
Wed Jan 17 16:45:43 2007, comment #2:
  • avrdude 5.2 does not read the config from 5.3.1
  • the output from 5.3.1 using config file from 5.2 and 5.3.1 is the same
Andreas Beckmann <anbe>
Tue Jan 16 21:44:56 2007, comment #1:

Please attach the traces obtained from running avrdude with
-vvvv, for both cases.

If you're curious, you could also try isolating whether problem
is tied to the respective avrdude.conf version, or to the program
code itself.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Tue Jan 16 17:02:02 2007, original submission:

Reading fuses, lock and calibration fails with an avr910 programmer and avrdude 5.3.1 (Debian package 5.3.1-1).
This was working with avrdude 5.2 (Debian package 5.2-2).

The programmer used is an ICprog-AVR2.0 KANDA from http://ic-board.de (an AVR910 compatible USB programmer).
The microcontrollers used are AT90S8535 and ATmega8535.

Error from avrdude:

avrdude: Device signature = 0x1e9308
avrdude: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: To protect your AVR the programming will be aborted

and if I override safemode (-u):

avrdude: reading calibration memory:
Reading | | 0% 0.00
savr_read(): error reading address 0x0000
read operation not supported for memory "calibration"
avrdude: failed to read all of calibration memory, rc=-2

After downgrading (back to 5.2-2) everything works fine, again.

Andreas Beckmann <anbe>


Attached Files
file #12069:  avrdude_5.3.1.conf added by mrstef (382kB - application/octet-stream)
file #12068:  avrdude_5.1.conf added by mrstef (234kB - application/octet-stream)
file #12066:  winxp_ad_5.1.txt added by mrstef (89kB - text/plain)
file #12067:  winxp_ad_5.3.1.txt added by mrstef (5kB - text/plain)
file #12050:  avrdude52.txt added by salival (10kB - text/plain)
file #12051:  avrdude531.txt added by salival (8kB - text/plain)
file #11770:  avrdude531-conf531.out added by anbe (6kB - application/octet-stream - debug output from 5.2 and 5.3.1 accessing an AT90S8535)
file #11769:  avrdude52-conf52.out added by anbe (7kB - application/octet-stream - debug output from 5.2 and 5.3.1 accessing an AT90S8535)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by c_oflynn (Posted a comment)
  • -unavailable- added by kllei (Posted a comment)
  • -unavailable- added by mrstef (Updated the item)
  • -unavailable- added by salival (Updated the item)
  • -unavailable- added by joerg_wunsch (Posted a comment)
  • -unavailable- added by anbe (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 14 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed May 16 05:09:53 2007joerg_wunschStatusNone=>Fixed
    Thu May 3 02:06:17 2007c_oflynnStatusReady For Test=>None
    Wed May 2 23:09:22 2007c_oflynnStatusNone=>Ready For Test
    Wed Feb 28 21:48:08 2007mrstefAttached File-=>Added avrdude_5.3.1.conf, #12069
    Wed Feb 28 21:46:41 2007mrstefAttached File-=>Added avrdude_5.1.conf, #12068
    Wed Feb 28 21:39:21 2007mrstefAttached File-=>Added winxp_ad_5.1.txt, #12066
      Attached File-=>Added winxp_ad_5.3.1.txt, #12067
    Tue Feb 27 06:06:21 2007salivalAttached File-=>Added avrdude52.txt, #12050
      Attached File-=>Added avrdude531.txt, #12051
    Wed Jan 17 16:39:01 2007anbeAttached File-=>Added avrdude52-conf52.out, #11769
      Attached File-=>Added avrdude531-conf531.out, #11770
    Tue Jan 16 21:44:56 2007joerg_wunschAssigned toNone=>joerg_wunsch
    Tue Jan 16 17:02:02 2007anbeCarbon-Copy-=>Added anbe

    Back to the top

    Powered by Savane 3.1-cleanup