summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-07 15:00:46 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-07 15:00:46 +0000
commit2306bcac783751b073babef1bf60dd196cfef73d (patch)
tree79f9ef895b9a63be28a702cb55fc28d08988ae1e /firmware
parent76fb5c0409d42adb21c86e171231561c0a718054 (diff)
Add watchdog reset to dfu
git-svn-id: https://svn.openpcd.org:2342/trunk@314 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware')
-rw-r--r--firmware/src/dfu/dfu.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/firmware/src/dfu/dfu.c b/firmware/src/dfu/dfu.c
index 58062a0..07b7401 100644
--- a/firmware/src/dfu/dfu.c
+++ b/firmware/src/dfu/dfu.c
@@ -912,7 +912,14 @@ void __dfufunc dfu_main(void)
AT91F_DBGU_Printk("You may now start the DFU up/download process\r\n");
/* do nothing, since all of DFU is interrupt driven */
- while (1) ;
+ int i = 0;
+ while (1) {
+ /* Occasionally reset watchdog */
+ i = (i+1) % 10000;
+ if( i== 0) {
+ AT91F_WDTRestart(AT91C_BASE_WDTC);
+ }
+ }
}
const struct dfuapi __dfufunctab dfu_api = {
personal git repositories of Harald Welte. Your mileage may vary