rbhollabaugh
Member
So I just tried using watchdog code I've used on 328s w/o bootloader and it works fine. So I tried similar code on the teensy++2.0. And now it seems the bootloader is out to lunch. Can not upload a new program.
The code I used:
#include <avr/wdt.h>
int ledPin = 6;
void setup() {
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, HIGH);
delay(200);
wdt_enable(WDTO_2S);
}
void loop() {
wdt_reset();
}
When I commented out the reset is when it hosed the bootloader. So the chip tried to reset from the WDT and the bootloader seems to be fried. What to do? Can I reload the bootloader? I have not seen it on the website anywhere?
The code I used:
#include <avr/wdt.h>
int ledPin = 6;
void setup() {
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, HIGH);
delay(200);
wdt_enable(WDTO_2S);
}
void loop() {
wdt_reset();
}
When I commented out the reset is when it hosed the bootloader. So the chip tried to reset from the WDT and the bootloader seems to be fried. What to do? Can I reload the bootloader? I have not seen it on the website anywhere?