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

What is correct way to reassign PPI channel?

I have a case where I'm using a timer/counter as a counter with one PPI channel routing a GPIO rising edge to the COUNT task. Another GPIO rising event controls the counting in the following way: The first GPIO event STARTS the counter. A GPIO event interrupt handler counts the number of GPIO events and after 'n' of these, I want the next GPIO event to STOP the counter (or, at least, CAPTURE the counter value).

Can I initialize the second PPI channel to connect the GPIO event to the counter START and then, after I've reached 'n' events, simply reassign the PPI channel to connect the GPIO event to the counter STOP (or CAPTURE) task?

Do I need to have an intervening channel disable/enable sequence?

Update: I am using the nrf_drv_ppi driver.

Thanks in advance. Tom

Parents Reply Children
No Data
Related