I could not find a way, where I can get the nrfx_rtc_t const *p_instance for the nrfx_rtc_init function. There is no example where it is shown where to get this struct from.
I could not find a way, where I can get the nrfx_rtc_t const *p_instance for the nrfx_rtc_init function. There is no example where it is shown where to get this struct from.
Ok I changed all above as you mentioned. I did not get any Repsonse from the RTC.
static void rtc_handler(nrfx_rtc_int_type_t int_type) {
LOG_INF("%s","Intr");
set_intr_src(0x05);
}
static void rtc_config(void) {
const nrfx_rtc_t rtc = NRFX_RTC_INSTANCE(RTC_INSTANCE_NUMBER);
uint32_t err_code;
//Initialize RTC instance
nrfx_rtc_config_t rtc_config;
rtc_config.prescaler = RTC_FREQ_TO_PRESCALER(10);
err_code = nrfx_rtc_init(&rtc, &rtc_config, rtc_handler);
LOG_INF("ErrorCode: %d",err_code);
err_code = nrfx_rtc_cc_set(&rtc,0,100,true);
LOG_INF("ErrorCode: %d",err_code);
//Power on RTC instance
nrfx_rtc_enable(&rtc);
}