Page 1 of 1

Watchdog interrupt

Posted: Fri May 06, 2022 2:06 pm
by hallothorsten
Hello, I try to get a interrupt for the rtc. There is a comment in rtc_wdt.h

RTC_WDT_STAGE_ACTION_INTERRUPT = RTC_WDT_STG_SEL_INT /*!< Trigger an interrupt. When the stage expires an interrupt is triggered. */

How can I get this interrupt?

code:
rtc_wdt_protect_off(); //Disable RTC WDT write protection
rtc_wdt_set_stage(RTC_WDT_STAGE0, RTC_WDT_STAGE_ACTION_INTERRUPT);
rtc_wdt_set_time(RTC_WDT_STAGE0, 1000);
rtc_wdt_enable(); //Start the RTC WDT timer
rtc_wdt_protect_on(); //Enable RTC WDT write protection

Thx

Re: Watchdog interrupt

Posted: Thu May 19, 2022 3:24 am
by ESP_Dazz
The RTC Watchdog will indeed it's interrupt line to HIGH when it timesout, however with the RTC WDT driver, you still need to manually route that interrupt line to one of the CPU's 32 interrupts and register and ISR to handle that interrupt. See rtc_isr_register() in "rtc_ctrl.h".