ATXMEGA256A3U and AVR Dragon [cable too long]

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

Hello,

I have a board designed for the ATXMEGA256A3/ATXMEGA256A3U which I've just built. Now I want to check that the MCU is working properly by simply connecting the AVR Dragon (USB) via JTAG to the board and checking the output of avrdude/avarice (I'm running Ubuntu Linux).

Avrdude gives me an error:

Quote:

avrdude -c dragon_jtag -P usb -p x256a3

avrdude: jtagmkII_setparm(): bad response to set parameter command: RSP_FAILED
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: jtagmkII_close(): bad response to GO command: RSP_ILLEGAL_EMULATOR_MODE

avrdude done. Thank you.

If I provide the "-F" I get:

Quote:

avrdude -c dragon_jtag -P usb -p x256a3 -F

avrdude: jtagmkII_setparm(): bad response to set parameter command: RSP_FAILED
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATXMEGA256A3 is 1E 98 42
avrdude: jtagmkII_close(): bad response to GO command: RSP_ILLEGAL_EMULATOR_MODE

avrdude done. Thank you.

I've also tried "-v" (verbose mode). See output at the end of this message.

I've also tried avarice but also with error:

Quote:

avarice --xmega --dragon -j usb
AVaRICE version 2.10, Jan 26 2011 16:48:09

Defaulting JTAG bitrate to 250 kHz.

JTAG config starting.
Found a device: AVRDRAGON
Serial number: 00:a2:00:01:16:94
set paramater command failed

Versions:
avrdude: 5.10
avarice: 2.10
(they both work fine with a board having an at90usb1287)

I've checked the voltage across the XMEGA and is 3.3 which should be fine. I have also checked the power consumption and is about 1.8mA which I think should be fine.

I am not providing any clock, therefore relying on the internal 2MHz oscillator (the datasheet says that this XMEGA will use the internal 2MHz oscillator after reset).

If you have any advice on what could be the problem or if I am doing something stupid please let me know.

Thanks.

Here is the output of avrdude with -v:

Quote:

avrdude -c dragon_jtag -P usb -p x256a3 -v

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

System wide configuration file is "/local/scratch/osc22/tools/avr/etc/avrdude.conf"
User configuration file is "/home/osc22/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : usb
Using Programmer : dragon_jtag
avrdude: usbdev_open(): Found AVRDRAGON, serno: 00A200011694
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 6.11
hardware version: 1
S_MCU:
boot-loader FW version: 255
firmware version: 6.11
hardware version: 7
Serial number: 00:a2:00:01:16:94
Device ID: AVRDRAGON
AVR Part : ATXMEGA256A3
Chip Erase delay : 0 us
PAGEL : P00
BS2 : P00
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 0
StabDelay : 0
CmdexeDelay : 0
SyncLoops : 0
ByteDelay : 0
PollIndex : 0
PollValue : 0x00
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 0 0 0 0 no 4096 32 0 0 0 0x00 0x00
application 0 0 0 0 no 262144 256 0 0 0 0x00 0x00
apptable 0 0 0 0 no 8192 256 0 0 0 0x00 0x00
boot 0 0 0 0 no 8192 256 0 0 0 0x00 0x00
flash 0 0 0 0 no 270336 256 0 0 0 0x00 0x00
prodsig 0 0 0 0 no 512 256 0 0 0 0x00 0x00
usersig 0 0 0 0 no 512 256 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse1 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse2 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse4 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse5 0 0 0 0 no 1 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 0 0 0x00 0x00

Programmer Type : DRAGON_JTAG
Description : Atmel AVR Dragon in JTAG mode
M_MCU hardware version: 1
M_MCU firmware version: 6.11
S_MCU hardware version: 7
S_MCU firmware version: 6.11
Serial number: 00:a2:00:01:16:94
Vtarget : 3.3 V
JTAG clock : 891.7 kHz (1.1 us)

JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 6.11
hardware version: 1
S_MCU:
boot-loader FW version: 255
firmware version: 6.11
hardware version: 7
Serial number: 00:a2:00:01:16:94
Device ID: AVRDRAGON
avrdude: jtagmkII_setparm(): bad response to set parameter command: RSP_FAILED
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: jtagmkII_close(): bad response to GO command: RSP_ILLEGAL_EMULATOR_MODE

avrdude done. Thank you.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

After some troubleshooting and testing (or Divine inspiration) I found a solution.

In short: use 1.8V to power the XMEGA rather than 3.3V when using the AVR Dragon via JTAG/USB.

More details:
I've done a "-vvvv" output when using 3.3V and this is the result:

Quote:

avrdude -c dragon_jtag -P usb -p x256a3 -vvvv

avrdude: Version 5.11.1, compiled on Apr 4 2012 at 10:10:51
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "/local/scratch/osc22/tools/avr/etc/avrdude.conf"
User configuration file is "/home/osc22/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : usb
Using Programmer : dragon_jtag
avrdude: jtagmkII_dragon_open()
avrdude: usbdev_open(): Found AVRDRAGON, serno: 00A200011694
avrdude: usbdev_open(): using read endpoint 0x82
avrdude: jtagmkII_getsync()
avrdude: jtagmkII_getsync(): Sending sign-on command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [00] . [00] . [01] . [00] . [00] . [00] . [0e] . [01] . [f3] . [97]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 0 (command_sequence == 0)
avrdude: Recv: . [86] . [01] . [ff] . [0b] . [06] . [01] . [ff] . [0b] . [06] . [07] . [00] . [a2] . [00] . [01] . [16] . [94] A [41] V [56] R [52] D [44] R [52] A [41] G [47] O [4f] N [4e] . [00]

Raw message:
0x860x010xff0x0b0x060x010xff0x0b0x060x070x000xa20x000x010x160x94
0x410x560x520x440x520x410x470x4f0x4e0x00
Sign-on succeeded

JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 6.11
hardware version: 1
S_MCU:
boot-loader FW version: 255
firmware version: 6.11
hardware version: 7
Serial number: 00:a2:00:01:16:94
Device ID: AVRDRAGON
avrdude: jtagmkII_getsync(): Using a 298-byte device descriptor
avrdude: jtagmkII_setparm()
avrdude: jtagmkII_setparm(): Sending set parameter command (parm 0x03, 1 bytes):
avrdude: jtagmkII_send(): sending 3 bytes
avrdude: Sent: . [1b] . [01] . [00] . [03] . [00] . [00] . [00] . [0e] . [02] . [03] . [01] . [9b] E [45]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 1 (command_sequence == 1)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: jtagmkII_getsync(): Sending get sync command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [02] . [00] . [01] . [00] . [00] . [00] . [0e] . [0f] . [e2] u [75]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 2 (command_sequence == 2)
avrdude: Recv: . [80]

Raw message:
0x80
OK

AVR Part : ATXMEGA256A3
Chip Erase delay : 0 us
PAGEL : P00
BS2 : P00
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 0
StabDelay : 0
CmdexeDelay : 0
SyncLoops : 0
ByteDelay : 0
PollIndex : 0
PollValue : 0x00
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 0 0 0 0 no 4096 32 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
application 0 0 0 0 no 262144 256 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
apptable 0 0 0 0 no 8192 256 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
boot 0 0 0 0 no 8192 256 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
flash 0 0 0 0 no 270336 256 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
prodsig 0 0 0 0 no 512 256 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
usersig 0 0 0 0 no 512 256 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
fuse1 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
fuse2 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
fuse4 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
fuse5 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
lock 0 0 0 0 no 1 0 0 0 0 0x00 0x00

Programmer Type : DRAGON_JTAG
Description : Atmel AVR Dragon in JTAG mode
avrdude: jtagmkII_getparm()
avrdude: jtagmkII_getparm(): Sending get parameter command (parm 0x01):
avrdude: jtagmkII_send(): sending 2 bytes
avrdude: Sent: . [1b] . [03] . [00] . [02] . [00] . [00] . [00] . [0e] . [03] . [01] . [d3] . [99]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 3 (command_sequence == 3)
avrdude: Recv: . [81] . [01] . [07]

Raw message:
0x810x010x07
parameter values:
0x01 0x07

avrdude: jtagmkII_getparm()
avrdude: jtagmkII_getparm(): Sending get parameter command (parm 0x02):
avrdude: jtagmkII_send(): sending 2 bytes
avrdude: Sent: . [1b] . [04] . [00] . [02] . [00] . [00] . [00] . [0e] . [03] . [02] . [aa] B [42]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 4 (command_sequence == 4)
avrdude: Recv: . [81] . [0b] . [06] . [0b] . [06]

Raw message:
0x810x0b0x060x0b0x06
parameter values:
0x0b 0x06 0x0b 0x06

M_MCU hardware version: 1
M_MCU firmware version: 6.11
S_MCU hardware version: 7
S_MCU firmware version: 6.11
Serial number: 00:a2:00:01:16:94
avrdude: jtagmkII_getparm()
avrdude: jtagmkII_getparm(): Sending get parameter command (parm 0x06):
avrdude: jtagmkII_send(): sending 2 bytes
avrdude: Sent: . [1b] . [05] . [00] . [02] . [00] . [00] . [00] . [0e] . [03] . [06] s [73] I [49]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 5 (command_sequence == 5)
avrdude: Recv: . [81] . [f6] . [0c]

Raw message:
0x810xf60x0c
parameter values:
0xf6 0x0c

Vtarget : 3.3 V
avrdude: jtagmkII_getparm()
avrdude: jtagmkII_getparm(): Sending get parameter command (parm 0x07):
avrdude: jtagmkII_send(): sending 2 bytes
avrdude: Sent: . [1b] . [06] . [00] . [02] . [00] . [00] . [00] . [0e] . [03] . [07] . [fd] . [8e]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 6 (command_sequence == 6)
avrdude: Recv: . [81] . [06]

Raw message:
0x810x06
parameter values:
0x06

JTAG clock : 891.7 kHz (1.1 us)

avrdude: jtagmkII_setparm()
avrdude: jtagmkII_setparm(): Sending set parameter command (parm 0x1b, 4 bytes):
avrdude: jtagmkII_send(): sending 6 bytes
avrdude: Sent: . [1b] . [07] . [00] . [06] . [00] . [00] . [00] . [0e] . [02] . [1b] . [00] . [00] . [00] . [00] . [f0] | [7c]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 7 (command_sequence == 7)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: jtagmkII_set_devdescr(): Sending set device descriptor command:
avrdude: jtagmkII_send(): sending 299 bytes
avrdude: Sent: . [1b] . [08] . [00] + [2b] . [01] . [00] . [00] . [0e] . [0c] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [01] [20] . [00] . [00] . [00] . [00] . [00] . [00] . [00] [20] . [04] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] [20] . [04] . [00] . [00] . [00] . [00] . [00] . [01] . [02] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [1d] a [61]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 8 (command_sequence == 8)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: jtagmkII_getsync()
avrdude: jtagmkII_getsync(): Sending sign-on command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [09] . [00] . [01] . [00] . [00] . [00] . [0e] . [01] . [f0] ; [3b]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 9 (command_sequence == 9)
avrdude: Recv: . [86] . [01] . [ff] . [0b] . [06] . [01] . [ff] . [0b] . [06] . [07] . [00] . [a2] . [00] . [01] . [16] . [94] A [41] V [56] R [52] D [44] R [52] A [41] G [47] O [4f] N [4e] . [00]

Raw message:
0x860x010xff0x0b0x060x010xff0x0b0x060x070x000xa20x000x010x160x94
0x410x560x520x440x520x410x470x4f0x4e0x00
Sign-on succeeded

JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 6.11
hardware version: 1
S_MCU:
boot-loader FW version: 255
firmware version: 6.11
hardware version: 7
Serial number: 00:a2:00:01:16:94
Device ID: AVRDRAGON
avrdude: jtagmkII_getsync(): Using a 298-byte device descriptor
avrdude: jtagmkII_setparm()
avrdude: jtagmkII_setparm(): Sending set parameter command (parm 0x03, 1 bytes):
avrdude: jtagmkII_send(): sending 3 bytes
avrdude: Sent: . [1b] . [0a] . [00] . [03] . [00] . [00] . [00] . [0e] . [02] . [03] . [05] . [ff] . [1e]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 10 (command_sequence == 10)
avrdude: Recv: . [a0]

Raw message:
0xa0
FAILED

avrdude: jtagmkII_setparm(): bad response to set parameter command: RSP_FAILED
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: jtagmkII_close()
avrdude: jtagmkII_close(): Sending GO command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [0b] . [00] . [01] . [00] . [00] . [00] . [0e] . [08] ^ [5e] . [ad]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 11 (command_sequence == 11)
avrdude: Recv: . [a4]

Raw message:
0xa4
Illegal emulator mode

avrdude: jtagmkII_close(): bad response to GO command: RSP_ILLEGAL_EMULATOR_MODE
avrdude: jtagmkII_close(): Sending sign-off command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [0c] . [00] . [01] . [00] . [00] . [00] . [0e] . [00] . [18] . [bd]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 12 (command_sequence == 12)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude done. Thank you.

Looking a bit around I couldn't find much help. The JTAG protocol:
http://www.atmel.com/Images/doc2...
says that the first error appears when trying to set the emulator parameter of the Dragon as JTAG_XMEGA rather than JTAG_MegaAVR.
No idea why this fails, if someone has a good explanation I would be happy to hear.

Then just to check what happens on a different voltage (to be sure that the output of avrdude is actually the voltage on my board) I tried supplying the board with 1.8 V and I run avrdude again (long output here):

Quote:

avrdude -c dragon_jtag -P usb -p x256a3 -vvvv

avrdude: Version 5.11.1, compiled on Apr 4 2012 at 10:10:51
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "/local/scratch/osc22/tools/avr/etc/avrdude.conf"
User configuration file is "/home/osc22/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : usb
Using Programmer : dragon_jtag
avrdude: jtagmkII_dragon_open()
avrdude: usbdev_open(): Found AVRDRAGON, serno: 00A200011694
avrdude: usbdev_open(): using read endpoint 0x82
avrdude: jtagmkII_getsync()
avrdude: jtagmkII_getsync(): Sending sign-on command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [00] . [00] . [01] . [00] . [00] . [00] . [0e] . [01] . [f3] . [97]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 0 (command_sequence == 0)
avrdude: Recv: . [86] . [01] . [ff] . [0b] . [06] . [01] . [ff] . [0b] . [06] . [07] . [00] . [a2] . [00] . [01] . [16] . [94] A [41] V [56] R [52] D [44] R [52] A [41] G [47] O [4f] N [4e] . [00]

Raw message:
0x860x010xff0x0b0x060x010xff0x0b0x060x070x000xa20x000x010x160x94
0x410x560x520x440x520x410x470x4f0x4e0x00
Sign-on succeeded

JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 6.11
hardware version: 1
S_MCU:
boot-loader FW version: 255
firmware version: 6.11
hardware version: 7
Serial number: 00:a2:00:01:16:94
Device ID: AVRDRAGON
avrdude: jtagmkII_getsync(): Using a 298-byte device descriptor
avrdude: jtagmkII_setparm()
avrdude: jtagmkII_setparm(): Sending set parameter command (parm 0x03, 1 bytes):
avrdude: jtagmkII_send(): sending 3 bytes
avrdude: Sent: . [1b] . [01] . [00] . [03] . [00] . [00] . [00] . [0e] . [02] . [03] . [01] . [9b] E [45]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 1 (command_sequence == 1)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: jtagmkII_getsync(): Sending get sync command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [02] . [00] . [01] . [00] . [00] . [00] . [0e] . [0f] . [e2] u [75]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 2 (command_sequence == 2)
avrdude: Recv: . [80]

Raw message:
0x80
OK

AVR Part : ATXMEGA256A3
Chip Erase delay : 0 us
PAGEL : P00
BS2 : P00
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 0
StabDelay : 0
CmdexeDelay : 0
SyncLoops : 0
ByteDelay : 0
PollIndex : 0
PollValue : 0x00
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 0 0 0 0 no 4096 32 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
application 0 0 0 0 no 262144 256 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
apptable 0 0 0 0 no 8192 256 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
boot 0 0 0 0 no 8192 256 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
flash 0 0 0 0 no 270336 256 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
prodsig 0 0 0 0 no 512 256 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
usersig 0 0 0 0 no 512 256 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
fuse1 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
fuse2 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
fuse4 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
fuse5 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
lock 0 0 0 0 no 1 0 0 0 0 0x00 0x00

Programmer Type : DRAGON_JTAG
Description : Atmel AVR Dragon in JTAG mode
avrdude: jtagmkII_getparm()
avrdude: jtagmkII_getparm(): Sending get parameter command (parm 0x01):
avrdude: jtagmkII_send(): sending 2 bytes
avrdude: Sent: . [1b] . [03] . [00] . [02] . [00] . [00] . [00] . [0e] . [03] . [01] . [d3] . [99]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 3 (command_sequence == 3)
avrdude: Recv: . [81] . [01] . [07]

Raw message:
0x810x010x07
parameter values:
0x01 0x07

avrdude: jtagmkII_getparm()
avrdude: jtagmkII_getparm(): Sending get parameter command (parm 0x02):
avrdude: jtagmkII_send(): sending 2 bytes
avrdude: Sent: . [1b] . [04] . [00] . [02] . [00] . [00] . [00] . [0e] . [03] . [02] . [aa] B [42]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 4 (command_sequence == 4)
avrdude: Recv: . [81] . [0b] . [06] . [0b] . [06]

Raw message:
0x810x0b0x060x0b0x06
parameter values:
0x0b 0x06 0x0b 0x06

M_MCU hardware version: 1
M_MCU firmware version: 6.11
S_MCU hardware version: 7
S_MCU firmware version: 6.11
Serial number: 00:a2:00:01:16:94
avrdude: jtagmkII_getparm()
avrdude: jtagmkII_getparm(): Sending get parameter command (parm 0x06):
avrdude: jtagmkII_send(): sending 2 bytes
avrdude: Sent: . [1b] . [05] . [00] . [02] . [00] . [00] . [00] . [0e] . [03] . [06] s [73] I [49]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 5 (command_sequence == 5)
avrdude: Recv: . [81] [20] . [07]

Raw message:
0x810x200x07
parameter values:
0x20 0x07

Vtarget : 1.8 V
avrdude: jtagmkII_getparm()
avrdude: jtagmkII_getparm(): Sending get parameter command (parm 0x07):
avrdude: jtagmkII_send(): sending 2 bytes
avrdude: Sent: . [1b] . [06] . [00] . [02] . [00] . [00] . [00] . [0e] . [03] . [07] . [fd] . [8e]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 6 (command_sequence == 6)
avrdude: Recv: . [81] . [06]

Raw message:
0x810x06
parameter values:
0x06

JTAG clock : 891.7 kHz (1.1 us)

avrdude: jtagmkII_setparm()
avrdude: jtagmkII_setparm(): Sending set parameter command (parm 0x1b, 4 bytes):
avrdude: jtagmkII_send(): sending 6 bytes
avrdude: Sent: . [1b] . [07] . [00] . [06] . [00] . [00] . [00] . [0e] . [02] . [1b] . [00] . [00] . [00] . [00] . [f0] | [7c]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 7 (command_sequence == 7)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: jtagmkII_set_devdescr(): Sending set device descriptor command:
avrdude: jtagmkII_send(): sending 299 bytes
avrdude: Sent: . [1b] . [08] . [00] + [2b] . [01] . [00] . [00] . [0e] . [0c] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [01] [20] . [00] . [00] . [00] . [00] . [00] . [00] . [00] [20] . [04] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] [20] . [04] . [00] . [00] . [00] . [00] . [00] . [01] . [02] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [00] . [1d] a [61]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 8 (command_sequence == 8)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: jtagmkII_getsync()
avrdude: jtagmkII_getsync(): Sending sign-on command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [09] . [00] . [01] . [00] . [00] . [00] . [0e] . [01] . [f0] ; [3b]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 9 (command_sequence == 9)
avrdude: Recv: . [86] . [01] . [ff] . [0b] . [06] . [01] . [ff] . [0b] . [06] . [07] . [00] . [a2] . [00] . [01] . [16] . [94] A [41] V [56] R [52] D [44] R [52] A [41] G [47] O [4f] N [4e] . [00]

Raw message:
0x860x010xff0x0b0x060x010xff0x0b0x060x070x000xa20x000x010x160x94
0x410x560x520x440x520x410x470x4f0x4e0x00
Sign-on succeeded

JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 6.11
hardware version: 1
S_MCU:
boot-loader FW version: 255
firmware version: 6.11
hardware version: 7
Serial number: 00:a2:00:01:16:94
Device ID: AVRDRAGON
avrdude: jtagmkII_getsync(): Using a 298-byte device descriptor
avrdude: jtagmkII_setparm()
avrdude: jtagmkII_setparm(): Sending set parameter command (parm 0x03, 1 bytes):
avrdude: jtagmkII_send(): sending 3 bytes
avrdude: Sent: . [1b] . [0a] . [00] . [03] . [00] . [00] . [00] . [0e] . [02] . [03] . [05] . [ff] . [1e]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 10 (command_sequence == 10)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: jtagmkII_getsync(): Sending get sync command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [0b] . [00] . [01] . [00] . [00] . [00] . [0e] . [0f] . [e1] . [d9]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 11 (command_sequence == 11)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: jtagmkII_reset(): Sending reset command:
avrdude: jtagmkII_send(): sending 2 bytes
avrdude: Sent: . [1b] . [0c] . [00] . [02] . [00] . [00] . [00] . [0e] . [0b] . [01] ; [3b] . [c1]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 12 (command_sequence == 12)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: AVR device initialized and ready to accept instructions

Reading | | 0% 0.00savrdude: jtagmkII_read_byte(.., signature, 0x0, ...)
avrdude: jtagmkII_program_enable(): Sending enter progmode command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [0d] . [00] . [01] . [00] . [00] . [00] . [0e] . [14] . [02] j [6a]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 65535 (command_sequence == 13)
avrdude: jtagmkII_recv(): got asynchronous event
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 13 (command_sequence == 13)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: jtagmkII_program_enable(): Sending enter progmode command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [0e] . [00] . [01] . [00] . [00] . [00] . [0e] . [14] . [d2] . [e0]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 14 (command_sequence == 14)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: jtagmkII_read_byte(): Sending read memory command:
avrdude: jtagmkII_send(): sending 10 bytes
avrdude: Sent: . [1b] . [0f] . [00] . [0a] . [00] . [00] . [00] . [0e] . [05] . [b4] . [01] . [00] . [00] . [00] . [90] . [00] . [00] . [01] ) [29] . [b4]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 15 (command_sequence == 15)
avrdude: Recv: . [82] . [1e]

Raw message:
0x820x1e
memory contents:
0x1e

avrdude: jtagmkII_read_byte(.., signature, 0x1, ...)
avrdude: jtagmkII_read_byte(): Sending read memory command:
avrdude: jtagmkII_send(): sending 10 bytes
avrdude: Sent: . [1b] . [10] . [00] . [0a] . [00] . [00] . [00] . [0e] . [05] . [b4] . [01] . [00] . [00] . [00] . [91] . [00] . [00] . [01] & [26] P [50]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 16 (command_sequence == 16)
avrdude: Recv: . [82] . [98]

Raw message:
0x820x98
memory contents:
0x98

Reading | ################# | 33% 0.02savrdude: jtagmkII_read_byte(.., signature, 0x2, ...)
avrdude: jtagmkII_read_byte(): Sending read memory command:
avrdude: jtagmkII_send(): sending 10 bytes
avrdude: Sent: . [1b] . [11] . [00] . [0a] . [00] . [00] . [00] . [0e] . [05] . [b4] . [01] . [00] . [00] . [00] . [92] . [00] . [00] . [01] . [e4] e [65]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 17 (command_sequence == 17)
avrdude: Recv: . [82] B [42]

Raw message:
0x820x42
memory contents:
0x42

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9842
avrdude: jtagmkII_read_byte(.., eeprom, 0xffc, ...)
avrdude: jtagmkII_read_byte(): Sending read memory command:
avrdude: jtagmkII_send(): sending 10 bytes
avrdude: Sent: . [1b] . [12] . [00] . [0a] . [00] . [00] . [00] . [0e] . [05] " [22] . [01] . [00] . [00] . [00] . [fc] . [0f] . [8c] . [00] - [2d] . [83]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 18 (command_sequence == 18)
avrdude: Recv: . [82] . [ff]

Raw message:
0x820xff
memory contents:
0xff

avrdude: jtagmkII_read_byte(.., eeprom, 0xffd, ...)
avrdude: jtagmkII_read_byte(): Sending read memory command:
avrdude: jtagmkII_send(): sending 10 bytes
avrdude: Sent: . [1b] . [13] . [00] . [0a] . [00] . [00] . [00] . [0e] . [05] " [22] . [01] . [00] . [00] . [00] . [fd] . [0f] . [8c] . [00] . [99] . [8f]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 19 (command_sequence == 19)
avrdude: Recv: . [82] . [ff]

Raw message:
0x820xff
memory contents:
0xff

avrdude: jtagmkII_read_byte(.., eeprom, 0xffe, ...)
avrdude: jtagmkII_read_byte(): Sending read memory command:
avrdude: jtagmkII_send(): sending 10 bytes
avrdude: Sent: . [1b] . [14] . [00] . [0a] . [00] . [00] . [00] . [0e] . [05] " [22] . [01] . [00] . [00] . [00] . [fe] . [0f] . [8c] . [00] y [79] . [da]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 20 (command_sequence == 20)
avrdude: Recv: . [82] . [ff]

Raw message:
0x820xff
memory contents:
0xff

avrdude: jtagmkII_read_byte(.., eeprom, 0xfff, ...)
avrdude: jtagmkII_read_byte(): Sending read memory command:
avrdude: jtagmkII_send(): sending 10 bytes
avrdude: Sent: . [1b] . [15] . [00] . [0a] . [00] . [00] . [00] . [0e] . [05] " [22] . [01] . [00] . [00] . [00] . [ff] . [0f] . [8c] . [00] . [cd] . [d6]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 21 (command_sequence == 21)
avrdude: Recv: . [82] . [ff]

Raw message:
0x820xff
memory contents:
0xff

avrdude: jtagmkII_program_disable(): Sending leave progmode command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [16] . [00] . [01] . [00] . [00] . [00] . [0e] . [15] . [9f] . [87]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 22 (command_sequence == 22)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: jtagmkII_reset(): Sending reset command:
avrdude: jtagmkII_send(): sending 2 bytes
avrdude: Sent: . [1b] . [17] . [00] . [02] . [00] . [00] . [00] . [0e] . [0b] . [01] b [62] . [97]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 23 (command_sequence == 23)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: jtagmkII_close()
avrdude: jtagmkII_close(): Sending GO command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [18] . [00] . [01] . [00] . [00] . [00] . [0e] . [08] . [f6] | [7c]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 65535 (command_sequence == 24)
avrdude: jtagmkII_recv(): got asynchronous event
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 24 (command_sequence == 24)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude: jtagmkII_close(): Sending sign-off command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [19] . [00] . [01] . [00] . [00] . [00] . [0e] . [00] . [01] q [71]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 25 (command_sequence == 25)
avrdude: Recv: . [80]

Raw message:
0x80
OK

avrdude done. Thank you.

Surprise!

Again, no idea why this magically works, but it does.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It seems I was a bit too optimistic.

I can read fuse values, but the AVR Dragon is unable to erase the chip:

Quote:

avrdude: erasing chip
avrdude: jtagmkII_chip_erase(): Sending Xmega chip erase command:
avrdude: jtagmkII_send(): sending 6 bytes
avrdude: Sent: . [1b] . [17] . [00] . [06] . [00] . [00] . [00] . [0e] 4 [34] . [00] . [00] . [00] . [00] . [00] . [a6] . [0a]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 23 (command_sequence == 23)
avrdude: Recv: . [a0]

Raw message:
0xa0
FAILED

I've read on some other posts that someone managed to program the board without first erasing, so I may try that. However I may need to spend some time on it.

If anyone has ANY suggestion as of why I am having such a trouble with the AVR Dragon connected via JTAG to my XMEGA board please let me know.

Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello again,

First of all, please give me some comments about your experience with the ATXMEGA256A3U (or similar XMEGA devices) and AVRDragon if anyone has been using this combination. Any feedback would be appreciated.

Secondly, I installed the AVR Studio 5 on windows to see if that makes the AVRDragon able to program my board.

First thing I did was to update the software. That went well so I decided to test the AVRDragon again on my ubuntu box via "avrdude". Again I was not able to erase the xmega. Also I was not able to program the board, even while supplying the "-D" flag to avrdude (which means to skip the erase step).

Back into windows/AVRStudio I played a bit with the programming options and I can report this:
- reading of every memory and fuse bits works fine. I can grab the entire application and eeprom contents.
- erasing the device does NOT work.
- erasing the EEPROM does work.
- erasing the application does NOT work (so I guess this is also why erasing the device does not work).
- programming a hex file into the application memory works! (but only when disabling the "Erase Flash before programming" box). However I am able to see my LED active on my board (so I guess this proves somehow that I have a working board).

So in summary:
- it appears that I can program the device, but cannot erase it (which is still annoying).
- I am not able to program the device in linux via avrdude, even though I am using the same steps as in Windows/AVR Studio

The only thing I have in mind is that in the schematic checklist it says to remove the capacitor in parallel with a reset button if PDI programming is used. Since I am using JTAG I didn't remove this capacitor. I doubt this is the problem but if someone has experienced with this please shout.

Any comments are welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

goodhack, I am just getting started with AVR development and was thinking about getting the AVR Dragon just for cheap JTAG debugging... until I read this.

What is up with AVR Studios problem with the xmega256A3U and Dragon? I can see something going wrong on Linux... but I figured AVR Studio/Dragon on Windows wouldn't have any problems what so ever.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried to reproduce your troubles, but fail.

First, I'd strongly recommend you using firmware version 7.x (as supplied
by Atmel Studio 5.x). In particular, when you consider debugging with
AVaRICE, Xmega debugging is not supported for any older firmware (the
reason is that with firmware 7.x, the Xmega debugging protocol has been
changed quite a bit).

Second, you might give the SVN version of AVRDUDE a try, I fixed a number
of Xmega-related bugs in the past few weeks. However, even with the
released version 5.11.1, I have no troubles erasing the ATxmega128A1 that
is sitting on an Xplain board here, nor an ATxmega256A3 on another
board. (Unlike you, I've got some issues the EEPROM on the latter reads
back as 0xbb on all cells. I have to debug this.)

The only thing which currently doesn't work is to have the application
start again after downloading a new firmware.

Also, AVRDUDE by now only supports a chip erase operation. Adding the
individual segment erase operations (application, apptable, boot,
user signature) is on my wishlist before I'm goin to release version
6.0.

If your connection only works at 1.8 V but not at 3.3 V, I'm pretty sure
you've got some kind of hardware issue. The Dragon doesn't have very
strong line drivers, so keep the JTAG lines short! As a rule of thumb,
the 10-pin ribbon cables that ship with the STK500 and STK600 usually
do work well; they are 14 cm long. Longer cables have been reported to
get flakey. (If you really need a longer cable, the remedy might be to
add a serial termination resistor at each pin's Tx end.)

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

> (Unlike you, I've got some issues the EEPROM on the latter reads
> back as 0xbb on all cells. I have to debug this.)

Whatever might have happened to that device, it turns out AVR Studio
is at the end of its wisdom regarding that device's EEPROM as well.
The EEPROM reads out 0xbb, no matter what. It also happens when I
use a genuine JTAGICE mkII rather than the Dragon, so I figure,
somehow that chip must have been damaged in the past.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jörg,

Welcome back - just in time for me to wish you the annual good wishes ;-)

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

> Welcome back

I've always been around ;), but more in the Wireless forum, and in the AVR-GCC one.
It's just the OP pointed me out to this thread in a mailinglist.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you very much Jörg.

Indeed reducing the length of the 10-pin ribbon cable has solved the issue (almost).

Now I can perform everything, from memory read/write to chip erase. However now the funny thing is that I can only do this for voltage around 3V. Using 1.8 V I cannot read or erase the chip.

Nevertheless powering the board with 3V I can perform all the operations using avrdude.

I've also done a check for the EEPROM. After reading everything is 0xFF as it should be.

Brandito, in conclusion I think you can safely use the AVRDRagon with the XMEGA devices, as long as you use a short cable (14cm) to connect the JTAG pins between the Dragon and your board.