This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is it possible to trigger SAADC by PPI between RTC compare event and SAADC sample task?

I want to trigger SAADC by PPI between RTC compare event and SAADC sample task. Is it possible? In the SAADC example (SDK 12.2.0), a timer is implemented. In function nrf_drv_timer_extended_compare(), a shortcut is set between compare event and clear task.

nrf_drv_timer_extended_compare(&m_timer, NRF_TIMER_CC_CHANNEL0, ticks, NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, false);

However, in RTC, no such shortcut is available. I can get the compare event by nrf_rtc_event_address_get(), set the compare counter and interrupt by nrf_drv_rtc_cc_set(). Is this mean I must clear the compare counter by nrf_drv_rtc_counter_clear() in the interrupt handler? Is there a RTC shortcut between compare event and clear task?

Related