Go Down

Topic: Mega 2560 R3 + Shield Ethernet R3 = problem upload sketchs (SOLVED) (Read 11660 times) previous topic - next topic

MortensenC

Jun 26, 2012, 07:58 pm Last Edit: Jul 10, 2012, 08:28 pm by MortensenC Reason: 1
Step by step

Arduino IDE 1.0.1
Get the last avrdude version 5.11.

Drivers Arduino Installed Ok.
Connect Mega 2560 R3 to Windows Xp with USB.
Serial Port COM3 Detected.
Open Arduino IDE.
Select in Tools Arduino Mega 2560.
Select Serial Port COM3.
Copy Telnet Client Sketch to Arduino IDE (http://arduino.cc/en/Tutorial/TelnetClient?action=sourceblock&num=1).
Test upload sketch and upload OK.

Close Arduino IDE.
Disconnect Arduino Mega 2560 USB.
plug in Ethernet Shield to Arduino Mega 2560.
Connect Mega 2560 R3 to Windows Xp with USB.
Open Arduino IDE.
Select in Tools Arduino Mega 2560.
and when go to Serial Port menu only COM1 is available.

If i try to disconnect and connet USB cable then windows tell me that "One of the USB devices attached to this computer has malfunctioned, and Windows does not reconnize it."

then unplugged the ethernet shield and connect de Mega 2560 USB again.

When I try to upload any sketch, I get the following error messages:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout

like this post(http://arduino.cc/forum/index.php?topic=83079.0)

1) The Green "on" light is on when the board is powered up.
2) The "L" light flashes when I power up the board (indicating that the bootloader is present).
3) I have the arduino IDE pointing to the correct COM port and setup for the Mega board
4) I have tried two different PCs, and 3 versions of Arduino IDE 1.0.0 1.0.1 and 0019
5) Nothing is attached to the Mega
6) When I send to upload a sketch RX LED tilt 1 per 15 seconds and TX not tilt.

paravion

I've got pretty much exactly the same issue as you... Keen to hear any possible resolution, or more about how you go in diagnosing the problem. Oddly I only get these avrdude errors when the ethernet shield is connected...

paravion

UPDATE: I'm a newbie, however, it would appear these avrdude errors appear if the 2560 has the Ethernet shield mounted while attempting to upload the sketch to the unit.

If the 2560 has no shields attached, I can upload the test code successfully, after which I unplug, attach the Ethernet shield, plug in again, add Ethernet and voila. Pretty awesome being able to ping an Arduino board...

Is this behaviour normal? Do all Arduino's need to be bare of shields, in order for the sketch to upload?

MortensenC

Hi Paravion,

first of all, take care with your arduino mega.

a post i found, says that it possible be a current problem.

look at this image:


it seems to be that the mega is restarted at uploading a sketch. if you look the schematic of shield R3, can see that exist an integrated (CAT811 - http://www.alldatasheet.com/datasheet-pdf/pdf/82765/CATALYST/CAT811TTBI-T10.html) which is able to reset the system in two conditions:
- a reset signal from the chip W5100 (line RESET_W in schematic shield)
- a low voltage condition (below a 3V system power)

In my opinion, it could be that in some moment the current supplied for the USB is not enough for the system and finally the voltages down and origin de reset signal for a low voltage condition.

Now i have some new problems... it seems like mega is died, i can't upload anything!! the leds turn on and off like i say in my first post... tomorrow i'll upload the bootloader again to mega.

So take care when you connect and disconnect the Ethernet shield when the system is trying to upload a sketch, and seems to be not responding. =(

zeilsteen

Okay I'm joining the club of unresponsive Mega 2560 R3 and the Ethernetshield R3

But I now have 2 sets that both won't respond after I uploaded a new sketch threw USB.

Now I can only monitor the serial info on the boards tx rx pins ( 1 and 0)

How on earth is this possible?

Are you having any luck with the new bootloader?

Thx

Herman

MortensenC

Hi zeilsteen,

Today I am going to load the boot loader again with an Arduino UNO.
If this resolves the problem. Come back in a couple of hours and I'll tell you what I did.


zeilsteen

Hello MortensenC,

Did it workout with the bootloader?
thx

Herman

MortensenC

Hi zeilsteen,

First of all, the arduino mega 2560 is working again.
To do that follow this steps: http://arduino.cc/forum/index.php/topic,113680.msg855086.html#msg855086

With the Shield problem that not upload de sketch i realized that the problem is my USB cable. it does not delivered 5 volts.
I changed de cable to a USB 2.0 MANHATTAN cable and now works perfect, i can upload a sketch with the shield ethernet connected to the arduino.


zeilsteen

Thanks mate,

I fixed it with a different solution

Bought this one
http://www.atmel.com/tools/AVRISPMKII.aspx

Installed: avr studio 5.1 (all other versions don't work with windows 7 prof 64bit)

Flashed the USB chip and after the USB chip flash it uploaded again.

Hope it stays alive with the ethernetshield on it.

Thanks for the post!


cheers
Herman


www.zeilsteen.com


zeilsteen

To be more complete:

Google :
Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3

http://roboticsclub.org/redmine/projects/quadrotor/repository/revisions/58d82c77908eee0e1c222f7b38691e6532deb77b/entry/arduino-1.0/hardware/arduino/firmwares/Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex

Save as a HEX file and flash the 16u2 chip

Greatingsss 8)


zeilsteen

Small Update, I also had troubles with the bootloader of the standard Mega R3.
It crashed because of watchdog not working correct with the default bootloader.
Flash you mega with this link, download the HEX and your code with watchdog will work without buggy hangs that only will continue after power unplugging.

http://code.google.com/p/arduino/issues/detail?id=181&can=1&q=watch

charlythedragon

Hello,

for one version of the ethernet shield there is a very easy way to solve the problem:

Hit the reset button on the mega board directly after starting the upload.

This board has no manufacturer name printed on it,  and a long row of resistors and caps (12pcs) beside
the 3 leds (Rx,Tx,On), behind the ethernet plug.

rgds
charlythedraon

botanikboy

charlythedragon , thanks a lot!
works with my combination, first revision of mega2560 + ethernet shield v3,
is there any way to fix this and load sketches without pushing reset every time?

ghostx

UPDATE: I'm a newbie, however, it would appear these avrdude errors appear if the 2560 has the Ethernet shield mounted while attempting to upload the sketch to the unit.

If the 2560 has no shields attached, I can upload the test code successfully, after which I unplug, attach the Ethernet shield, plug in again, add Ethernet and voila. Pretty awesome being able to ping an Arduino board...

Is this behaviour normal? Do all Arduino's need to be bare of shields, in order for the sketch to upload?
Excellent ! is the answer to the problem, my mega worked perfectly but the ethernet shield connect , had the same error. Change the usb to one of higher quality cable and it worked ! Thank you !

acerbus


Hi everybody.

Quick solution that worked for me: cut (or bend out) the reset pin from the ethernet shield. No solder, no capacitor, nothing

Now the long story:
I had the ethernet shield working fine on an Arduino nano, with only the minimum connections made with jump wires. When I migrated to a Arduino Mega 2560 (I needed more RAM), and mounted the shield over, I couldn't flash it anymore. I did read the forums and the like, but I wasn't sure which capacitor to remove, nor the manual reset trick worked for me.
So, in a short motorcycle ride, I realized that the shield worked on the nano without the reset connected. Thus I removed that pin and start uploading sketches happily.

Good luck!

Go Up