Watchdog interrupt

hallothorsten
Posts: 1
Joined: Fri May 06, 2022 1:54 pm

Watchdog interrupt

Postby hallothorsten » Fri May 06, 2022 2:06 pm

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

ESP_Dazz
Posts: 308
Joined: Fri Jun 02, 2017 6:50 am

Re: Watchdog interrupt

Postby ESP_Dazz » Thu May 19, 2022 3:24 am

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".

Who is online

Users browsing this forum: No registered users and 60 guests