2560 will not load

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

2560 will not load

Postby kbb » Fri May 18, 2012 6:48 am

I successfully loaded the first blink sketch and got LED 13 blinking at a one second rate.

I changed the code to a 4 second blink and now the program will not load.
I verified the board type.
i am using ubuntu 12 and i am using /dev/ttyUSB0



Here is the compile line:
Binary sketch size: 1590 bytes (of a 258048 byte maximum)

I keep getting

Binary sketch size: 1590 bytes (of a 258048 byte maximum)
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout

Here is the program:

int ledPin = 13;
void setup()
{
pinMode(ledPin, OUTPUT);
}

void loop()
{
digitalWrite(ledPin, HIGH);
delay(4000);
digitalWrite(ledPin, LOW);
delay(1000);
}


I have read all over the net to find out that there is problems with the bootloader but I have no "!" marks in the code.
I have held the reset button down and tried it to no avail.

I have verified that the the little reset wire is still there for auto reset for program loading

I have tried every choice of programmer

LED 13 does go off when it starts trying to program and I see the other LEDs blink yellow.

But then I continue to get time outs

Sometimes it will load upto ~1380 bytes but never completes the load.

Any ideas would help,
Thank you
kbb
 
Posts: 17
Joined: Thu May 10, 2012 10:47 am

Re: 2560 will not load

Postby adafruit_support_bill » Fri May 18, 2012 7:25 am

Sometimes it will load up to ~1380 bytes but never completes the load.

Sounds like a cable problem. Make sure the plugs are firmly seated. Try a different cable and/or USB port.
User avatar
adafruit_support_bill
 
Posts: 16072
Joined: Sat Feb 07, 2009 9:11 am

Re: 2560 will not load

Postby kbb » Fri May 18, 2012 8:30 am

Ok: I have tried the cable from my hp printer and I get the same thing.

Exactly which loader do I use?

I notice that the sketch continues to try loading and never times out unless I either try to relad or that I get completely out of sketch and reload.
Is that normal?

THanks
kbb
 
Posts: 17
Joined: Thu May 10, 2012 10:47 am

Re: 2560 will not load

Postby adafruit_support_bill » Fri May 18, 2012 8:51 am

Exactly which loader do I use?

If you select Mega 2650 as your board type, the IDE should use the correct loader. It worked once for you, so that should not be the problem.

Make sure you are plugged directly into a port on the computer. USB hubs sometimes cause problems. Try a different port also. Intermittent cables and/or plug contacts are surprisingly common problems.

If you still have trouble. Select File->Preferences and enable verbose output for upload and post the output.
User avatar
adafruit_support_bill
 
Posts: 16072
Joined: Sat Feb 07, 2009 9:11 am

Re: 2560 will not load

Postby kbb » Fri May 18, 2012 9:14 am

Binary sketch size: 1590 bytes (of a 258048 byte maximum)
/usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -v -v -v -v -patmega2560 -cstk500v2 -P/dev/ttyUSB2 -b115200 -D -Uflash:w:/tmp/build4045323490524631322.tmp/sketch_may17a.cpp.hex:i

avrdude: Version 5.11.1, compiled on Oct 30 2011 at 10:37:28
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "/usr/share/arduino/hardware/tools/avrdude.conf"
User configuration file is "/home/kbb12/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/ttyUSB2
Using Programmer : stk500v2
Overriding Baud Rate : 115200
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
kbb
 
Posts: 17
Joined: Thu May 10, 2012 10:47 am

Re: 2560 will not load

Postby adafruit_support_bill » Fri May 18, 2012 9:42 am

Do you still see activity on the leds when you try to download?
Does it return to the 1s blink after the timout?
User avatar
adafruit_support_bill
 
Posts: 16072
Joined: Sat Feb 07, 2009 9:11 am

Re: 2560 will not load

Postby kbb » Fri May 18, 2012 10:05 am

Yes to both questions.
kbb
 
Posts: 17
Joined: Thu May 10, 2012 10:47 am

Re: 2560 will not load

Postby adafruit_support_bill » Fri May 18, 2012 10:38 am

Interesting.
Do you see a few quick flashes when you press reset on the board?
Do you see the same flash pattern when you first power on the board?
Do you see the same flash pattern before the download starts?
User avatar
adafruit_support_bill
 
Posts: 16072
Joined: Sat Feb 07, 2009 9:11 am

Re: 2560 will not load

Postby kbb » Fri May 18, 2012 12:32 pm

On pushbutton reset LED 13 stops blinking for about 2 seconds the second LED from it blinks once with a short blink.
When uploading the I see the same as when I push the reset button.
After a long second LED goes back to the one second blinking.
kbb
 
Posts: 17
Joined: Thu May 10, 2012 10:47 am

Re: 2560 will not load

Postby adafruit_support_bill » Fri May 18, 2012 1:05 pm

OK. What we know so far:

* The flashes you describe mean that the processor is working and it is correctly running the bootloader on reset (both internal and external)

*Since you see led activity when the (attempted) upload is in process, that means that the 16U2 usb/serial converter on the board is also working properly and the signal is reaching the processor.

*The diagnostic output shows that the IDE is sending the correct sync request for a mega2560.

At this point, the possibilities are:
1) the processor/bootloader is not responding to the download sync request. This is unlikely since it is working properly otherwise. (Unless the Rx/Tx pins on the processor have been damaged somehow.)
2) the computer/IDE is not seeing the response.

There were quite a few reports of communication difficulties between Ubuntu and recent Arduino hardware and IDE. Here is one thread from Arduino.cc: http://arduino.cc/forum/index.php?topic=94187.0 You should make sure you have all the latest drivers.
User avatar
adafruit_support_bill
 
Posts: 16072
Joined: Sat Feb 07, 2009 9:11 am

Re: 2560 will not load

Postby kbb » Sat May 26, 2012 7:14 pm

The problem seems to be that the board does NOT want to run on the Win7-64bit or under Ubuntu 64bit on VMware on the Win 7 machine,

I finally got home and rechecked it on Ubutntu 32 bit and it works fine. with both 0.18 and 1.01 sketch.

I will look into this issue more
kbb
 
Posts: 17
Joined: Thu May 10, 2012 10:47 am


Return to Arduino

Who is online

Users browsing this forum: adafruit_support_mike and 10 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [108]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[31]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[34]
LCDs & Displays[48]
Components & Parts[70]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[111]
 
Wireless[14]
Cables[62]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]