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

RTC0, RTC1 and the app_timer with SoftDevice

Hi all,

I'm a bit confused. After going through available documentation, I thought I had understood that RTC0 was used by the SoftDevice, but that RTC1 was available to use how I liked. After going through the ble_app_template example, it turns out that the use of app_timer is necessary for the ble stack to work (used by the Connection Parameters module), thus making RTC1 unavailable for custom configuration. Is it always the case or just the for this example ?

Are there other requirements on app_timer for the ble_stack to work ? (Maximum prescaler value for instance)

This leads me to another question: if I have to use the app_timer, is there a way to specify priority levels of different timer timeout functions ? My application requires to keep track of the current time very precisely and I was planning to use RTC1 exclusively for that purpose.

Thanks !

Parents
  • It is correct that the softdevice itself only requires RTC0, but as you've seen, some of the SDK modules use RTC1, most notably app_timer, which is again used by the connection parameters module.

    It is perfectly possible to build an application without app_timer, but it will require some modifications to the SDK modules that uses it. You should however note that the connection parameters module isn't strictly required, since you can send connection parameter update requests manually by using the softdevice API directly. All modules using app_timer are optional, and you can just avoid using them. It is of course also an option to modify app_timer to cope with both your needs while still maintaining an API that the other modules can use. Exactly how to solve this is an application choice.

    There isn't any way to run different timers with different priorities with the current app_timer implementation.

Reply Children
No Data
Related