aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Common/Utilities
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-06-30 10:11:59 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-06-30 10:11:59 +0300
commit31eb2421db55f356d67a75bf8c2c1f74802f5d86 (patch)
tree3138b3ae23836d0b1da9a9f819d39d2040837045 /Software/Embedded_SW/Embedded/Common/Utilities
parent2a72d2b881503a077670b3703a8f360294136ca0 (diff)
downloadTango-31eb2421db55f356d67a75bf8c2c1f74802f5d86.tar.gz
Tango-31eb2421db55f356d67a75bf8c2c1f74802f5d86.zip
Version 1.4.1.1 improve watchdog/DFU handling (works, not great)
Diffstat (limited to 'Software/Embedded_SW/Embedded/Common/Utilities')
-rw-r--r--Software/Embedded_SW/Embedded/Common/Utilities/Update.c8
-rw-r--r--Software/Embedded_SW/Embedded/Common/Utilities/Utils.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/Utilities/Update.c b/Software/Embedded_SW/Embedded/Common/Utilities/Update.c
index c2aad92f1..60fee1164 100644
--- a/Software/Embedded_SW/Embedded/Common/Utilities/Update.c
+++ b/Software/Embedded_SW/Embedded/Common/Utilities/Update.c
@@ -13,6 +13,9 @@
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
+#include "Modules/Control/control.h"
+#include "Modules/Control/MillisecTask.h"
+#include "Modules/Heaters/Heaters_ex.h"
#include "Drivers/USB_Communication/USBCDCD.h"
@@ -32,8 +35,9 @@ void UpdateUsb(void)
//
ROM_IntMasterDisable();
#ifdef WATCHDOG
- //ROM_WatchdogResetDisable(WATCHDOG0_BASE);
- //ROM_WatchdogReloadSet(WATCHDOG0_BASE, 120000000*35);
+ ROM_WatchdogResetDisable(WATCHDOG0_BASE);
+ uint32_t timeout = 120000000*35;
+ ROM_WatchdogReloadSet(WATCHDOG0_BASE, timeout);
#endif
ControlStop();
MillisecStop();
diff --git a/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c b/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c
index 3871acb94..e22291963 100644
--- a/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c
+++ b/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c
@@ -97,6 +97,7 @@ void InitWatchdog(uint32_t clock)
//
// Enable the watchdog interrupt.
//
+#ifdef WATCHDOG
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0);
ROM_WatchdogIntClear(WATCHDOG0_BASE);
ROM_WatchdogIntTypeSet(WATCHDOG0_BASE,0); //interrupt, not NMI
@@ -116,6 +117,7 @@ void InitWatchdog(uint32_t clock)
// Enable the watchdog timer.
//
ROM_WatchdogEnable(WATCHDOG0_BASE);
+#endif
}
void utilsInit(uint32_t ui32SysClock)
{