Hello
I asked a follow up question on another user's posting on devzone.nordicsemi.com/.../ , but no one seems to respond, so I will try here.
The abovementioned posting had a response from Nordic on another chip, stating that the capture would execute before the clear task: Quote: "Yes, this is as designed and hence expected to be consistent on the XLR2 chip revision."
I want to measure a frequency as follows:
- PPI event on rising edge on GPIO pin (connected to frequency generating circuit)
- PPI TEP set to timer CAPTURE task
- PPI 'fork' TEP set to timer CLEAR task
as shown below:
NRF_PPI->CH[0].EEP = (uint32_t)&NRF_GPIOTE->EVENTS_IN[0];
NRF_PPI->CH[0].TEP = (uint32_t)&NRF_TIMER1->TASKS_CAPTURE[0];
NRF_PPI->FORK[0].TEP = (uint32_t)&NRF_TIMER1->TASKS_CLEAR;
// Enable PPI channel 0
NRF_PPI->CHEN = (PPI_CHEN_CH0_Enabled << PPI_CHEN_CH0_Pos);
The nRF52 ref manual does not say anything on priorities between CAPTURE and CLEAR tasks Will I risk losing the capture on the nRF52 (silicon rev 1) due to the 'simultaneous' CLEAR task?
At least on my development kit, PCA10040 V1.1.0, the capture works fine. With this method, I can measure without setting up timer interrupts for this
Any comments from Nordic team?