Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using nrf_drv_ppi_channel_assign() to trigger timer clear task?

I'm trying to be a good camper and stick to published SDK interfaces, but I'm stuck on one point.

I want to use the PPI to toggle a GPIO pin AND clear the timer on a timer CC event.  So I have something like:

uint32_t cc0_eep = nrf_drv_timer_compare_event_address_get(&m_timer, NRF_TIMER_CC_CHANNEL0);

err_code = nrf_drv_ppi_channel_assign(&ppi_channel,
cc0_eep, nrfx_gpiote_set_task_addr_get(pin));
APP_ERROR_CHECK(err_code);

err_code = nrf_drv_ppi_channel_fork_assign(&ppi_channel, cc0_eep, nrfx_timer_clear_task_addr_get(&m_timer)); // this is wrong
APP_ERROR_CHECK(err_code);

My confusion is that there is no function "nrfx_timer_clear_task_addr_get()".  What's the right argument to pass here?

(Related, but less critical: is it possible to mix calls to shortcuts and regular nrf_drv_ppi_channel_assign()?  If so, how?)

Parents Reply Children
No Data
Related