body, html {font-family: 'Open Sans', sans-serif;} #nav a, #nav span.in{font-family: 'Open Sans', sans-serif;} #title #tagline {font-family: 'Open Sans', sans-serif;} #main .gridItem h3 {font-family: 'Open Sans', sans-serif;}

Reflashing boot loader

Sunday, 25.10.2015

During the last days I worked on my GSM answering device. The next version should include a real time clock (RTC) module. Not really needed, but I want to fetch date and time, when a SMS was received. I’ve found a pretty nice sketch, which gave the opportunity to set the time of the RTC and to read it. I tried to modify it to „subroutines“ and to include it into my sketch. Unfortunately with the followiung results:

  1. The sketch didn’t worked. It showed a very strange behavior: E.g. while already in the void loop it jumped back into the void setup. So I included a lot of Serial.prints into my sketch to determine what was happening where. I didn’t really found the bug (at least up to now). But than the most worse thing happened:
  2. When uploding a new version of the sketch, I received some few % prior it would have been done, an error message stating an "avrdude verification error":



I googled a lot and the answer was something between board defect (I was able to demage hardware by software???) and boot loader corrupt.

I tried the same sketch with another Mega. At the beginning the sketch was running well, but still with errors and at the end, I wasn’t able to upload any sketch to the second Mega also. So 2 Megas „destroyed“ during one afternoon… Great success!

I found the following webpage, which seemed to offer help: Gammon forum. Being back from a trip to the sons and their families of my wife in the south of Germany (near Stuttgart) during this weekend, I started to „repair“ my Megas:

First I downloaded the sketch from GitHub

Than I wired a brand new Uno (a China clone from SunFounder) with the damaged Mega...

… like this ...

Uno              Mega
————————— 
5V                Vin
GND             GND
10                RESET 
11                51 
12                50 
13                52   

and connected the USB cabe to the Uno. After that I started the sketch...


… and I got the following messages on the serial monitor:


After a few seconds of thinking, I decided to hit the „G“ - because the Mega was „dead“ already - and received:


I reconnected all the pins as used for my GSM answering device, loaded the GSM sketch (without the RTC part) and everything was running fine.

I did it again with the second dead Mega and now both a back to life! Great!!! But with the second Mega I needed to do that reflashing 3 or 4 times up the board was ok. 


There’re a lot of boards now with me, waiting to built something:

  • 1 Uno (orginial Arduino) used for the Altitude joint cache
  • 2 Uno (clones from SunFounder) - unused
  • 1 Uno (original Arduino) - unused
  • 1 Due (clone from Sunfounder). - unused - Don’t like it, because all pins are working with 3,3V
  • 1 Mega (clone from Sunfounder) working with the SMS answering device
  • 1 Mega (clone from Sunfounder) with reflashed boot loader - unused
  • 2 Mega (dto) - unused
  • 1 Mega (clone from SaintSmart) bundleted with a RTC - unused
  • 1 Mega (original from Arduino) - unused


I think, I won’t buy any boards in the near future...


Waiting for the 100 (27.10.2015):

Some of my caches are near to reach 100 favourite points… See here.


Reached (27.11.2015):

… but a lot of maintenance to perform...

screen-capture-5



©  Olaf Goette 2008 - 2022