SOLVED: Problem programming fuses ATXmega128A4U

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I am having problems with AVR tools (again).    I am trying to program the fuses of an ATXmega128A4U.   fuse1:0x88 fuse2:0xff fuse4:0xf1 and fuse5 0xf6.

 

First thing I tried (what normally works) was

avrdude -c jtag2pdi -P usb -p x128a4u -u -U fuse1:w:0x88:m -U fuse2:w:0xff:m -U fuse4:w:0xf2:m -U fuse5:w:0xf6:m 

The response was:

avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e9746
avrdude: NOTE: Programmer supports page erase for Xmega devices.
         Each page will be erased before programming it, but no chip erase is performed.
         To disable page erases, specify the -D option; for a chip-erase, use the -e option.
avrdude: reading input file "0x88"
avrdude: writing fuse1 (1 bytes):
avrdude: 1 bytes of fuse1 written
avrdude: verifying fuse1 memory against 0x88:
avrdude: load data fuse1 data from input file 0x88:
avrdude: input file 0x88 contains 1 bytes
avrdude: reading on-chip fuse1 data:
avrdude: verifying ...
avrdude: 1 bytes of fuse1 verified
avrdude: reading input file "0xff"
avrdude: writing fuse2 (1 bytes):
avrdude: 1 bytes of fuse2 written
avrdude: verifying fuse2 memory against 0xff:
avrdude: load data fuse2 data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip fuse2 data:
avrdude: verifying ...
avrdude: 1 bytes of fuse2 verified
avrdude: reading input file "0xf2"
avrdude: writing fuse4 (1 bytes):
avrdude: 1 bytes of fuse4 written
avrdude: verifying fuse4 memory against 0xf2:
avrdude: load data fuse4 data from input file 0xf2:
avrdude: input file 0xf2 contains 1 bytes
avrdude: reading on-chip fuse4 data:
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0xfe != 0xf2
avrdude: verification error; content mismatch

avrdude done.  Thank you.

 

Ok, I am getting this error message on fuse4 all the time when programming XmegaA3U; nothing to get excited about; normally works the second time; so I simply ran it again.

 

avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e9746
avrdude: NOTE: Programmer supports page erase for Xmega devices.
         Each page will be erased before programming it, but no chip erase is performed.
         To disable page erases, specify the -D option; for a chip-erase, use the -e option.
avrdude: reading input file "0x88"
avrdude: writing fuse1 (1 bytes):
avrdude: 1 bytes of fuse1 written
avrdude: verifying fuse1 memory against 0x88:
avrdude: load data fuse1 data from input file 0x88:
avrdude: input file 0x88 contains 1 bytes
avrdude: reading on-chip fuse1 data:
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x00 != 0x88
avrdude: verification error; content mismatch

avrdude done.  Thank you.

This is repeatable.

 

Ok, next try, dug out an old jtagice3, connected it.

avrdude -c jtag3pdi -P usb -p x128a4u -u -U fuse1:w:0x88:m -U fuse2:w:0xff:m -U fuse4:w:0xf2:m -U fuse5:w:0xf6:m 
avrdude: usbdev_open(): did not find any USB device "usb"

udev rules are set; I believe 03eb:2140 is the ID for the Atmel jtagice3 (forgot to say avrdude is running under Linux here).   Is there another interface name I have to use with "-P" with the ice3?

 

Next attempt: Started an old windoze computer with Studio 4.19 on it.   128A4U of course is not supported but selecting an 32A4U I could read the fuses which were 0x88 0xff 0xf2 and 0xff.    So it seems avrdude is wrong when claiming fuse1 is 0x00.  And was wrong when verifying fuse4 earlier.

 

Then I tried Studio 6.1 under windoze.    Apart that the thing is creeping like a crippled worm I had no success here whatsoever; neither the jtagice2 nor the jtagice3 worked reliably; I got timeouts all the time and in the message box it said a few times "usb device has been disconnected".    USB cable I believe is good; the ice2 works fine with other controllers and the ice3 cable is brand new supplied by Atmel (or wherever they got it from).   The ice2 sometimes worked and it showed me the same fuse settings as 4.19 before.

 

I also believe my connector pinout is correct: 2-Gnd  4-Vcc  6-pdi_clk  9-pdi_data  10-Gnd.   Supply voltage is 3.300V.   Studio6.1 actually claimed a few times it is 0.0V; clicking on the read voltage button revealed 3,3V then every time.

 

Anybody an idea what is going on here?

Last Edited: Sat. Jan 3, 2015 - 05:46 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, used another board.   Figured it was a fried Atmel CPU.

 

avrdude works fine now apart from the glitch that I have to run it twice for the fuse settings.

 

Maybe the moderators can delete the thread; there is enough garbage already on the World Wide Waste.

 

My apologies for not trying another board first before posting.

Last Edited: Sat. Jan 3, 2015 - 05:49 PM