diff options
author | laforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-09-30 22:37:48 +0000 |
---|---|---|
committer | laforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-09-30 22:37:48 +0000 |
commit | 48afc6a1d1a9166508304cc01b2cfc1899d2b163 (patch) | |
tree | f6bda86d05d99ead8625c2dbf7d03e43b1991b48 /firmware/src/os/main.c | |
parent | 0a3534e799f84dee188cec2085553d6203aa7689 (diff) |
- add (currently inactive) code for the watch dog timer
git-svn-id: https://svn.openpcd.org:2342/trunk@240 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/src/os/main.c')
-rw-r--r-- | firmware/src/os/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/src/os/main.c b/firmware/src/os/main.c index 973488b..b9ed4dc 100644 --- a/firmware/src/os/main.c +++ b/firmware/src/os/main.c @@ -45,14 +45,16 @@ int main(void) AT91F_PIOA_CfgPMC(); - /* call application specific init function */ - _init_func(); + wdt_init(); /* initialize USB */ req_ctx_init(); usbcmd_gen_init(); udp_open(); + /* call application specific init function */ + _init_func(); + // Enable User Reset and set its minimal assertion to 960 us AT91C_BASE_RSTC->RSTC_RMR = AT91C_RSTC_URSTEN | (0x4 << 8) | (unsigned int)(0xA5 << 24); @@ -70,6 +72,7 @@ int main(void) /* Call application specific main idle function */ _main_func(); dbgu_rb_flush(); + wdt_restart(); #ifdef CONFIG_IDLE //cpu_idle(); #endif |