1

I'm trying to fix arduino uno r3 that was burned-out. I changed m16u2 chip on it. and now I need burn in: Arduino-COMBINED-dfu-usbserial-atmega16u2-Uno-Rev3.hex I'm using stk500v2 and connecting it to isp of arduino. Output log file of avrdude:

C:\>avrdude -c stk500v2 -P COM4 -p m16u2 -U flash:w:1.hex -vvvv
avrdude: Version 6.1, compiled on Mar 13 2014 at 00:09:49
 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
 Copyright (c) 2007-2014 Joerg Wunsch
 System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"
 Using Port : COM4
 Using Programmer : stk500v2
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv: . [1b]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [0b]
avrdude: Recv: . [0e]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [08]
avrdude: Recv: A [41]
avrdude: Recv: V [56]
avrdude: Recv: R [52]
avrdude: Recv: I [49]
avrdude: Recv: S [53]
avrdude: Recv: P [50]
avrdude: Recv: _ [5f]
avrdude: Recv: 2 [32]
avrdude: Recv: t [74]
avrdude: stk500v2_getsync(): found AVRISP programmer
 AVR Part : ATmega16U2
 Chip Erase delay : 9000 us
 PAGEL : PD7
 BS2 : PC6
 RESET disposition : possible i/o
 RETRY pulse : SCK
 serial program mode : yes
 parallel program mode : yes
 Timeout : 200
 StabDelay : 100
 CmdexeDelay : 25
 SyncLoops : 32
 ByteDelay : 0
 PollIndex : 3
 PollValue : 0x53
 Memory Detail :
 Block Poll Page
 Polled
 Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max
W ReadBack
 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
 eeprom 65 20 4 0 no 512 4 128 9000 90
00 0x00 0x00
 Block Poll Page
 Polled
 Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max
W ReadBack
 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
 flash 65 6 128 0 yes 16384 128 128 4500 45
00 0x00 0x00
 Block Poll Page
 Polled
 Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max
W ReadBack
 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
 lfuse 0 0 0 0 no 1 0 0 9000 90
00 0x00 0x00
 Block Poll Page
 Polled
 Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max
W ReadBack
 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
 hfuse 0 0 0 0 no 1 0 0 9000 90
00 0x00 0x00
 Block Poll Page
 Polled
 Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max
W ReadBack
 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
 efuse 0 0 0 0 no 1 0 0 9000 90
00 0x00 0x00
 Block Poll Page
 Polled
 Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max
W ReadBack
 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
 lock 0 0 0 0 no 1 0 0 9000 90
00 0x00 0x00
 Block Poll Page
 Polled
 Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max
W ReadBack
 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
 calibration 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 Max
W ReadBack
 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
 signature 0 0 0 0 no 3 0 0 0
 0 0x00 0x00
 Programmer Type : STK500V2
 Description : Atmel STK500 Version 2.x firmware
 Programmer Model: AVRISP
avrdude: Send: . [1b] . [02] . [00] . [02] . [0e] . [03] . [90] . [86]
avrdude: Recv: . [1b]
avrdude: Recv: . [02]
avrdude: Recv: . [00]
avrdude: Recv: . [03]
avrdude: Recv: . [0e]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [02]
avrdude: Recv: . [15]
avrdude: Send: . [1b] . [03] . [00] . [02] . [0e] . [03] . [91] . [86]
avrdude: Recv: . [1b]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [03]
avrdude: Recv: . [0e]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [02]
avrdude: Recv: . [14]
avrdude: Send: . [1b] . [04] . [00] . [02] . [0e] . [03] . [92] . [82]
avrdude: Recv: . [1b]
avrdude: Recv: . [04]
avrdude: Recv: . [00]
avrdude: Recv: . [03]
avrdude: Recv: . [0e]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [0a]
avrdude: Recv: . [1b]
 Hardware Version: 2
 Firmware Version Master : 2.10
avrdude: Send: . [1b] . [05] . [00] . [02] . [0e] . [03] . [94] . [85]
avrdude: Recv: . [1b]
avrdude: Recv: . [05]
avrdude: Recv: . [00]
avrdude: Recv: . [03]
avrdude: Recv: . [0e]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: U [55]
avrdude: Recv: E [45]
 Vtarget : 8.5 V
 SCK period : 0.1 us
avrdude: Send: . [1b] . [06] . [00] . [0c] . [0e] . [10] . [c8] d [64] . [19]
[20] . [00] S [53] . [03] . [ac] S [53] . [00] . [00] 5 [35]
avrdude: Recv: . [1b]
avrdude: Recv: . [06]
avrdude: Recv: . [00]
avrdude: Recv: . [02]
avrdude: Recv: . [0e]
avrdude: Recv: . [10]
avrdude: Recv: . [c0]
avrdude: Recv: . [c1]
avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
 Double check connections and try again, or use -F to override
 this check.
 avrdude: Send: . [1b] . [07] . [00] . [03] . [0e] . [11] . [01] . [01] . [00]
 avrdude: Recv: . [1b]
 avrdude: Recv: . [07]
 avrdude: Recv: . [00]
 avrdude: Recv: . [02]
 avrdude: Recv: . [0e]
 avrdude: Recv: . [11]
 avrdude: Recv: . [00]
 avrdude: Recv: . [01]
 avrdude done. Thank you.

My question is what block with error does? can it be I shorted due soldering? or maybe burned chip? any issues? how I can check?

ps. programmer works perfect. checked!

asked May 5, 2014 at 4:51
4
  • All I can tell from this log is that communication with the MCU does not work at all, i.e. it fails on the very first command sent to it (all the preceding communication is with the controller). There could be numerous causes for this (chip rotated by 90 degrees, etc). I would start by attaching a logic analyzer to the MISO pin and see whether there are any wiggles there at all. Commented May 5, 2014 at 17:18
  • 1
    One important question to be sure: Arduino UNO has 2 ISP connectors, one for the ATmega328, and one for ATmega16u2 (used for USB connection); are you sure you are connecting to the 2nd one? Commented May 5, 2014 at 19:29
  • yes i'm sure. its connected to ATmega16u2. @microtherion does the sended bits and received bits must be same? Commented May 5, 2014 at 22:25
  • @Klasik it’s a bit beyond the scope of a comment to explain, so I’ve made it an answer. Commented May 6, 2014 at 20:58

1 Answer 1

1

Here’s a decoding of the crucial pair of messages exchanged here. Protocol is documented on Atmel’s site.

Your machine sends:

[1b] Beginning of message
[06] Message sequence number
[00] [0c] Message body length (big endian)
[0e] Beginning of message body
[10] Command: CMD_ENTER_PROGMODE_ISP 
[c8] [64] [19] [20] [00] Various programming parameters
[53] Response value to look for
[03] Response index 
[ac] [53] [00] [00] Enter programming mode command
[35] Checksum

This causes the programmer to send the 4 bytes 0xAC 0x53 0x00 0x00 to the MCU, and look for the value 0x53 in the third of the 4 response bytes, as specified on page 260 of the data sheet. However, the programmer answers:

[1b] Beginning of message
[06] Sequence number (matches message previously sent)
[00] [02] Response body length
[0e] Beginning of response body
[10] Command: CMD_ENTER_PROGMODE_ISP (Matches message)
[c0] STATUS_CMD_FAILED (This is the error message)
[c1] Checksum

That means that tyne very first command sent to the microcontroller "failed" (most likely by not returning the expected answer byte).

answered May 6, 2014 at 20:58
4
  • is it called post code or something? Commented Jun 12, 2014 at 20:20
  • I'm afraid I don't understand your question, @Klasik. Commented Jun 12, 2014 at 21:44
  • how thous codes called? ) Commented Jun 13, 2014 at 21:25
  • Btw. the solution was resoldering SMD. Commented Jun 13, 2014 at 21:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.