[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avrdude-dev] Issues with ATXMEGA256A3U and AVR Dragon
From: |
Omar Choudary |
Subject: |
[avrdude-dev] Issues with ATXMEGA256A3U and AVR Dragon |
Date: |
Fri, 6 Apr 2012 17:28:49 +0100 |
Hello,
I'm having some issues with avrdude and AVR Dragon to program an
ATXMEGA256A3U via JTAG/USB.
The version of avrdude I'm using is 5.11.1 (Sep. 2011 apparently).
In short, I can connect to the board, read fuses and even read bytes
from the flash/eeprom (apparently). However I can't manage to get the
programming to work (neither with or without prior erase). In fact,
the erase itself doesn't work. The programming fails at verification.
Also I've seen that I cannot even switch to JTAG_XMEGA emulator if the
board is powered by more than 2V. It only works when the voltage is
between 1.5 and 2 V (I am using the default internal clock, which
should be 2MHz after reset).
If you have any suggestions or there are any known problems I would be
extremely happy to know.
Thanks (more details below).
In detail:
-- reading fuses works --
avrdude -p x256a3 -c dragon_jtag -P usb -U fuse7:r:file.txt:h
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9842
"fuse7" memory type not defined for part "ATXMEGA256A3"
avrdude done. Thank you.
-- erasing doesn't work --
avrdude -p x256a3 -c dragon_jtag -P usb -e
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9842
avrdude: erasing chip
avrdude: jtagmkII_chip_erase(): bad response to chip erase command: RSP_FAILED
avrdude: jtagmkII_program_disable(): bad response to leave progmode
command: RSP_FAILED
avrdude done. Thank you.
-- programming doesn't work (verification failure - and yes, the board
doesn't do anything, e.g. lighting a LED) --
If I supply the "-D" flag then programming seems to be doing
something, but verification fails. See below:
avrdude -p x256a3 -c dragon_jtag -P usb -U flash:w:xmega_pa.hex -D
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9842
avrdude: reading input file "xmega_pa.hex"
avrdude: input file xmega_pa.hex auto detected as Intel Hex
avrdude: writing flash (1728 bytes):
Writing | ################################################## | 100% 0.47s
avrdude: 1728 bytes of flash written
avrdude: verifying flash memory against xmega_pa.hex:
avrdude: load data flash data from input file xmega_pa.hex:
avrdude: input file xmega_pa.hex auto detected as Intel Hex
avrdude: input file xmega_pa.hex contains 1728 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.37s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0100
0x0c != 0xff
avrdude: verification error; content mismatch
avrdude done. Thank you.
-- Full details (-vvvv) of erase failure --
avrdude -p x256a3 -c dragon_jtag -P usb -e -vvvv
avrdude: Version 5.11.1, compiled on Jan 5 2012 at 17:50:18
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/usr/local/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] . [88] . [02]
Raw message:
0x810x880x02
parameter values:
0x88 0x02
Vtarget : 0.6 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: . [ab]
Raw message:
0xab
No target power
avrdude: jtagmkII_close(): bad response to GO command: RSP_NO_TARGET_POWER
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [avrdude-dev] Issues with ATXMEGA256A3U and AVR Dragon,
Omar Choudary <=