GRTC Periodic interval + nrfx

Hi,

I recently found out about the Periodic interval feature on GRTC CC[0] and it seems like it would be quite useful for my application. Most of my code so far uses the nrfx drivers. Looking at the nrfx: GRTC driver page it seems that there are no functions available for that feature, but I do see some in the HAL section. What would be the best way to use the CC[0] channel in my code? Also how can I make sure that the channel is free to use and do I need to somehow reserve it so it doesn't accidentally get used elsewhere?

Regarding my application, I would use the INTERVAL register to auto increment the CC[0] register, but also sometimes increment it manually using CCADD. Is there also a safe way to decrement it while ensuring that I don't get an auto increment in between my read, subtract and write?

Best regards,
Sašo Domadenik

Related