Watchdog interrupt
Posted: 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
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