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

Application Timer Tutorial with nRF52 SDK version 0.9.2

I can not find the macro:

 APP_TIMER_DEF(m_led_a_timer_id);

How do I create the timer ID with the SDK 0.9.2 for the nRF52?

Parents
  • As suggested by several others, you would probably be better off switching to SDK 11 as soon as possible.

    However, to answer your question you should note that the tutorial explains the differences in API for nRF51 SDK 9 and 10. The app timer in nRF52 SDK 0.9.2 has the same API as nRF51 SDK 9.

    There are essentially two differences. You have to declare the timer ID this way, rather than using the APP_TIMER_DEF macro:

    static app_timer_id_t                   m_led_a_timer_id;
    

    and you have to initialize the apptimer library in the following way:

    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);
    

    where the APP_TIMER_MAX_TIMERS is the max number of timers you are going to create.

  • thank you for your help. in the tutorial it was not clear for me which code i have to use for the nRF52 SDK 0.9.2, but now it works.

Reply Children
No Data
Related