Go Down

Topic: Mega 2560 randomly hanging (Read 2 times) previous topic - next topic

cyberhawk9

My Arduino Mega 2560 is randomly hanging while I try to upload. One the same program is uploaded without any glitches. Other times it just hangs. If I press the upload button again I am getting the error saying the the COM5 port is already in use. I either have to remove the USB and plug it in again(sometimes even this doesn't work I have to restart the PC). Then again it works fine .

Coding Badly


Stan09

Obviously, uploading a sketch.
I also have multiple issues like that.
I have a feeling there is some 'gray area' somehow related to MEGA bootloader.
Sketch is complicated enough, with Adafruit datalogger shioeld, LCD shield and QuadRAM shield.
It might be working perfectly well for days, than something happens and you cannot upload anymore.
Sometimes uploading another  simple sketch helps, sometimes it does not.
My common impression is that Arduino MEGA 2560 is very unstable board, hardly useful for anything more complicated than blinking LEDs :(
BTW, Ard DUE is even  worse.



retrolefty

#3
Dec 09, 2012, 05:01 pm Last Edit: Dec 09, 2012, 05:02 pm by retrolefty Reason: 1
The arduino mega boards use a bootloader that has a 'special but never used' feature that if it sees three !!! characters in a row in the data being sent to the board during a upload operation, the bootloader enters a 'monitor' mode waiting for user commands from the PC that will never come. So while it may not be your problem specifically, but it has trapped a lot of other people, so check to see if you have any !!! strings in the sketch code and change them.

Lefty

Stan09

Interesting. What exactly 3 characters? Any link to more detailed info on this?

Go Up