5. Extended Sleep configuration

To configure DA1453x or DA1458x device 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

  1. Open the file user_config.h which is under the user_config folder.

  2. Set the app_default_sleep_mode variable to ARCH_EXT_SLEEP_ON as shown below (default configuration of app_default_sleep_mode in proximity reporter),

    const static sleep_state_t app_default_sleep_mode = ARCH_EXT_SLEEP_ON;
    
  3. Save and compile (f7) the project

  4. Build the project by pressing the BUILD button or browse through Project -> Build Target

  5. Press the Start DEBUG session button and press again on the same button. This will stop the debug session and get the device running.

  6. Open our SmartSnippets toolbox and click on Power Profiler to observe the BLE events and extended sleep.

To configure the device 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

  1. Open the file user_config.h which is under the user_config folder.

  2. Set the app_default_sleep_mode variable to ARCH_EXT_SLEEP_OTP_COPY_ON as shown below.

    const static sleep_state_t app_default_sleep_mode = ARCH_EXT_SLEEP_OTP_COPY_ON;
    
  3. 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

  4. Save and compile (f7) the project

  5. Open our SmartSnippets toolbox and click on Power Profiler to observe the BLE events and extended sleep.

  6. Program the OTP with the compiled Hex file (follow the steps here in chapter 12 OTP Programmer)

  7. Once the OTP is programmed, observe the BLE events and extended sleep.

5.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 file user_config.h which is under the user_config folder.

  2. Change the .intv_max & .int_min variable (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.

    static const struct advertise_configuration user_adv_conf = {
    
    .addr_src = APP_CFG_ADDR_SRC(USER_CFG_ADDRESS_MODE),
    
    /// Minimum interval for advertising
    .intv_min = MS_TO_BLESLOTS(5000),                    // 5000ms
    
    /// Maximum interval for advertising
    .intv_max = MS_TO_BLESLOTS(5000),                    // 5000ms
    
  3. 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,

    /*
    ****************************************************************************************
    *
    * Default handlers configuration (applies only for @app_default_handlers.c)
    *
    ****************************************************************************************
    */
    static const struct default_handlers_configuration  user_default_hnd_conf = {
       // Configure the advertise operation used by the default handlers
       // Possible values:
       //  - DEF_ADV_FOREVER
       //  - DEF_ADV_WITH_TIMEOUT
       .adv_scenario = DEF_ADV_FOREVER, //advertising forever
    
       // Configure the advertise period in case of DEF_ADV_WITH_TIMEOUT.
       // It is measured in timer units. Use MS_TO_TIMERUNITS macro to convert
       // from milliseconds (ms) to timer units.
       .advertise_period = MS_TO_TIMERUNITS(18000), //this is for 18s
    
       // Configure the security start operation of the default handlers
       // if the security is enabled (CFG_APP_SECURITY)
       // Possible values:
       //  - DEF_SEC_REQ_NEVER
       //  - DEF_SEC_REQ_ON_CONNECT
       .security_request_scenario = DEF_SEC_REQ_NEVER
    };
    
  4. Repeat the steps from the previous section, step 4 to step 8 (either with or without OTP copy).

  5. 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 13 Extended sleep power measurement

DA1453x DEVKT-P

DA1453x DEVKT-P by default is shipping with a power measurement module PMM2.PMM2 is an external module which can be attached on the DA1453x DEVKT-P. It allows the simultaneous connection of an external current measurement instrument to measure and profile the current consumption of D1453x family members.

_images/pmm2.svg

Figure 14 Extended sleep power measurement

  1. To change to Boost mode, put the jumper on J4[1-2] on the motherboard, as shown in sleep mode overview chapter.

For further information please refer to DA14531 DEVKT-P or DA1453x DEVKT-P.