RTC Watchdog

This commit is contained in:
iranl
2024-12-18 22:23:37 +01:00
parent 308a0532fa
commit c674cd252e
4 changed files with 22 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
#include "RestartReason.h"
#include <NukiOpenerUtils.h>
#include "Config.h"
#include "hal/wdt_hal.h"
NukiOpenerWrapper* nukiOpenerInst;
Preferences* nukiOpenerPreferences = nullptr;
@@ -183,6 +184,10 @@ void NukiOpenerWrapper::readSettings()
void NukiOpenerWrapper::update()
{
wdt_hal_context_t rtc_wdt_ctx = RWDT_HAL_CONTEXT_DEFAULT();
wdt_hal_write_protect_disable(&rtc_wdt_ctx);
wdt_hal_feed(&rtc_wdt_ctx);
wdt_hal_write_protect_enable(&rtc_wdt_ctx);
if(!_paired)
{
Log->println(F("Nuki opener start pairing"));