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

exit from sleep and advertising time

  • Could it possible to reduce INIT  and ADVERISE times ?
  • What is normal startup time for nrf52832 init peripheral for advertising?
  • What is the minimum possible advertising time?
  • I want reduce my average current consumption, for now I have external (2 second) interrupter which wake nrf52832 from sleep.
  • So I have following results: 1500 ms with 100 uA in sleep and 500 ms with 3500 mA in advertising (300 ms init + 200 ms advertise.
  • So my average current is 1220 uA
  • used shunt resistor 100 Ohm

Parents
  • Hi,

    Please share your source code if possible. It's not clear why you have to repeat the init routine every time. Usually, you do it once on startup. Also, it looks to be a burst of advertisement events during the 200 ms advertisement period, is that intentional or do you really want it to advertise 1 time every 2 seconds? 

    Note that it should be possible to get an average current of around 7-8 uA if you just advertise at 2 second intervals. Try our online power profiler https://devzone.nordicsemi.com/nordic/power/ if you want to estimate excepted current consumption for other scenarios. 

Reply
  • Hi,

    Please share your source code if possible. It's not clear why you have to repeat the init routine every time. Usually, you do it once on startup. Also, it looks to be a burst of advertisement events during the 200 ms advertisement period, is that intentional or do you really want it to advertise 1 time every 2 seconds? 

    Note that it should be possible to get an average current of around 7-8 uA if you just advertise at 2 second intervals. Try our online power profiler https://devzone.nordicsemi.com/nordic/power/ if you want to estimate excepted current consumption for other scenarios. 

Children
  • Hi, thanks for your feedback 
    for now my working steps looks like this:

    I have external interrupt pulse (every 2 sec)

    1. after reset reason 0 (power on) I perform global init then
    2. when I finish advertising (or some other process) I configure nrf_gpio_cfg_sense_input() and call for sd_power_system_off() to reduce consumption
    3. when nrf52 catch interrupt pulse(reset reason 65536)->init advertise-> start advertise with 20ms interval during my custom timeout of 200ms->goto step 2.

    I see a possible improvements:

    1. reduce my custom timeout -> reduce num of advertise packets (add some delay to other device connection)
    2. reduce num of process which I initialize after startup

     Yes, I want advertise one or few times every 2 sec to archive low average current. Could you describe a clear steps to archive low current with advertisement, should I call sd_power_system_off()  during 2 sec interval?

    Also what is normal standby current for nrf52832 without advertise? I see its around 3 mA (58 μA/MHz * 64)

    Thx!

  • Hi,

    Thanks for the clarification. System OFF mode is typically used when you want the device to remain "OFF" for more extended periods. But I guess you may be able to lower total average current if the external interrupt source is going to be kept active anyway (or if it consumes significantly less power than the 52 in standby).

    To reduce the startup time you can try to select the internal RC oscillator when you enable the Softdevice instead of the external 32KHz crystal. The code snippet below is from sdk_config.h and shows the clock settings you can use to make the Softdevice select the RC oscillator.

    //==========================================================
    
    // <h> Clock - SoftDevice clock configuration
    
    //==========================================================
    // <o> NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
     
    // <0=> NRF_CLOCK_LF_SRC_RC 
    // <1=> NRF_CLOCK_LF_SRC_XTAL 
    // <2=> NRF_CLOCK_LF_SRC_SYNTH 
    
    #ifndef NRF_SDH_CLOCK_LF_SRC
    #define NRF_SDH_CLOCK_LF_SRC 0
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
    #ifndef NRF_SDH_CLOCK_LF_RC_CTIV
    #define NRF_SDH_CLOCK_LF_RC_CTIV 16
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
    // <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
    // <i>  if the temperature has not changed.
    
    #ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
     
    // <0=> NRF_CLOCK_LF_ACCURACY_250_PPM 
    // <1=> NRF_CLOCK_LF_ACCURACY_500_PPM 
    // <2=> NRF_CLOCK_LF_ACCURACY_150_PPM 
    // <3=> NRF_CLOCK_LF_ACCURACY_100_PPM 
    // <4=> NRF_CLOCK_LF_ACCURACY_75_PPM 
    // <5=> NRF_CLOCK_LF_ACCURACY_50_PPM 
    // <6=> NRF_CLOCK_LF_ACCURACY_30_PPM 
    // <7=> NRF_CLOCK_LF_ACCURACY_20_PPM 
    // <8=> NRF_CLOCK_LF_ACCURACY_10_PPM 
    // <9=> NRF_CLOCK_LF_ACCURACY_5_PPM 
    // <10=> NRF_CLOCK_LF_ACCURACY_2_PPM 
    // <11=> NRF_CLOCK_LF_ACCURACY_1_PPM 
    
    #ifndef NRF_SDH_CLOCK_LF_ACCURACY
    #define NRF_SDH_CLOCK_LF_ACCURACY 1
    #endif
    

     

    ivnn said:
    Also what is normal standby current for nrf52832 without advertise? I see its around 3 mA (58 μA/MHz * 64)

     The normal standby current (system ON) should be around 2uA, or 0.3 uA if you are in System OFF. To help illustrate this I modified the beacon example in SDK 16.0.0 to advertise at 2 s intervals and captured some current plots with the power profiler kit as shown below.

    CPU enters System ON mode between advertisment events:

     

    Measured IDLE current is measured to 1.3 uA in this case, but you can generally expect it to be closer to 2uA

    Modified beacon example. Pre-compiled hex included:

    ble_app_beacon_2s.zip

Related