Initialize watchdog instead of stopping and starting it

This commit is contained in:
adamdunkels 2008-02-11 10:44:49 +00:00
parent 6740d95bfa
commit 660b7f9a78

View file

@ -28,7 +28,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* @(#)$Id: msp430.c,v 1.8 2008/02/03 20:58:11 adamdunkels Exp $ * @(#)$Id: msp430.c,v 1.9 2008/02/11 10:44:49 adamdunkels Exp $
*/ */
#include <io.h> #include <io.h>
#include <signal.h> #include <signal.h>
@ -159,14 +159,13 @@ void
msp430_cpu_init(void) msp430_cpu_init(void)
{ {
dint(); dint();
watchdog_stop(); watchdog_init();
init_ports(); init_ports();
msp430_init_dco(); msp430_init_dco();
eint(); eint();
if((uintptr_t)cur_break & 1) { /* Workaround for msp430-ld bug! */ if((uintptr_t)cur_break & 1) { /* Workaround for msp430-ld bug! */
cur_break++; cur_break++;
} }
watchdog_start();
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#define asmv(arg) __asm__ __volatile__(arg) #define asmv(arg) __asm__ __volatile__(arg)