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

nRF52 LFSYNT tolerance

Question: How to force the tolerance of the low frequency clock in the absence of 32kHz xtal in central role so that during connection request the sleep clock accuracy is reported as 20ppm?

When central device is using the 32.768 kHz synthesized from HFCLK the softdevice reports worst possible tolerance.

This is seen by sniffer at connection request: 000. .... = Sleep Clock Accuracy: 251 ppm to 500 ppm (0))

According to the datasheet " Frequency tolerance will be derived from the HFCLK source clock plus the LFSYNT tolerance ". Here the HF=10ppm; LF=8ppm so overall should be within 20ppm.

The definition is set as below:

#define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_SYNTH,            \
                             .rc_ctiv       = 0,                                \
                             .rc_temp_ctiv  = 0,                                \
                             .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}

If the source above is set to below then the sniffer reports tolerance correctly

.source        = NRF_CLOCK_LF_SRC_XTAL,

The LFXTAL is not present on the central board to save BOM. 20ppm is required to save power at long connection intervals.

Configuration on both sides: nRF52 SDK12.1.0 s132_nrf52_3.0.0_softdevice Peripheral device uses both slow and fast XTALS, central device uses only 32MHz.

  • In general NRF_CLOCK_LF_SRC_SYNTH is not recommended, because it will keep the HFCLK running, drawing more current compared to the RC. If you don't have an external 32 kHz crystal, it is recommended to use NRF_CLOCK_LF_SRC_RC with the configuration in the migration document:

    // Recommended configuration for using the RC oscillator with s132 (see nrf_sdm.h
    for details)
    
    nrf_clock_lf_cfg_t rc_cfg = {
        .source = NRF_CLOCK_LF_SRC_RC,
        .rc_ctiv = 16, // Check temperature every 4 seconds
        .rc_temp_ctiv = 2, // Calibrate at least every 8 seconds even if the temperature hasn't changed
    };
    
  • Thank for you answer, Peter.

    I understand it will draw more current but in central role system I have access to mains power, so the current consumption increase can be tolerated
    Unfortunately your explanation does not answer my question (RC synth is still 250ppm). Let me rephrase to be more specific: How to force the tolerance of the low frequency clock in the absence of 32kHz xtal in central role so that during connection request the sleep clock accuracy is reported as 20ppm?

  • I don't think it is possible to get 20 ppm with synth, and again you shouldn't use it. From the S132 v3.0.0 release notes:

    Synthesized low frequency clock source is not tested or intended for use with the BLE stack.
    
Related