4. Extended Sleep configuration

配置DA14531device to extended sleep mode without OTP copy, follow the steps mentioned below.

  1. Open the proximity reporter project from:…projects/target_apps/ble_examples/prox_reporter/Keil_5
  2. Open the fileuser_config.hwhich is under the user_config folder.
  3. Set theapp_default_sleep_modevariable to ARCH_EXT_SLEEP_ON as shown below.
conststaticsleep_state_tapp_default_sleep_mode=ARCH_EXT_SLEEP_ON;
  1. Save and compile (f7) the project
  2. Build the project by pressing the BUILD button or browse through Project -> Build Target
  3. Connect a PRO DK 376-18-B motherboard to the PC. Make sure the daughter board of DA14531 is connected to the motherboard.
  4. Press the Start DEBUG session button and press again on the same button. This it will stop the debug session and make the DA14531 running.
  5. Open our SmartSnippets toolbox and click on Power Profiler (available from our web siteDialog Semiconductor Web Site.) to observe the BLE events and extended sleep.

配置DA14531device to extended sleep mode with OTP copy, follow the steps mentioned below.

  1. Open the proximity reporter project from:…projects/target_apps/ble_examples/prox_reporter/Keil_5
  2. Open the fileuser_config.hwhich is under the user_config folder.
  3. Set theapp_default_sleep_modevariable to ARCH_EXT_SLEEP_OTP_COPY_ON as shown below.
conststaticsleep_state_tapp_default_sleep_mode=ARCH_EXT_SLEEP_OTP_COPY_ON;
  1. To wake up the device from extended sleep, there are two trigger mechanism that can be implemented.
    • Wake up from RTC Timer
    • Wake up from Timer1
  1. Save and compile (f7) the project
  2. Connect a PRO DK 376-18-B motherboard to the PC. Make sure the daughter board of DA14531 is connected to the motherboard.
  3. Open our SmartSnippets toolbox and click on Power Profiler (available from our web siteDialog Semiconductor Web Site.)
  4. Program the OTP with the compiled Hex file (follow the stepsherein chapter 12 OTP Programmer)
  5. Once the OTP is programmed, observe the BLE events and extended sleep.

4.1. Measuring the extended sleep current

In order to measure the extended sleep current over a digital multimeter, increase the advertising interval in the proximity reporter project under user_config.h. Follow the steps mentioned below:

  1. Open the fileuser_config.hwhich is under the user_config folder.
  2. Change the.intv_max & .int_minvariable (as shown below) to 5000 (=5 sec) of the advertise_configuration user_adv_conf structure in order to have a bigger advertising interval. This will give some time to measure the EXTENDED sleep current.
staticconst结构体advertise_configurationuser_adv_conf={.addr_src=APP_CFG_ADDR_SRC(USER_CFG_ADDRESS_MODE),///Minimumintervalforadvertising.intv_min=MS_TO_BLESLOTS(5000),//5000ms///Maximumintervalforadvertising.intv_max=MS_TO_BLESLOTS(5000),//5000ms
  1. To observe the extended sleep current for maximum time, change the default handlers configuration to advertise the device forever, by configuring .adv_scenario to DEF_ADV_FOREVER, as shown below,
/*******************************************************************************************Defaulthandlersconfiguration(appliesonlyfor@app_default_handlers.c)******************************************************************************************/staticconst结构体default_handlers_configurationuser_default_hnd_conf={//Configuretheadvertiseoperationusedbythedefaulthandlers//Possiblevalues://-DEF_ADV_FOREVER//-DEF_ADV_WITH_TIMEOUT.adv_scenario=DEF_ADV_FOREVER,//advertisingforever//ConfiguretheadvertiseperiodincaseofDEF_ADV_WITH_TIMEOUT.//Itis测量intimerunits.UseMS_TO_TIMERUNITSmacrotoconvert//from毫秒(ms)totimerunits..advertise_period=MS_TO_TIMERUNITS(18000),//thisisfor18s//Configurethesecuritystartoperationofthedefaulthandlers//ifthesecurityisenabled(CFG_APP_SECURITY)//Possiblevalues://-DEF_SEC_REQ_NEVER//-DEF_SEC_REQ_ON_CONNECT.security_request_scenario=DEF_SEC_REQ_NEVER};
  1. Repeat the steps from the previous section, step 4 to step 8 (either with or without OTP copy).
  2. Use a digital multimeter, connect the positive of multimeter to J9[4] and the negative to J9[3] of the motherboard, as shown in the figure below,
_images/extsleep.png

Figure 7Extended sleep power measurement

  1. Observe the extended sleep current value displayed in the meter. The typical numbers is mentioned below where the IBAT_LOW values are for the Boost mode and the IBAT_HIGH values are for Buck mode.
_images/extsleepdata.png

Figure 8Extended sleep power numbers in buck and boost mode

  1. To change to Boost mode, use the switch on the daughterboard and put it to L. On the motherboard, put the jumper on J4[1-2], as shown in sleep mode overview chapter.
  2. Repeat the steps from 1 to 6