How to use zephyr counter api with GPIOTE PPI

Hello,

I need to use timer1 in counter mode.

how can I use GPIOTE to start the interrupt of the timer(NRF_TIMER1->TASKS_START = 1)?

when using directly the nrfx timers we used to "connect" the ppi like this -

static const nrfx_timer_t timer = NRFX_TIMER_INSTANCE(TIMER_INST_IDX);

nrfx_gppi_channel_endpoints_setup(gppi_channel1,
nrfx_gpiote_in_event_addr_get(rising_edge_pin),
nrfx_timer_task_address_get(&timer, NRF_TIMER_TASK_START));

but to use this i need the register address, and i didnt found how the get it from the counter api

Thanks

Related