Hi,
I have a problem getting interrupts by the rtc component working. I am using the nrf58211 chip, nRF Connect SDK v. 1.9, uBlox BMD360-eval development board.
My code looks like this:
static nrfx_rtc_t powerdown_rtc = NRFX_RTC_INSTANCE(0);
static void powerdown_rtc_handler(nrfx_rtc_int_type_t int_type){
nrfx_rtc_counter_clear(&powerdown_rtc);
}
void init_rtc(){
IRQ_CONNECT(DT_IRQN(DT_NODELABEL(rtc0)),
DT_IRQ(DT_NODELABEL(rtc0), priority),
nrfx_isr, nrfx_rtc_0_irq_handler, 0);
nrfx_rtc_config_t config = NRFX_RTC_DEFAULT_CONFIG;
config.prescaler = RTC_FREQ_TO_PRESCALER(1); // set to 1 HZ
nrfx_rtc_init(&powerdown_rtc, &config, powerdown_rtc_handler);
nrfx_rtc_tick_disable(&powerdown_rtc);
nrfx_rtc_counter_clear(&powerdown_rtc);
nrfx_rtc_cc_set(&powerdown_rtc, 0, 5, true);
nrfx_rtc_int_enable(&powerdown_rtc, NRF_RTC_INT_COMPARE0_MASK);
nrfx_rtc_enable(&powerdown_rtc);
}
I want: An Interrupt to be triggered 5s after initialization.
What actually happens is: The board resets after 5s
The prj.conf contains
CONFIG_NRFX_RTC=y CONFIG_NRFX_RTC0=y
Thank you for any hints and suggestions beforehand.
Kind Regards Tim

