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

nRF52840 how do I get RTC ticks in multi-link central example

Hi all. I would like to get the current RTC tick when there is an advertisement RX event on multi-link central. I am going to store the advertisements along with a time i.e. how recent the data is.

I have added;

uint32_t ticks = app_timer_cnt_get();

This just returns the same value on each advertisement RX event i.e. it never changes.

I tried to start the app_timer with below, but timer is not running? 

What is the easiest was to get a rough count. Doesn't need to be 100% accurate, or equate to unit such as mS.

Thanks in advance

/** @brief Function for initializing the timer.
 */
static void timer_init(void)
{
    ret_code_t err_code = app_timer_init();
    APP_ERROR_CHECK(err_code);

    app_timer_start(adv_timer,65000,NULL);
}

Related