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

Relation RTC1 Compare / app_timer

Hi,

I'm using a nrf52810 on with SDK V15.2 with SD112.

The application uses the app timer and also TIMER1 for other purposes (and TIMER0 is locked by Softdevice).

What I essentially need is RTC1 to periodically trigger a SAADC sample event without interfering with the app_timer library. (I currently do the sampling using the app_timer, but the desired sample rate is not possible with app_timer (below 1ms) and TIMER1 is already used for another purpose)

Now, the accepted answer in this post (Can I use RTC1?)  - although for den nrf51 -suggests that since app_timer library only uses the COMPARE[0] event of the RTC1, so compare registers 1-3 should be open, right?

Two questions:

1.) Is it possible to e.g. use the COMPARE3 of RTC1 to periodically trigger a SAMPLE Task via PPI WIHOUT INTERFERING the app_timer running on RTC1?

2.) If yes, how would i do so? I see that i have to always reload the CC Values each time a COMPARE match has happened (for whatever reason). How can I do that when using PPI (and without starting to modify the timer_app library (because RTC1 IRQ is implemented in that library)?

Thanks a lot,

Franz

Related