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

state-machine RTC synchronization with softdevice

Hi,

I’m working on a device that requires to enable the softdevice when connecting with a smartphone via Bluetooth and disable it when acquiring data from an analog source.

In order to do this I have created a simple state-machine and using the nRF52832 with sdk version 11.

I need to have a time-base low powered reference for dealing with measure interrupt timing and softdevice activity (no hard real-time constraint needed).

I use HFCLK for better accuracy of ADC measuring (simple-task mode).

I found that RTC0 is a dedicated peripheral for the softdevice and wondered if it can also be used after disabling/enabling the softdevice.

Here is a simple diagram of the working principle of the state-machine:

image description

  1. Is there a functional discontinuity of RTC0 if application timer is used for the state machine timing and task synchronizing while disabling/enabling the softdevice?

  2. Can I use RTC0 as state-machine time base?

I also found that RTC1 is proposed as application timer.

  1. In that case, can it be synchronized with RTC0 of the softdevice and the ADC Measure?

  2. Can you please give a code example for RTC peripheral synchronization?

Thank you,

Flinn

Related