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

nRF52832 how to use PPI to do a capture compare on a timer, and also disable that compare?

Hi. I am using timers and PPI to do frequency counting.

The basic process is for 1 PPI channel to incriment a timer, and then a second PPI on a second timer to stop the counter after 10mS.

The captured value is then read, and all the timers reset.

I would like to increase the time period to 15mS, but do another capture on the timers CC channel 1 after 5mS.

I have setup a second timer compare, but the problem is that this capture keeps happening after 5mS because it is not stopped.

How do I setup a capture to only fire once? The 'nrf_drv_timer_extended_compare' will allow me to stop the mask 'NRF_TIMER_SHORT_COMPARE1_STOP_MASK' but how do I start it again? Also will this stop mean that the PPI event not work.

Thanks

Parents Reply Children
No Data
Related