Go Down

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

retrolefty

#5
Dec 09, 2012, 06:34 pm Last Edit: Dec 09, 2012, 06:39 pm by retrolefty Reason: 1

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


The ! ASCII character, as in 0x21. So three 0x21 bytes sent in a row anywhere in the upload data stream locks up the bootloader waiting for user monitor commands from the PC which will never come. As far as more detailed info, there has been a lot posted in the forum over the years sense the original mega1280 board was released, but I'm not aware of any 'official' document posted on the arduino web site. There is mostly likely a old and mouldy bug report in the arduino developers bug reporting archive list wherever one finds that.

The source code for the mega bootloader is included in the IDE software distribution if you want to seek it out and read about this wonderful feature included in the mega bootloader code.

Lefty

pico

#6
Dec 10, 2012, 07:53 am Last Edit: Dec 10, 2012, 07:55 am by pico Reason: 1

The ! ASCII character, as in 0x21. So three 0x21 bytes sent in a row anywhere in the upload data stream locks up the bootloader waiting for user monitor commands from the PC which will never come.


Just as an update, the _latest_ Mega2560 bootloader is supposed to have fixed this particular problem. But that is no use to you if have a Mega with the old bootloader installed (unless you want to reflash the bootloader with the newer one.)

However, the latest version seems to have some new issues of  its own. Refer this thread:

http://arduino.cc/forum/index.php/topic,136233.0.html

WiFi shields/Yun too expensive? Embeddedcoolness.com is now selling the RFXduino nRF24L01+ <-> TCP/IP Linux gateway: Simpler, more affordable, and even more powerful wireless Internet connectivity for *all* your Arduino projects! (nRF24L01+ shield and dev board kits available too.)

Nick Gammon

Quote
if it sees three !!! characters in a row


...

Quote
What exactly 3 characters?


Three !!! characters. Wasn't that part clear?

Nick Gammon

I'm sorry if I seemed a bit short. I meant, the character '!', three times. As in: !!!

Nick Gammon

I have the latest bootloader for the Mega2560, the one that fixes the watchdog problems. It also does not have the problems reported in the above thread. Running the test sketch:

Code: [Select]

void setup(){
  Serial.begin(9600);
}

void loop(){
  Serial.println("Hello world");
  delay(1000);
}


It commences executing immediately.

Go Up