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

app_timer2 app_timer_v2 implementation

I have read that you can save RAM with the newer implementation, so I decide to go ahead and change my code.  The SDK 16 migration guide says:

To replace app_timer v1 with app_timer v2 in your existing project, you must add files app_timer2.c and drv_rtc.c in place of the app_timer.c file. You must also add an APP_TIMER_V2 define to the project. >

 May be those instructions are enough for more experience programmer, but it was not enough for me.   After reading all the available post on the subject, I have found that in the preprocessor definition, you have to add also :APP_TIMER_V2_RTC1_ENABLED  with the APP_TIMER_V2 definition.

You also have to include the preprocessor include directory  (for app_timer2.c)

../../../../../../components/libraries/atomic_fifo

../../../../../../components/libraries/sortlist

nrf_sortlist.c add also to be included in the program.

I hope that will save precious times to others.

Cheers S.

Related