watchdog stats
This commit is contained in:
parent
5d1d4042ee
commit
d90c29536f
@ -181,6 +181,7 @@ void eepromInit() {
|
|||||||
if (__HAL_RCC_GET_FLAG(RCC_FLAG_IWDGRST)) {
|
if (__HAL_RCC_GET_FLAG(RCC_FLAG_IWDGRST)) {
|
||||||
logMsg("eeI, this was a watchdog reset");
|
logMsg("eeI, this was a watchdog reset");
|
||||||
deviceStats.s.totalWatchdogResets += 1;
|
deviceStats.s.totalWatchdogResets += 1;
|
||||||
|
__HAL_RCC_CLEAR_RESET_FLAGS();
|
||||||
}
|
}
|
||||||
logMsg("eeI, about to write device stats with updated power cycles counter");
|
logMsg("eeI, about to write device stats with updated power cycles counter");
|
||||||
eepromWrite(DEVICE_STATS_ADDR, deviceStats.b, sizeof(deviceStats));
|
eepromWrite(DEVICE_STATS_ADDR, deviceStats.b, sizeof(deviceStats));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user