Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Aplication Timer Library, BSP and Power Management Library

Hi,

I'm writting a simple test code that uses the aplication timer library (app_timer) to wake up from SystemON Idle mode to SystemOn mode every 1 minute. The idea is to stay 1 minute in SystemOn Idle to save power.

An app_timer, as far as I know, is like a "software" timer that use RTC1 hardware to create multiple instances. Because of that, I wonder if every time my app_timer event handler is called, the library internally "produces" multiple interrupt events from the RTC1. So, the CPU won't be waking up every minute, but multiple times in that minute (because RTC1 events). Is this assumption correct?

And another question related. The BSP uses a app_timer internally. Is this app_timer running constantly, producing the same issue of the question above (in case to be true)?

Thanks and best regards

José Forno

Parents
  • Hi Jose, 

    I'm not sure I understand what you meant by " if every time my app_timer event handler is called, the library internally "produces" multiple interrupt events from the RTC1. So, the CPU won't be waking up every minute, but multiple times in that minute (because RTC1 events). Is this assumption correct?"

    Why whould the library produce multiple interrupt for a single event ? The way the app timer work is to use the CC register to set to the next event timing. When you have multiple app_timers registered, the CC register will be set to the event of the closest app_timer and so on. 

    So if you you have a timer of 1 minute, the CPU will be woken up every 1 minute. If you have another timer at 0.5 minute, the CPU will be woken up every half a minute and every 1 minute for the other timer so it can be less than 0.5 minute between the 2 times the CPU woken up.

  • Hi Hung,

    Sorry for my confusing question :). You get the idea anyway. My doubts about app_timer are clarified. Thanks!

Reply Children
No Data
Related