Project

General

Profile

Revision 176

Added by Kevin Woo about 14 years ago

Fixes #1119. Watchdog timer based reset implemented and added to the common library

View differences:

bootloader.c
1 1
#include <avr/io.h>
2 2
#include <avr/boot.h>
3 3
#include <avr/pgmspace.h>
4
#include <avr/wdt.h>
4 5

  
5 6
#include "tooltron.h"
6 7
#include "uart.h"
......
219 220
  uint16_t prog_len;
220 221
  uint8_t i;
221 222
  uint8_t retries;
222
  
223

  
223 224
retry_jpnt:
224 225
  iteration = 0;
225 226
  retries = 0;
227
  
228
  // Clear the watchdog timer
229
  MCUSR &= ~_BV(WDRF);
230
  wdt_disable();
231
  WDTCSR = 0;
226 232

  
233

  
227 234
  init_uart(51); //MAGIC NUMBER??
228 235

  
229 236
  //set LED pin as output

Also available in: Unified diff