Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

What has app_timer changed from V1 to V2?

Hello.

I can't find the documentation that mentions it.
Why did app_timer change from V1 to V2?

What are the known issues with V1?
Are there any additional features in V2?

I've added a custom serialization implementation and it seems to work fine even with app_timer_v1.

If there is no necessity to change from v1 to v2, is it okay to continue using V1 as it is?

Best regard.

Parents
  • Hi,

    app_timer2 is a complete redesign of the app_timer, so with regards to implementation, virtually everything has changed. The API remains the same though, so migrating from app_timer to app_timer2 should be a trivial task.

    There are several issues with the old implementation. Exactly which depends on the SDK version you are on, but most are related to timers expiring immediately in some corner cases.  There were several attempts to fix it without it turning out robust enough and it was decided to re-implement the whole thing using a simpler approach.

    If the app_timer is stable in your application and you test it well, then there is probably no need to migrate. But if you are in doubt, I would consider using the app_timer2 implementation from nRF5 SDK 17.1.0. This is the most stable app_timer implementation we have, and it has few dependencies on other modules, so it is typically easy to integrate also in older SDK versions.

    App timer 2 does not provide any significant additional features, though it can easily be modified to for instance provide the 64 bit counter to the application. It also starts the RTC immediately if APP_TIMER_KEEPS_RTC_ACTIVE is enabled in sdk_config.h, which you could perhaps argue is a new feature (before an app timer had to be started explicitly first for the RTC to start even ifAPP_TIMER_KEEPS_RTC_ACTIVE was enabled, and after that it would continue to run forever).

  • Hello Einar

    Since the current application is working without any problems, we will consider updating to V2 at some time, such as a version upgrade.

    Thank you for your response.

Reply Children
No Data
Related