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

Work with Softdevice and RTC with internal RC oscillator on nRF52832

Hi,

I need to run RTC simultaneously with Softdevice without external low frequency clock source (32.768kHz oscillator).

I used following settings to setup RTC,

RTC_ENABLED 1
RTC2_ENABLED 1
NRFX_RTC_ENABLED 1
NRFX_RTC2_ENABLED 1
NRFX_CLOCK_ENABLED 1
NRF_CLOCK_ENABLED 1

with above settings I was able to use RTC without any problem. And it works with and without external low frequency oscillator.

Then try to work with softdevice. With external oscillator no problem occured. RTC works simultaneously with softdevice, no issue with provisioning or controlling device through mesh.

I can run RTC with internal RC oscillator with following settings,

NRF_CLOCK_LF_SRC_RC 0
NRF_SDH_CLOCK_LF_RC_CTIV 16
NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 0
NRF_SDH_CLOCK_LF_ACCURACY 1

So when I try to provision device stuck and give Initial Configuration Failed message. If I wasn't try to provision it works fine. (App stuck at Scanning for provisioned node state after sending provision data to the node)

But the device also work fine without RTC with above settings.

So Is there any other configurations need to made ?

Thank you

Parents
  • Hi Prasad, 

    Please be aware that your application and the mesh stack (including softdevice) share the same LFCLK. So if you configure the RTC with internal RC, you would need to make sure you configured the softdevice with the same configuration (NRF_SDH_CLOCK_LF_SRC in sdk_config.h) 

    If you still have the issue, could you please provide : 

    - The Mesh SDK version you are using

    - Which example you are testing with ? provisioner or provisionee ? 

    - Which provisioning bearer you are doing ? ADV bearer or GATT bearer ? 

    - Please provide the screenshot of the log when the issues happen. (e.g Initial Configuration Failed)

Reply
  • Hi Prasad, 

    Please be aware that your application and the mesh stack (including softdevice) share the same LFCLK. So if you configure the RTC with internal RC, you would need to make sure you configured the softdevice with the same configuration (NRF_SDH_CLOCK_LF_SRC in sdk_config.h) 

    If you still have the issue, could you please provide : 

    - The Mesh SDK version you are using

    - Which example you are testing with ? provisioner or provisionee ? 

    - Which provisioning bearer you are doing ? ADV bearer or GATT bearer ? 

    - Please provide the screenshot of the log when the issues happen. (e.g Initial Configuration Failed)

Children
No Data
Related