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

Does sd_softdevice_enable affect 32.768K crystal clock settings?

I am using softdevice and RTX at the same time. RTX is using RTC1, softdevice is using RTC0, so no problem there. But sd_softdevice_enable require a clock source as one of its parameters. The example code uses NRF_CLOCK_LFCLKSRC_XTAL_50_PPM.

My question is it softdevice going to reconfigure the clock settings for RTC0, which will affect RTC1?

The problem I am seeing right now is: with softdevice enabled, RTX clock goes faster by 10% to 20%.

Parents
  • Yes, the softdevice use the 32 kHz source as input for it's timing. So if you enable one 32 kHz source before you enable the softdevice, you could run into a situation like you have, where you reconfigure the clock source when you enable the softdevice. The recommendation is to start the softdevice first (if this will be running most of the time) and then use the softdevice firendly commands to request the clock source you need or make sure that you enable the same clock source when you enable the softdevice.

    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, true);
    
Reply
  • Yes, the softdevice use the 32 kHz source as input for it's timing. So if you enable one 32 kHz source before you enable the softdevice, you could run into a situation like you have, where you reconfigure the clock source when you enable the softdevice. The recommendation is to start the softdevice first (if this will be running most of the time) and then use the softdevice firendly commands to request the clock source you need or make sure that you enable the same clock source when you enable the softdevice.

    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, true);
    
Children
No Data
Related