Pages: 1 2 3 [4]   Go Down
Author Topic: avrdude: not in sync again  (Read 14938 times)
0 Members and 2 Guests are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
http://twitter.com/azrobbo
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just got this error today for the first time ever, and I think I found the fix for people who are having this problem with 328s.

Most 328's that came out before official support used an upload speed of 19200.  When version 13 of the IDE came out, the upload speed for 328s was officially switched to 57600, and all new 328's came with a bootloader that supported this speed.

However, anyone with old 328 chips that still have the preliminary bootloader, will need to reburn the "released" bootloader or edit the boards.txt file's upload speed line to:  "atmega328.upload.speed=19200"

This is stated in the release notes for IDE v13, but since it's been a long time since the release its easy to forget about this.  Particularly if you had edited the boards.txt file and it was working then later installed a new version of the IDE (which creates a new boards.txt without this change).  Here's the relevant info from the release notes:

"Adding support for the ATmega328.  The upload speed is 57600 baud, so you may need to edit boards.txt or reburn your bootloader if you bought an ATmega328 w/ bootloader from adafruit or other supplier."
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It turns out that the problem with the '328 was the bootloader speed.  I fixed that and now it works pretty much every time.
Never did figure out the 50% success rate for the '168 though. It may remain a mystery until the end of time (or beyond). smiley
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've got the same error with my brand new Mega board.  The only way to get a download is to perform the reset button on Rx dance.  I loaded the latest FTDI driver and tried changing the boards.txt mega.upload.speed=19200 to no avail.  The download rate is always 57.6k regardless.  I'm disappointed in this fundamental product flaw.

HP n7470m Win XP PC no bluetooth or firewall
FTDI Driver Version 2.4.16.0
Arduino Mega 16 MHz
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
http://twitter.com/azrobbo
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm sorry if this is creating some confusion... this fix is only for people who have pre-official release 328 chips.  The Mega problem is definitely something different, as all Mega's have had the same bootloader which uses the 57600 baud specified in the boards.txt file.

You definitely want to keep it set to 57600 for the Mega.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16518
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I've got the same error with my brand new Mega board.  The only way to get a download is to perform the reset button on Rx dance.  I loaded the latest FTDI driver and tried changing the boards.txt mega.upload.speed=19200 to no avail.  The download rate is always 57.6k regardless.  I'm disappointed in this fundamental product flaw.

If you search around here there was recent posting on mega boards that shipped recently with a batch of bad auto-reset caps and it sounds like you have that problem.

Lefty
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you Lefty.  I scoped the lines around C12 which couples the FTDI DTR to the uP *RESET line and yes indeed, there is no signal coupled via C12.  It is either the wrong value, or completely open since there is absolutely no propagation from DTR to *RESET.  I suspect those that get the upload to work by manually pressing the reaet button all have a similar capacitor issue.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

SOLUTION!!

If you see this error:

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

Give Da_Hero's solution a try.  After several days of hair pulling frustration I saw his post and gave it a try it worked like a charm!!

His solution is in this thread:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1187909552;start=all

If it works for you please spread the word so others don't have to suffer through this for as long as we all have.  Post something in this and other forums so others don't miss the solution.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried with other USB ports and it worked!!!!

On Windows 7 x64 OS.
Logged

Get happiness out of your work or you may never know what happiness is.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just to let everyone know.. I get the same message when I tried to upload to a Diecimalia even though the board was selected as Uno in the Arduino software. So make sure you have the right board selected.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i apologise if someone has said this already.

i had this problem with my mega, and pressing the reset button when i saw the Rx light worked.

however i had my reset pin wired to the reset pin of my LCD (as per the tutorial). but i found when i disconnected the reset pin on my arduino from anything it all worked perfectly. so if you have the reset pin connected, try disconnecting it and see what happens
Logged

Pages: 1 2 3 [4]   Go Up
Jump to: