View Single Post
Old 01-16-2017, 12:55 PM   #33 (permalink)
t vago
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 830
Thanked 708 Times in 456 Posts
Quote:
Originally Posted by josemapiro View Post
This new version holds the error.
Your procedure is the same as mine, the only differences are in the LCD selection and buttons your selection is different, one thing that is also different and may justify the problem is that I use the Arduino Mega without anything connected only with the USB cable, it is only speculation but what you have connected do not let the arduino fall asleep and allow to complete the recording.
Because this problem only started after infusing deep sleep into the code I think that's the problem.
I still could not duplicate the issue, even with removing everything off my AtMega2560 and programming it with your LCD and button configuration.

I think I may have inadvertently solved the issue when I re-burned my AtMega2560's bootloader.

I also think this problem is not limited to my version of the MPGuino code.

Google: "mega2560 programming times out site:forum.arduino.cc"

So I was wrong to assume that there wouldn't be anything within a successfully compiled sketch that would cause the programming to fail, simply because there was something within the sketch itself. The AtMega2560 appears to suffer from a bootloader bug that does exactly this.

Trouble is, there's nothing in my code that is obviously the cause of the problem. For instance, many users report that if they include "!!!" within a string in their sketch, it will not load onto their AtMega2560. In my code, there is no "!!!" that gets compiled. There were "!!!"s in the source file, in the #error directives, but they do not get compiled into the code. Besides, those "!!!"s in the #error directives were in the 20170107 version, and you reported that it successfully uploaded.

There is also another sequence of hex numbers that apparently causes programming to fail with this timeout error, but I am not able to find this sequence. Like I said, I re-programmed my AtMega2560's bootloader, and apparently, the new bootloader does not have this bug. I cannot duplicate this problem with my AtMega2560.
  Reply With Quote
The Following 2 Users Say Thank You to t vago For This Useful Post:
josemapiro (01-16-2017), skybolt (05-15-2017)