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

 
 

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

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

Submitter:  Andreas Beckmann <anbe>
Submitted:  Tue 16 Jan 2007 05:02:02 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  joerg_wunsch Originator Name:  anbe
Open/Closed:  Closed Release:  None
Programmer hardware:  Device type: 

Jump to the original submission

Mon 21 May 2007 04:23:52 PM UTC, comment #12: 

Joerg,

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 16 May 2007 05:09:53 AM UTC, 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>
Group administrator
Thu 03 May 2007 06:12:18 PM UTC, comment #10: 

Colin,

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.

Bye,
Klaus

Klaus Leidinger <kllei>
Thu 03 May 2007 02:06:17 AM UTC, 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>
Group Member
Wed 02 May 2007 11:09:22 PM UTC, 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?

Thanks,

 -Colin

Colin O Flynn <c_oflynn>
Group Member
Tue 10 Apr 2007 09:03:03 PM UTC, 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.

HTH,
Klaus Leidinger

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

One more file...

(file #12069)

Steffe <mrstef>
Wed 28 Feb 2007 09:46:41 PM UTC, 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 28 Feb 2007 09:39:21 PM UTC, 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 27 Feb 2007 06:06:21 AM UTC, 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 17 Jan 2007 04:45:43 PM UTC, 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 16 Jan 2007 09:44:56 PM UTC, 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>
Group administrator
Tue 16 Jan 2007 05:02:02 PM UTC, 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #12069:  avrdude_5.3.1.conf added by mrstef (382KiB - application/octet-stream)
file #12068:  avrdude_5.1.conf added by mrstef (234KiB - application/octet-stream)
file #12066:  winxp_ad_5.1.txt added by mrstef (89KiB - text/plain)
file #12067:  winxp_ad_5.3.1.txt added by mrstef (5KiB - text/plain)
file #12050:  avrdude52.txt added by salival (10KiB - text/plain)
file #12051:  avrdude531.txt added by salival (8KiB - text/plain)
file #11770:  avrdude531-conf531.out added by anbe (6KiB - application/octet-stream - debug output from 5.2 and 5.3.1 accessing an AT90S8535)
file #11769:  avrdude52-conf52.out added by anbe (7KiB - 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
  • -email is unavailable- added by c_oflynn (Posted a comment)
  • -email is unavailable- added by kllei (Posted a comment)
  • -email is unavailable- added by mrstef (Updated the item)
  • -email is unavailable- added by salival (Updated the item)
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by anbe (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 14 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-05-16 joerg_wunsch StatusNone Fixed
        Open/ClosedOpen Closed
    2007-05-03 c_oflynn StatusReady For Test None
    2007-05-02 c_oflynn StatusNone Ready For Test
    2007-02-28 mrstef Attached File- Added avrdude_5.3.1.conf, #12069
    2007-02-28 mrstef Attached File- Added avrdude_5.1.conf, #12068
    2007-02-28 mrstef Attached File- Added winxp_ad_5.1.txt, #12066
        Attached File- Added winxp_ad_5.3.1.txt, #12067
    2007-02-27 salival Attached File- Added avrdude52.txt, #12050
        Attached File- Added avrdude531.txt, #12051
    2007-01-17 anbe Attached File- Added avrdude52-conf52.out, #11769
        Attached File- Added avrdude531-conf531.out, #11770
    2007-01-16 joerg_wunsch Assigned toNone joerg_wunsch
    2007-01-16 anbe Carbon-Copy- Added anbe

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code