Go Down

Topic: Update MEGA 2560 bootloader (Read 1 time) previous topic - next topic

Shuttleu

#5
Dec 28, 2012, 10:05 pm Last Edit: Dec 28, 2012, 10:18 pm by Shuttleu Reason: 1


Not so painless for many that try on their first attempt, congratulations.

So did this bootloader indeed fix the !!! problem?
I wonder if it also includes the fix to handle WDT resets correctly also?

Lefty



Thank you!

i can confirm that it has solved my !!! problem, and how do i check the WDT resets?

EDIT: i tried the sketch from this post
http://arduino.cc/forum/index.php/topic,45381.msg329036.html#msg329036
Code: [Select]
#include <avr/wdt.h>

void setup(void)
{
   Serial.begin(57600);    // start serial port
//  wdt_disable();
  wdt_enable(WDTO_8S);   // set the wdt on 8 sec
}

void loop(void)
{
    wdt_reset(); // reset the wdt
Serial.println("delays 5000");
delay(5000);
wdt_reset(); // reset the wdt
Serial.println("delays 7000");
delay(7000);
  wdt_reset(); // reset the wdt
  Serial.println("delays 10000");
delay(10000);
   Serial.println("delays 15000");
delay(15000);
}


and i get...
delays 5000
delays 7000
delays 10000
delays 5000
delays 7000
delays 10000
delays 5000
delays 7000
delays 10000
delays 5000
delays 7000
delays 10000

CrossRoads

Apparently something is resetting after this
Code: [Select]

Serial.println("delays 10000");
delay(10000);


As this is not occurring
Code: [Select]

   Serial.println("delays 15000");
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Shuttleu


Apparently something is resetting after this
Code: [Select]

Serial.println("delays 10000");
delay(10000);


As this is not occurring
Code: [Select]

   Serial.println("delays 15000");



isnt that what the wdt is supposed to do?

also i have been reading about making sure the fuse sets are correct after i have burned the bootloader

what should i be doing/looking at?

CrossRoads

I've not used the WDT, how are you setting the time it needs before it decides a reset is necessary?

If you can download code and it runs as expected, I'd say your fuses were okay.  Nothing more to check.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Shuttleu


I've not used the WDT, how are you setting the time it needs before it decides a reset is necessary?

If you can download code and it runs as expected, I'd say your fuses were okay.  Nothing more to check.


well im guessing at
Code: [Select]
wdt_enable(WDTO_8S);   // set the wdt on 8 sec
it is set to 8 seconds (during the setup)
so when it gets to
Code: [Select]
delay(10000);
it waits over 8 seconds then times out and resets

Go Up