This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

app_timer_cnt_get() and ble

Hi

I am using app_timer_cnt_get() like MIllis()

uint32_t millis()
{
uint32_t milli;

milli = app_timer_cnt_get() /32.768;

return milli;

}

but when i connect the nrf52840 to NUS(app mobile) using bluetooth,  app_timer_cnt_get() is stopped and i disconnect nrf52840 from NUS bluetooth  app_timer_cnt_get() runs again

i have no idea, what happen 

could you help me pleas , wahts wrong?

thanks 

pd I am beginner 

Parents
  • Hi Marcos

    Did you base your example on the ble_app_uart example?

    Did you make a lot of changes to the example?

    Possibly the app_timer counter will not run if you don't have any timers running. Would you be able to try and run a dummy timer with a callback at regular intervals, and see if the issue goes away?

    Best regards
    Torbjørn

  • yes i am using ble_app_uart example , like base example.

    now it works , I enabled this option from sdk_config.h

      

    enable RTC always on, and now, I connect the device to bluettoh and the funtion  app_timer_cnt_fet() dont stopped again, 

    I hope dont  have any problem   

    thanks 

Reply
  • yes i am using ble_app_uart example , like base example.

    now it works , I enabled this option from sdk_config.h

      

    enable RTC always on, and now, I connect the device to bluettoh and the funtion  app_timer_cnt_fet() dont stopped again, 

    I hope dont  have any problem   

    thanks 

Children
Related