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

Parents
  • After further testing it seems to me that the GRTC CC[0] is used by the BLE drivers and I can't use it for my application if I also want BLE. Is this correct?

    Additionally I would like to know, how I can ensure that the GRTC SYSCOUNTER always runs from the 16 MHz clock. The product specification states "It uses the 16 MHz clock when the high-speed clock is active". In my application I have the HFXO always enabled because I need precise timing. I noticed that the SYSCOUNTER will drift with respect to a timer that runs from the HFCLK. Is there any way I can prevent this drift?

    Best regards,
    Sašo Domadenik

  • sasodoma said:
    After further testing it seems to me that the GRTC CC[0] is used by the BLE drivers and I can't use it for my application if I also want BLE. Is this correct?

    This looks right to me.

    I will nevertheless check all your queries internally with the team and get back to you.

    Regards,

    Priyanka

Reply Children
No Data
Related