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.

  • 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.

  • Hi Cades,

    Apologies for the delay.

    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):

    I am not able to recreate this issue with the project I shared on my previous answer.
    As stated, I worked with Dev Kit Pro and the DA14531MOD Daughterboard and I was able to see the LED turn ON for 500ms whenever I pressed the SW2 (P0_11).
    From my understanding you have a custom board, how have you implemented the Switch functionality?

    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? 

    It is really hard for me to understand what is going on in your project just from this small code snippets. 
    If possible, zip the projects and share them here so I could take a look.
    A small ReadMe file which will describe the high-level functionality of the project, the SDK version and the example you worked on would be appreciated.

    Best Regards,
    OV_Renesas

  • Hey!

    I thank you for the interest!!

    Can I get your mail ID to zip the project?

    Warm regards,

    AXISCADES.

  • Hi Cades,

    Thank you for the reply.
    Renesas provides two different options for support.
    1) Renesas Engineering Community which is public and has a knowlegdebase.
    2) Private (1 on 1) Support which is confidential
    Please refer on the link below:
    Dashboard | Renesas Customer Hub
    Click on 'Submit a Ticket' and fill the form. 
    Make sure you select "Wireless Connectivity" on the Group.
    Please add a link to this thread so we are able to identify the question.

    Best Regards,
    OV_Renesas

Reply
  • Hi Cades,

    Thank you for the reply.
    Renesas provides two different options for support.
    1) Renesas Engineering Community which is public and has a knowlegdebase.
    2) Private (1 on 1) Support which is confidential
    Please refer on the link below:
    Dashboard | Renesas Customer Hub
    Click on 'Submit a Ticket' and fill the form. 
    Make sure you select "Wireless Connectivity" on the Group.
    Please add a link to this thread so we are able to identify the question.

    Best Regards,
    OV_Renesas

Children