aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-12-23 12:07:58 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-12-23 12:07:58 +0200
commit71ea5fcc1e5bb9f671b6cd5d7507e6689cdd535c (patch)
tree0326a5701a49877db5c831fe371c03766c4fde72 /Software/Embedded_SW/Embedded/Common/Utilities/Utils.c
parent071a25b7bb2c03a6ae29fec70bd415ea89092dc4 (diff)
downloadTango-71ea5fcc1e5bb9f671b6cd5d7507e6689cdd535c.tar.gz
Tango-71ea5fcc1e5bb9f671b6cd5d7507e6689cdd535c.zip
fix FF reports, add time support for error log (and world time in the system), report regarding dispensers 50% and 25% LS
Diffstat (limited to 'Software/Embedded_SW/Embedded/Common/Utilities/Utils.c')
-rw-r--r--Software/Embedded_SW/Embedded/Common/Utilities/Utils.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c b/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c
index d1143ada2..822294092 100644
--- a/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c
+++ b/Software/Embedded_SW/Embedded/Common/Utilities/Utils.c
@@ -13,6 +13,7 @@
#include "driverlib/hibernate.h"
#include <driverlib/Watchdog.h>
#include <ti/sysbios/hal/Seconds.h>
+#include "drivers/Flash_ram/MCU_E2Prom.h"
//*****************************************************************************
@@ -137,16 +138,21 @@ void utilsInit(uint32_t ui32SysClock)
//
// HibernateCounterMode(HIBERNATE_COUNTER_24HR);
// Configure the hibernate module counter to RTC counter mode.
- HibernateCounterMode(HIBERNATE_COUNTER_RTC);
+ HibernateCounterMode(HIBERNATE_COUNTER_24HR);
-#define STARTTIME 1564403262
- Seconds_set(STARTTIME);
+//#define STARTTIME 1564403262
+// Seconds_set(STARTTIME);
}
void utilsUpdateDateTime(uint32_t StartTime)
{
Seconds_set(StartTime);
}
+void utilsStoreLocalTime()
+{
+ time_t time_store = umktime(&LocalTime);
+ MCU_E2PromProgram(EEPROM_LOCAL_TIME,time_store);
+}
uint32_t UsersysTickGet (void) {
uint32_t tick = 0;