Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

RTC every second generates TIMER COUNT through PPI

Hello,

This case is a part of a private case. Unfortunately  havent responded for few days. I believe he has days off or something, therefore I am willing to receive help in a public case because of an upcoming deadline.

My setup is pca10040 board, s132, sdk14.2. ble_app_uart example augmented with rtc and pii examples.

My goal is to track real time using lowest possibile energy consumptions while keeping time as precise as possibile. In code I want to increase RTC2 value every second. This generates an event every second and through PPI triggers TIMER COUNT task. I want to read this task and convert it to seconds:minutes:hours:days.

I have read many posts talking about this, unfortunately I am unable to solve this by myself. These are the initializations I use at the moment:

What I perceive is that RTC is ticking every second, however TIMER is not changing. I do not know where exactly to look for TIMER COUNT value. I have tried to capture values like this:

by putting these lines in main function while(1) loop and in timer0_event_handler, nevertheless this did not worked out.

Please, pin point where I am making mistake here, where should look for increasing TIMER COUNT value and how to make it increase every second. Thank you.