watchdog stats

This commit is contained in:
Wolfgang Hottgenroth 2021-02-12 19:25:06 +01:00
parent 5d1d4042ee
commit d90c29536f

View File

@ -181,6 +181,7 @@ void eepromInit() {
if (__HAL_RCC_GET_FLAG(RCC_FLAG_IWDGRST)) {
logMsg("eeI, this was a watchdog reset");
deviceStats.s.totalWatchdogResets += 1;
__HAL_RCC_CLEAR_RESET_FLAGS();
}
logMsg("eeI, about to write device stats with updated power cycles counter");
eepromWrite(DEVICE_STATS_ADDR, deviceStats.b, sizeof(deviceStats));