Pages: [1]   Go Down
Author Topic: AVRDude  (Read 1102 times)
0 Members and 1 Guest are viewing this topic.
Northern California
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey folks,
I've been arduinoing for a little while, but def new to the forum, and generally inexperienced.  I successfully uploaded for years until tonight....  when I was seriously thwarted by:

"avrdude: stk500_getsync(): not in sync: resp=0x00"

I know people have been over this a lot, I read through most of those threads with no joy.  Maybe someone can help.

System: Windows 7 SP1, fully up to date as of posting
Software: Brand new install of Arduino 1.0
Board: Clean Diecimila with Atmega 168 (with USB power selected)

For simplification, I'm attempting to upload "AnalogReadSerial" out of the tutorials section.

Everytime I upload it, I get the avrdude error right under "Binary Sketch Size".  I've tried on 3 boards and I don't get a TX or RX led, but I get constant flashing L, anytime the boards plugged in.  After it fails to upload, flashing L stops and all I get is the green PWR.  Here's what I've done:

1. I started the night with arduino 0017, I upgraded to arduino 1.0
2. I tried two other arduino's: a Duemilinove with Atmega 328 and a Mega with Atmega 2560.  Same results.
3. I tried 5 differant USB cords
4. I tried pushing reset right before (and right after) I hit 'upload' on all the boards (except the Mega)
5. I updated my Windows
6. I restarted 45 times
7. I reassigned the usb drivers to those in the arduino 1.0 folder

What am I missing?  Nothing brought this on, no system changes or upgrades. 

Notes: When I try with the Mega, it is "uploading..." forever till I close out of Arduino and restart.  Occasionally when I start my Arduino 1.0, I get an error that the software cannot be loaded...

If I continue to have no joy, I guess I'll replace the only component I haven't replaced yet... the computer itself.  Guess I could reimage it.

Any thoughts????

Thanks!
- Hunter
Logged

Vancouver BC, Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It could be the USB port. Does it show up in your device manager as a com device? try it in a different computer if you can. Maybe before you re-image, I have never done this, but you could it try a Linux Live DVD like Mint or Ubuntu and see if you can upload with those OSs.

Chris
Logged

Northern California
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In device manager it shows up as FT232R USB UART under Unspecified.  Under device functions: USB Serial Converter and USB Serial Port (COM5) (Ports (COM & LPT)
Logged

Northern California
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just tried on my roomates old frustrating HP running windows XP.

Same result on both the 168 and 328.

I installed the drivers out of the arduino 1.0 folder.

Please help.....  I need to have some stuff out the door tomorrow.

Reimaging now.

- Hunter
Logged

Northern California
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Reimaged the windows 7 with no joy.  I think it's in the drivers...  but I don't really know.

I followed everything exactly as it said the 'getting started' section.

I guess I could try loading linux.  All I need is a a couple lines of code changed... 16 hours later still struggling.
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any friends who use arduino? Have someone else try, sometimes the answer is so stupid and just sometying you looked over a hundred times, if someone else tries they have a new perspective and may find your mistake
Logged

Vancouver BC, Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well if you tried both boards on different computers with different USB cables and you are SURE you did the driver right maybe you fried both of them. Try reinstalling or updating the drivers? One other thing, these boards are empty(ie nothing hooked up) when you are trying to upload the sketch right? I think it uses pins 0 and 1 for uploading. Also have you tried the trouble shooting guide here http://arduino.cc/en/Guide/troubleshooting

Chris
Logged

Northern California
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Update.

I tried on a third computer, and I was at long last able to get my mega to work.

I don't think it has anything to do with the computer, nor the cord.  I forced windows to assign the Mega Rev3.inf driver, which it did.  After 2 restarts, COM 6 was available in arduino. 

Now I can upload to my mega.  I still have no idea why my 168 and my 328 won't recieve.  They look healthy, so I think it's a continuing driver problem.

Anyone want to find out?  Give me your address and I'll send you my 168.  We can see if it's me or the board.

- Hunter
Logged

Northern California
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Solved.

It was due to my terrible code.   I was systematically bricking each of my arduinos with:

#include <avr/io.h>
#include <avr/wdt.h>

int main(void)
{
wdt_enable(WDTO_30MS);
while(1) {};
}

Can someone point me to something that will teach me how to completely erase and reload my arduinos? 

They (obviously) won't receive new code right now.

Thanks for the input on my issue.

- Hunter
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You will probably have to reprogram through isp, or worse case scenario high voltage programmer
Logged

Washington
Offline Offline
God Member
*****
Karma: 38
Posts: 790
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You will probably need to reprogram it with ISP method.
If you have any working Arduinos, you can use that to reprogram the bricked ones.
And do not mess with the watchdog timer anymore smiley-wink
Logged

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Northern California
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I trashed all of mine.  So I ordered a new one!  It'll be here shortly.

So all I have to do is reload the bootloader using http://arduino.cc/en/Tutorial/ArduinoISP and they won't be bricked anymore?

That'd be pretty cool.

And ya, I'll stay clear of WDT... 

- Hunter
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 484
Posts: 18767
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Solved.

It was due to my terrible code.   I was systematically bricking each of my arduinos with:

Code:
#include <avr/io.h>
#include <avr/wdt.h>

int main(void)
{
wdt_enable(WDTO_30MS);
while(1) {};
}


To be honest, it's hard to imagine what useful purpose that code had. Mind you, the bootloader should cope with that. How old are the Arduinos?
Logged


Northern California
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I sent my arduino out into the field to capture some data.  It was very simple code, all it did was read from an analog source and serial print it to http://www.sparkfun.com/products/9530, with a time date stamp from: http://www.sparkfun.com/products/99.

It crashed after about 3 weeks and I only got about 30% of the data I was hoping for.  So I tried experimenting with WDT.   Which lead to the above trainwreck.

The arduino with the 168 is about 3 years old, the 328 is about 2 years old, and the mega is about 1 year old.

Trying reloading the bootloader right now.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 484
Posts: 18767
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Considering it potentially takes the processor 65 mS to start up, setting a watchdog of 30 mS is asking for it. I would have tried 8 seconds. And also add code to "pat the dog" in your main loop, so the timer doesn't fire if things are going well.
Logged


Pages: [1]   Go Up
Jump to: