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
Watchdog interrupt
Re: Watchdog interrupt
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 63 guests