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

Using RC oscillator for BLE init without calibration, beacon mode.

Hey all,

Quick question. If we want to send BLE advertisements, beacons, for just 1-2 seconds, then shutdown into SYSTEM_OFF mode, could we initialize the BLE soft device with the RC oscillator without it being calibrated by the HF crystal? We don’t need a precise clock. No BLE connection, just beacon.

For instance, beaconing for 2 seconds, and using an 8 second calibration period?

SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_8000MS_CALIBRATION, NULL);

Would this be the lower power method compared to using the 32KHz crystal, as long as we shutdown quickly (before 8 seconds). OR is the RC oscillator calibrated at the start of that 8-second period?

Also -- what's clocking the uP itself, at start-up? It's the RC oscillator, right? Is it ever calibrated if no BLE is ever used?

Thanks! Brian

  • Hi Brian,

    Unfortunately, there is no option for non-calibration mode for RC 32kHz oscillator. But you can use NRF_CLOCK_LFCLKSRC_RC_250_PPM_TEMP_8000MS_CALIBRATION for example instead. If there is no temperature change, it will not do re-calibration.

    Note that a calibration will be executed anyway at the beginning when we started the 32kHz RC.

    If you need just the advertising, I think what you can do is to use the radio directly. Without using any softdevice, then you will have full control over the 32kHz RC. You can find an example on how to do advertising with the radio directly in the experimental_ble_app_multiactivity_beacon project.

    Or you can use external 32kHz crystal, this will help you to avoid calibration.

    When the CPU starting up, it's the 16MHz RC running.

  • Really helpful Hung! Thank you for the great response. Something very interesting here though... we're not seeing the calibration of the RC oscillator when we initialize or the BLE stack (using a Keysight PowerMeter). Can you confirm that the HF 16MHz crystal is, in fact, turned on after we initialize the soft handler

    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_8000MS_CALIBRATION, NULL); 
    

    //should RC calibration occur right now? err_code = sd_ble_enable(&ble_enable_params);

    If we're only sending one beacon, this seems like a more power efficient way to do this, versus using the 32KHz external crystal, since we need to wait a considerable amount of time for the 32KHz crystal to start up and stabilize. Would you concur? Thanks! Brian

  • Or could the RC oscillator be calibrated at the same time we send an initial BLE beacon? (so as not to start the HF crystal, stop, then restart)?

  • Hi Brian,

    I got the confirmation from our developer that we will start the 16MHz crystal for calibrating the 32kHz RC after softdevice_enable() called. It's independent from the BLE radio event.

    I agree that start up time for 32kHz crystal is quite large. And using 32kHZ RC would be better in your use case.

    I keep my suggestion that you can achieve the lowest power consumption by doing advertising via the radio directly. It should not be too difficult.

  • Hi all,

    If the temperature remains unchanged and the RC oscillator is not calibrated for a long time, is there a risk that the RC oscillator will stop working

Related