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

timer vs app_timer

I am trying to understand the difference between the timer driver and the app_timer library. First of all: It seems like timer and app_timer are two entirely different things. One is based on the RTC, the other one is not. But why are they then named in such a similar way?

When should I use app_timer and when the timer driver? The documentation is really poor on this part.

Parents
  • Hi Raphael,

    The RTC runs (runs on 32KHz oscillator) at much lower frequency compare to the normal TIMER (runs on 16MHz oscillator). So when you want to count time but more like real time (seconds, minute etc) you should use the RTC (or the app timer). When you want to count time more precisely, down to nano and micro second, then you should use the timer driver.

    I agree that the naming is quite confusing. It came from the past that we had only the app timer before and then we added the timer driver from SDK v7.x

Reply
  • Hi Raphael,

    The RTC runs (runs on 32KHz oscillator) at much lower frequency compare to the normal TIMER (runs on 16MHz oscillator). So when you want to count time but more like real time (seconds, minute etc) you should use the RTC (or the app timer). When you want to count time more precisely, down to nano and micro second, then you should use the timer driver.

    I agree that the naming is quite confusing. It came from the past that we had only the app timer before and then we added the timer driver from SDK v7.x

Children
Related