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

App_timer compute diff between ticks

Hi, I want modify ESB example Rx to log the time between received messages. I am using SDK 13.0. Unfortunatelly, function app_timer_cnt_diff_compute always return 0. Can you suggest me where I made a mistake? I include my main and sdk_config files.

sdk_config.h main.c

Parents
  • This is by design. You need a running RTC if you want app_timer based timestamping. Either define APP_TIMER_KEEPS_RTC_ACTIVE and use app_timer_resume() or launch always running timer before using app_timer_cnt_get() and app_timer_cnt_diff_compute().

    Ps. currently app_timer has a bug related to thi please take a look at my post for resolution progress: devzone.nordicsemi.com/.../

Reply
  • This is by design. You need a running RTC if you want app_timer based timestamping. Either define APP_TIMER_KEEPS_RTC_ACTIVE and use app_timer_resume() or launch always running timer before using app_timer_cnt_get() and app_timer_cnt_diff_compute().

    Ps. currently app_timer has a bug related to thi please take a look at my post for resolution progress: devzone.nordicsemi.com/.../

Children
No Data