summaryrefslogtreecommitdiff
path: root/firmware/src/os/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/src/os/main.c')
-rw-r--r--firmware/src/os/main.c7
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
personal git repositories of Harald Welte. Your mileage may vary