I'm unable to get any example code to test the timer in counter mode, I see the data sheet and trying to enable, but its not working can any one suggest me how to start the timer in counter mode and it should count pulses from gpiote event.
I'm unable to get any example code to test the timer in counter mode, I see the data sheet and trying to enable, but its not working can any one suggest me how to start the timer in counter mode and it should count pulses from gpiote event.
I would recommend you to use the timer driver, nrf_drv_timer, to use the counter mode. In addition, you can have a look at the timer example in the SDK to see how nrf_drv_timer can be used.
Finally I found the issue, nrf_drv_timer_init() only initializes but didn't starts that is the reason why when I read the count values it always shows 0. We need to call nrf_drv_timer_enable() to start the timer/counter, After calling this function my function works well and counting the pulses now.