To reduce power consumption

Hey all!

I have been working on DA14531 micro - controller, using keil uVision application software to develop a firmware and Dialog Smartbond Flash Programmer application software to load the same.

Details of the hardware/ software applications:
1. DA14531: Micro - controller that is being used.
2. Keil uVision5: Application to develop the firmware and generate a hex file to load the same.
3. Dialog Smartbond Flash Programmer v1.0.8: Application to load the firmware.
4. J - link (Segger JTAG): The interface used to load the firmware.
5. SDK_6.0.18: SDK that has basic in-built examples [the main SDK].

The aim is to achieve the working of DA14531 as a beacon with necessary application.

The above involves the use of extended sleep mode as well where the advertising interval is set to 1.3sec so the device advertises, goes to sleep and wakes up to perform the same on loop, the current consumption when checked on power profiler application is observed to be as follows:

1. Overall average power: 19.57 uA

2. Peak power: 3.27 mA

3. Average power when in extended sleep mode: 11.91 uA

PFA a screenshot of the same.

Can the current consumed during sleep time be reduced any further?

Any help shall be appreciated. TIA!

Warm regards,

AXISCADES.

Parents
  • Hi AXISCADES,

    Thank you for posting your question online.

    The aim is to achieve the working of DA14531 as a beacon with necessary application.

    The above involves the use of extended sleep mode as well where the advertising interval is set to 1.3sec so the device advertises, goes to sleep and wakes up to perform the same on loop,

    I used our ibeacon project, and I only changed the Advertising intervals equal to 1.3sec. After that I could see on the Power Profiler:

    As you can see the Avg Current is 22uA. 

    Can the current consumed during sleep time be reduced any further?

    According to the screenshot you shared, I can see that the DA14531 is going successfully into Extended Sleep Mode between the advertising intervals. You could possibly drop the current consumption a bit more if you do not retain the RAM blocks while on Extended Sleep Mode. 
    Please refer on the BLE Sleep Modes Tutorial:
    You can check the RAM retained blocks on the da1458x_config_advanced.h file:

    /****************************************************************************************************************/
    /* The Keil scatter file may be provided by the user. If the user provides his own scatter file, the system has */
    /* to be aware which RAM blocks has to retain. The 4th RAM block is always retained, since it contains the ROM  */
    /* data.                                                                                                        */
    /*     - CFG_RETAIN_RAM_1_BLOCK: if defined, the 1st RAM block must be retained.                                */
    /*     - CFG_RETAIN_RAM_2_BLOCK: if defined, the 2nd RAM block must be retained.                                */
    /*     - CFG_RETAIN_RAM_3_BLOCK: if defined, the 3rd RAM block must be retained.                                */
    /*                                                                                                              */
    /* If the CFG_CUSTOM_SCATTER_FILE flag is undefined, the system knows which blocks to retain based on the       */
    /* default SDK scatter file.                                                                                    */
    /****************************************************************************************************************/
    #define CFG_RETAIN_RAM_1_BLOCK
    #define CFG_RETAIN_RAM_2_BLOCK
    #define CFG_RETAIN_RAM_3_BLOCK

    Generally, the Avg Current of 19.57uA for a beacon project is an expected value. 

    Best Regards,
    OV_Renesas

  • I thank for the reply!

    I have been using the above mentioned SDK to develop an iBeacon application.

    The following observations were made:

    1. Sleep current of 11.91uA (Extended sleep mode).

    2. Average current of 20uA (TX power: 0dBm, Advertising interval: 1.3 seconds).

    3. Peak current of 3.27 mA (During the advertising).

     

    With the above measurements expected battery life using a CR2032 battery which claims to have a capacity of 220mAh is 1.3 years when a current of 20uA is consumed.

    The calculation for which is checked here: https://www.digikey.in/en/resources/conversion-calculators/conversion-calculator-battery-life

    Similarly, when a FeasyBeacon with the iOS & Android FeasyBeacon SDK claims to use the same battery including the specifications of advertising interval to be 1.3 seconds and the TX power to be 0dBm to last 3 years.

    PFA a screenshot of the specifications:

    Is there a way this can be achieved?

    Also, another observation made is to use the function spi_flash_power_down() to reduce the current consumption as discussed below:

    community.renesas.com/.../current-consumption-due-to-spi-flash-on-da14531-module

    Yet this resulted in failure, is there anything related to the above to be done?

    Any help shall be appreciated.TIA.

    Warm regards,

    AXISCADES.

  • Hi AXISCADES,

    Thank you for the reply.
    Could you please clarify if you are using the DA14531 SoC or the DA14531MOD? 
    Could you also please clarify if you are testing this on a custom board or one of our Dev Kits?

    The current consumption measurements I shared on my previous answer regarding the ibeacon project are INCORRECT.
    The reason is that I had not calibrated the Power Profiler.
    I worked on Dev Kit Pro and I tested it with both the DA14531MOD DB and the DA14531 SoC DB. I used SDK v6.0.18 and the ibeacon project from the GitRepo.
    Before measuring the current consumption, I followed the Calibration procedure as mentioned on the SmartSnippets Toolbox User Manual", on section 13.10 Calibration Procedure.
    In order to open the SmartSnippets Toolbox User Manual, go in the top right corner, on the Help tab and select User Guide (html)

    After that the measurements I got for TX power: 0dBm, Advertising interval: 1.3 seconds

    And according to the site you shared:

    Also, another observation made is to use the function spi_flash_power_down() to reduce the current consumption as discussed below:

    community.renesas.com/.../current-consumption-due-to-spi-flash-on-da14531-module

    Yet this resulted in failure, is there anything related to the above to be done?

    What do you mean it resulted in failure? As you can see on the thread you shared, it highly depends on the SPI Flash you have selected for your board. If the SPI Flash fails to go into sleep, that will add up from 100 up to 400uA depending the SPI Flash. So I do not think that with a current consumption of 19uA the SPI Flash has failed to go into Sleep mode. 

    Best Regards,
    OV_Renesas

     

  • Hey!

    I have been using DA14531MOD - 00F0100 2204 with SEGGER J-link to load the firmware. 

    Also, the application using which I measured the current consumption is power profiler by nRF Connect for Desktop interfacing the DA14531MOD with the device power profiler kit II by nordic semiconductor for the same.

    The above results (current consumption) were in reference with the same setup. 

    Is it possible to measure the current of the same (DA14531MOD - 00F0100 2204) using SmartSnippets Toolbox application?

  • Hi Cades,

    Thank you for the reply.
    So you have created a custom board with the DA14531MOD? 
    In order to use the SmartSnippets Toolbox you must have the Development Kit Pro which has the Current Measurement Circuity. 
    Unfortunately, I cannot provide support for tools from another company, so I do not know if your power profiler needs some kind of calibration or if the measurements shown are accurate. 

    If you have created a custom board, could you share the schematics and the GPIOs you used to measure the current? 

    Best Regards,
    OV_Renesas

  • Hi!

    I appreciate the reply!

    I thank you for the information!

    The project used from the SDK is "ble_app_perpheral" (found within the folder ble_examples) but is associated to work with beacon structure as in the "iBeacon" project (found within the folder connectivity) to work as iBeacon which works as an iBeacon. 

    The SDK that I have been using is found in the website below:

    https://www.renesas.com/us/en/document/swo/sdk60161144-da145301-da145856?language=en&r=1564826

    The iBeacon project used for the iBeacon structure refrence is found below:

    https://github.com/dialog-semiconductor/BLE_SDK6_examples/blob/main/Readme.md

    PFA the schematic used where SEGGERS J-LINK is connected to the DA14531MOD as shown to load the firmware.

    Similarly, the schematic also shows the connection between the DA14531MOD and power profiler kit II to measure the current consumed.

    When used the basic "ble_app_perpheral" example with the iBeacon structure (which works as an iBeacon) with the advertising interval being 1.3second and TX power being 0dBm to measure current on the power profiler application using the above setup consumes a current of 213uA (idle current) between two advertising intervals. 

    But the same setup when used to measure current with our device application involving extended sleep mode resulted in consuming a sleep current of 11uA.

    The datasheet of the DA14531MOD claims the current of 1.6uA to be consumed when in extended sleep modeis there a way to achieve this?

    Warm regards,

    AXISCADES.

Reply
  • Hi!

    I appreciate the reply!

    I thank you for the information!

    The project used from the SDK is "ble_app_perpheral" (found within the folder ble_examples) but is associated to work with beacon structure as in the "iBeacon" project (found within the folder connectivity) to work as iBeacon which works as an iBeacon. 

    The SDK that I have been using is found in the website below:

    https://www.renesas.com/us/en/document/swo/sdk60161144-da145301-da145856?language=en&r=1564826

    The iBeacon project used for the iBeacon structure refrence is found below:

    https://github.com/dialog-semiconductor/BLE_SDK6_examples/blob/main/Readme.md

    PFA the schematic used where SEGGERS J-LINK is connected to the DA14531MOD as shown to load the firmware.

    Similarly, the schematic also shows the connection between the DA14531MOD and power profiler kit II to measure the current consumed.

    When used the basic "ble_app_perpheral" example with the iBeacon structure (which works as an iBeacon) with the advertising interval being 1.3second and TX power being 0dBm to measure current on the power profiler application using the above setup consumes a current of 213uA (idle current) between two advertising intervals. 

    But the same setup when used to measure current with our device application involving extended sleep mode resulted in consuming a sleep current of 11uA.

    The datasheet of the DA14531MOD claims the current of 1.6uA to be consumed when in extended sleep modeis there a way to achieve this?

    Warm regards,

    AXISCADES.

Children
  • Hi Cades,

    Thank you for the reply.
    Is there a reason you are working with SDK v6.0.16 and with the latest SDK v6.0.18?
    The Schematic you shared is OK, just make sure that you have the debugger de-attached when trying to measure the Avg Current Consumption so you can make sure that you have accurate measurements.

    But the same setup when used to measure current with our device application involving extended sleep mode resulted in consuming a sleep current of 11uA.

    In SDK v6.0.18 with the DA14531MOD and the ibeacon project from the GitRepo (with TX power set at 0dBm and Advertising Interval at 1.3 seconds) I get 5.6uA Avg. Current Consumption.

    The datasheet of the DA14531MOD claims the current of 1.6uA to be consumed when in extended sleep modeis there a way to achieve this?

    The DA14531MOD Datasheet, claims a current of 1.8uA.

    In order to achieve that, I stopped advertising on all 3 available Channels and I selected only one. On user_config.h file:

    /*
     ****************************************************************************************
     *
     * Advertising configuration
     *
     ****************************************************************************************
     */
    static const struct advertise_configuration user_adv_conf = {
    
        .addr_src = APP_CFG_ADDR_SRC(USER_CFG_ADDRESS_MODE),
    
        /// Minimum interval for advertising - set in user_app.c
        .intv_min = MS_TO_BLESLOTS(0),                    
    
        /// Maximum interval for advertising - set in user_app.c
        .intv_max = MS_TO_BLESLOTS(0),                    
    
        /**
         *  Advertising channels map:
         * - ADV_CHNL_37_EN:   Advertising channel map for channel 37.
         * - ADV_CHNL_38_EN:   Advertising channel map for channel 38.
         * - ADV_CHNL_39_EN:   Advertising channel map for channel 39.
         * - ADV_ALL_CHNLS_EN: Advertising channel map for channel 37, 38 and 39.
         */
        .channel_map = ADV_CHNL_38_EN,

    And on the user_app.c file I set the Advertising Interval into 5seconds. Then with the Power Profiler (calibrated) I was able to see this Avg Power Consumption:

    And I was able to see the DA14531MOD advertising with the SmartBond App on my SmartPhone (Android v13). 
    Then I changed the Advertising Interval into 1.3 seconds and kept only the Advertising Channel 37 active. On the Power Profiler I could see Avg Power Consumption of 3.9uA

    My Central (SmartBond App) was able to scan for the DA14531MOD while advertising. 
    In order to achieve the 1.8uA Current Consumption you are going to need to increase the Advertising Interval (how much, it depends on your central configuration, scan interval, scan window etc.) and to try advertising only in one Advertising Channel and not on all 3 simultaneously. 

    Is there a specific reason you are working with the ble_app_peripheral example and not with the ibeacon project? 

    Best Regards,
    OV_Renesas

  • Hi!

    I highly appreciate the help!

    I did as said above ie, I stopped advertising on all 3 available channels and I selected only one resulting in the following:

    Average current has been reduced to 15 uA (TX power: 0dBm, Advertising interval: 1.3 seconds) but the sleep current is still 11.91uA (Extended sleep mode).

    My focus is to reduce the sleep current to around 2uA.

    The reason for not using the iBeacon project is I couldn't link the SDKs. I had raised a query for the same and PFA the forum link:

    https://community.renesas.com/wireles-connectivity/f/bluetooth-low-energy/31461/unable-to-link-ble_sdk6_examples-to-the-main-sdk

    Is there a way I can solve either of the issues?

    Warm regards,

    AXISCADES.

  • Hi Cades,

    Thank you for the reply.

    Average current has been reduced to 15 uA (TX power: 0dBm, Advertising interval: 1.3 seconds) but the sleep current is still 11.91uA (Extended sleep mode).

    It is weird that even after you changed the Advertising Channel map the sleep current remained the same. You should be able to see a difference in the current consumption.

    The reason for not using the iBeacon project is I couldn't link the SDKs. I had raised a query for the same and PFA the forum link:

    https://community.renesas.com/wireles-connectivity/f/bluetooth-low-energy/31461/unable-to-link-ble_sdk6_examples-to-the-main-sdk

    Is there a way I can solve either of the issues?

    As mentioned on the mentioned ticket:
    The SDK v6.0.16 uses ARM Compiler v5 and the SDK v6.0.18 ARM Compiler v6.
    All the GItRepo examples, and the python script, has been ported into SDK v6.0.18. 
    beacon_v6.0.16.zip
    Please find the attached beacon_v6.0.16.zip file. It contains the old ibeacon example for SDK v6.0.16 with ARM Compiler v5. 
    I have also attached the old python script to fix your paths. 
    1) Unzip the file and place the beacon folder inside the ble_examples folder (inside the SDK).
    2) Open the ibeacon folder:

    3) Type 'cmd' on the Windows path bar and press enter:

    4) On CMD type the following:

    python dlg_make_keil5_env_v2.000.py -sdkpath clean
    

    When the script has finished, you should see this kind of log:

    5) Then type:
    python dlg_make_keil5_env_v2.000.py -sdkpath "INSERT_YOURPATH_TO_THE_SDK"

    When the script has finished, you should see this kind of log:

    6) Open the ibeacon project in Keil IDE and you should be able to compile the project with ARM Compiler v5. 

    The other approach would be to migrate into SDK v6.0.18 and then use the ibeacon project from the GitRepo.

    Best Regards,
    OV_Renesas

  • Hey!

    I sincerely thank you for the reply!!

    I had tried linking the previously present ibeacon project with both the SDK versions (SDK v6.0.16 and SDK v6.0.18) but failed to compile the same.

    Now that I tried linking the above given iBeacon project with the SDK v6.0.16, it worked. I could compile the same without any errors.

    When checked the current consumed, it resulted in the following:

    1. Sleep current of 1.3uA (Extended sleep mode).

    2. Average current of 5.4uA (TX power: 0dBm, Advertising interval: 1.3 seconds).

    3. Peak current of 3.32mA (During the advertising).

     

    I have been trying to implement my application for the above project.

    I want the extended sleep mode to be retained and the device needs to wakeup by a GPIO to just give a blink every time the GPIO goes high, other than it's regular wake up for advertising. As the wkupct_quadec.c file wasn't used, I did add the same under the sdk_driver folder (as in the ble_peripheral example I was using prior) via the keil application and the wakeup functionality doesn't seem to work when called the same.

    I initially had used interrupts for the same but because the device is set to extended sleep mode, I had to use GPIO wakeup.

    Can you kindly suggest a way to solve the same?

    Also, where can I find references for the above given iBeacon project?

    The project I was using before had references on the functions to be used, was looking for any such references for the same.

    Warm regards,

    AXISCADES. 

  • Hi Cades,

    Thank you for the reply.

    Now that I tried linking the above given iBeacon project with the SDK v6.0.16, it worked. I could compile the same without any errors.

    Glad you were able to port the ibeacon project in your SDK. 

    I want the extended sleep mode to be retained and the device needs to wakeup by a GPIO to just give a blink every time the GPIO goes high, other than it's regular wake up for advertising. As the wkupct_quadec.c file wasn't used, I did add the same under the sdk_driver folder (as in the ble_peripheral example I was using prior) via the keil application and the wakeup functionality doesn't seem to work when called the same.

    I initially had used interrupts for the same but because the device is set to extended sleep mode, I had to use GPIO wakeup.

    Can you kindly suggest a way to solve the same?

    Please find the attached beacon_v6.0.16_wkcpt.zip file, it contains the ibeacon project for SDK v6.0.16. 
    I have implemented an app_easy_timer that starts inside the user_app_adv_start function and after 20seconds it stops advertising and shuts down the BLE core. 
    Then I configure the P0_11 as a Button and I initialize the Wake-up Controller. 
    I have also configured P0_9 as my LED pin because it is already connected into a LED on the DA14531MOD Daughterboard board. 
    When I press the Button (P0_11) the DA14531 wakes up the BLE core and restarts advertising. The LED turns on when the Interrupt is triggered and turned off just before we start advertising (less than 1 second). 
    This ends up on a loop, 20 seconds advertising, then BLE core is off, push the Button to wake-up the BLE core and restart advertising for 20 seconds. 
    beacon_v6.0.16_wkcpt.zip
    Note: You will need to use the python script to fix the paths of the SDK.
    Please share any feedback!

    Also, where can I find references for the above given iBeacon project?

    What exactly are you looking for? The ibeacon project is part of the SDK6 so the same APIs and functionalities are available. 
    Please refer on the UM-B-119. It has all the necessary documentation for the SDK6.

    Best Regards,
    OV_Renesas

  • Hey!

    I highly appreciate your reply!

    I went through your iBeacon project and understood that the spi_flash_power_down() function hinders the output (ie, current consumption), hence I configured my project according to yours by adding the SPI functionalities to the same.

    Now the device consumes current as expected!

    Also, I tried the same as yours ie, to use the function "app_button_enable" where the function "app_wakeup_cb" was defined to give a single blink and the function "app_button_press_cb" was defined with the sleep functionalities as below:

    The above resulted in not advertising through out and upon single blink for the first time did result in blinking the led once furthermore the device was set to sleep.

    I actually was looking for the below functionality to work: 

    I would want the device to wakeup to give a single blink (an led is connected to a pin) when a button connected is clicked.

    The device advertises in an interval of 1.3second and is set to extended sleep mode. The button can be clicked any moment during the process of either advertisement or the sleep mode. Hence I had used the below function that was mentioned in the "ble_app_sleepmode" project given in the SDK where the function "ext_wakeup_cb" was defined to blink the led once. This did work, resulting in waking up the device to give a single blink but doesn't go back to advertising along with the extended sleep mode instead continues to advertise in the interval specified ie, 1.3second

    How do I set the device back to advertising in the interval specified with the extended sleep mode?

    Warm regards,

    AXISCADES.

  • Hi Cades,

    Thank you for the reply.
    Glad you were able to get the current consumption you were looking for. 

    Regarding your scenario:
    I am a bit confused on what the exact scenario is. 
    From my understanding, you want to do the following:
    1)Non connectable advertising, with 1.3sec advertising interval
    2) When the user presses a button, the device stops advertising and a LED blinks momentarily (do you want a specific time for the LED to be turned on?).
    3) The DA14531 will stay in Extended Sleep mode (with BLE core OFF) until user presses the same button again.
    4) The DA14531 should wake-up and restart advertising (with 1.3 advertising interval) and the LED should be turned on momentarily.
    Have I misunderstood something?

    P.S.
    If you found any answer helpful, you can verify them. That will help the rest of the community members that face the same issue.

    Best Regards,
    OV_Renesas

  • Hey!

    I thank you for the reply!!

    This is what IAM expecting:

    1. As the device is powered on, it shall advertise (non connectable) with an interval of 1.3second with extended sleep mode.

    2. The above should continuously be taking place. 

    3. When the user clicks the button, the led should just blink once (just an on and go off, blink once; I need not want it to be turned on for a while).

    4. While the above takes place, it should not hinder/ alter the regular functionality ie, the advertisement in an interval of 1.3second with the extended sleep mode.

    5. The device should stop advertisement only when the power is not given.

    In conclusion, the device once powered on should keep advertising in an interval of 1.3second with extended sleep continuously (even when the user clicks the button) and when the user clicks a button connected to it, an led should just blink once (just an on and go off immediately). The process should continue until the device is not given power or is powered down.

    Warm regards,

    AXISCADES. 

  • Hi Cades,

    Thank you for the reply.

    1. As the device is powered on, it shall advertise (non connectable) with an interval of 1.3second with extended sleep mode.

    2. The above should continuously be taking place. 

    3. When the user clicks the button, the led should just blink once (just an on and go off, blink once; I need not want it to be turned on for a while).

    4. While the above takes place, it should not hinder/ alter the regular functionality ie, the advertisement in an interval of 1.3second with the extended sleep mode.

    5. The device should stop advertisement only when the power is not given.

    I modified the previously shared project in order to fit inside these requirements. 
    Please find attached the beacon_v6.0.16_wkcpt_v2.zip file which contains the project.
    I compiled the project, and I downloaded the firmware into the SPI Flash.
    On the Power Profiler I could see:

    The spikes are from the LED being turned on. For the LED I have added an app_easy_timer that will turn off the LED after 500ms

    If you want to change the time that the LED will be turned ON, you can change that:
     beacon_v6.0.16_wkcpt_v2.zip
    As mentioned before, I am working with DA14531MOD Daughterboard, SDK v6.0.16 and Dev Kit Pro.
    Whenever I press SW2 (P0_11) I can see the LED (P0_9) on the DA14531MOD Daughterboard turn ON and after 500ms it turns OFF. 

    Best Regards,
    OV_Renesas

  • Hey!

    I thank you for the code!!

    When tested with your logic as below, the extended sleep mode tends to work but the device gives a single blink either on it's own i.e., without clicking the switch or just when the user touches the switch, doesn't even gives a click just a touch on the surface of the switch (I didn't call the "app_button_enable" function in the callback as the "app_button_enable" function is called in a different timer callback I'm using that runs forever):

    Attempt1:

    I initially thought it's the hardware that was incorrect, but when tested with my code i.e., the one that I was previously using ("ble_app_peripheral" in integration with my application code) and it worked fine. The only issue that I was facing was the sleep mode being disabled upon single blink.

    Also, I had initially used the following (in the above code) where I had set the sleep mode to default sleep mode (which was defined as "ARCH_EXT_SLEEP_ON"). When the extended sleep mode didn't work, I set the sleep mode to default sleep mode yet again in the callback as below, yet the same issue retained (The blink function turns on and off the led for once with a delay of half a second):

    Attempt2:

    Another attempt I tried is as below where I set the sleep mode as you did in the code provided (as the sleep mode worked fine in the same) but at random time during the process of the functionality after a single blink, the device stops going to sleep, continues to advertise in the given interval. I tried testing it repeatedly but couldn't conclude on a scenario to be re-occurring, every time the device stops going back to sleep mode, it's a different case. Once the device stops getting back to sleep mode, even if the switch is clicked it just gives a blink but doesn't goes back to sleep mode and continues to advertise in the given interval:

    Attempt3:

    In conclusion, when tried your logic, the sleep mode works fine but the single blink is the issue (Attempt1).

    When tried my initial logic the single blink works fine but not the sleep mode (Attempt2)..

    When tried integrating your sleep mode functionalities to my code, it works fine until a random point where it stops working as said above (Attempt3).

    Is there anything that can be understood so I can resolve it? 

    Warm regards,

    AXISCADES.