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

What is the precision on timers?

We have built and run the code in examples->peripherals->timer in nRF5_SDK_12.3.0_d7731ad on 4 different Nordic DK nRF51 development boards. The timer period is 5 msec. We commented out the LED initialization and toggling. In the ISR, we toggle a GPIO pin and monitor the output on a logic analyzer. We find that the timer period varies from board to board, ranging from 4994 to 5025 msec. We replaced the nrf_drv_timer_xxx functions with direct programming of registers and get identical results. This is a problem because our nRF51 product needs a very accurate 5 msec "clock", and we don't want to have to hand calibrate the timer initialization with varying values for each board produced.

Can you confirm this problem and perhaps suggest a solution?

Parents Reply Children
No Data
Related