Hi: I use prox_reporter for SDK 5.0.4,, when the system operates extended sleep mode.,I measured the current is 460uA, rather than 1.5uA, I used the internal LP_CLK_RCX20, I have to set where to drop the current.
你不需要设置anything else in order for your device to go into sleep mode, the current that you see could be either from the debugger that is still attached on the 580 (stop the debugging in order for module to stop drawing current), also could be that the device doesn't sleep (you haven't set the proper flag ARCH_EXT_SLEEP_OFF or your fw is keeping the device awake), the last reason that something like this could happen is if something else drawing power from your circuit and not the 580.
Hi MT_dialog: I use custom circuit boards, only one DA14580 and some of the external capacitors, so it will not be the current consumption of other circuits, in addition I through the JTAG simulation, is determined to enter the sleep mode.when i "undef CFG_DEVELOPMENT_DEBUG",it also can simulate.when i " SetBits16 (SYS_CTRL_REG, DEBUGGER_ENABLE, 0);"My system will to be crashes, how to properly stop the debugging in order for module?
What i mean is that while your code runs and the debugger from keil is attached the module will consume extra power, so in order to stop this from happening you will have to exit debugging mode from keil. Also the power consumption of the 580 is ~1.5uA when the device is sleeping, the proximity reporter sleeps and wakes up in order to advertise or keep a connection alive, you will be able to properly measure the lowest value of your power consumption when the device sleeps constantly if not i suppose that your instrument is averaging the current that the 580 consumes including the radio activities. Please also check the Tutorial 5: configuring sleep mode on DA1458x in order to see how to properly measure the power consumption.
I tried to define below in da1458x_config_basic.h in order to select deep sleep mode. Unfortunately, the power consumption is always ~500uA. What else I should do?
#undef CFG_EXT_SLEEP #define CFG_DEEP_SLEEP
I tried to follow up UM-B-006 DA14580 Sleep mode configuration v1.1 document, frankly speaking, this document is really hard to capture what is truly needed to enable sleep mode, should I modify main loop function? what else I should do to enable sleep mode beside the modification in da1458x_config_basic.h?
My current mail loop is just reuse sdk one, as below lines. Can you advice what else I should modify to enable 14580 sleep mode? Either deep sleep or extended sleep is ok for me.
int main_func(void) { sleep_mode_t sleep_mode; system_init(); while(1) { do { schedule_while_ble_on(); } while ((app_asynch_proc())); //grant control to the application, try to go to power down
if (((!BLE_APP_PRESENT) && (check_gtl_state())) || (BLE_APP_PRESENT)) { GLOBAL_INT_STOP();
app_asynch_sleep_proc();
sleep_mode = rwip_power_down();
if ((sleep_mode == mode_ext_sleep) || (sleep_mode == mode_deep_sleep)) { arch_goto_sleep(sleep_mode);
WFI();
arch_resume_from_sleep(); } else if (sleep_mode == mode_idle) { if (((!BLE_APP_PRESENT) && check_gtl_state()) || (BLE_APP_PRESENT)) { WFI(); } } GLOBAL_INT_START(); }
if (USE_WDOG) { wdg_reload(WATCHDOG_DEFAULT_PERIOD); } } }
You dont need to change anything in the main loop in order to have your device in deep sleep. To start with, the only thing you should do is to change (since you are using the SDK 5) in the user_config.h file the variable app_default_sleep_mode and leave everything else as is. Also in order to be able to measure the deep sleep current you need to burn you application in the OTP so the OTP mirroring and sysram shut down to execute.
The power measuring tutorial can be found in the Documents tab, in the tutorial section.
The same issue happened on my device,I use SDK 5.04 sleep_mode demo application,when system in deep sleep mode, the power comsumption is 370ua, when ADV, power comsumption is 410ua, I plug out JTAG connecter by the way,
My test board is DA14580 Development Kit Expert, There is no flash or jumper connected to the board ,hex file is directly load to RAM by JTAG
At first,I guess,the extra current consume because of CHIP DEBUG is not shutdown (download hex file by JTAG), so , I use another development board to test, Schematic diagram is attached,after download deep sleep demo application HEX file to the SPI flash,and turn off other circuit ,only supply power to main chip and spi flash ,the chip current is 160ua . I don't know why ...
The additional power that you get is too low to be caused by the attached debugger, perhaps this extra current that you get is caused by an additional module attached on your test board or somekind of leakage and not from the 580 itself.
I check several times, there is no additional module consume current, just 580 and spi flash . 我自己的PCBA已经在制作,我将再次测试to make sure that the extra current is caused by leakage or not when I got my own board.
Hi doman,
你不需要设置anything else in order for your device to go into sleep mode, the current that you see could be either from the debugger that is still attached on the 580 (stop the debugging in order for module to stop drawing current), also could be that the device doesn't sleep (you haven't set the proper flag ARCH_EXT_SLEEP_OFF or your fw is keeping the device awake), the last reason that something like this could happen is if something else drawing power from your circuit and not the 580.
Thanks MT_dialog
Hi MT_dialog:
I use custom circuit boards, only one DA14580 and some of the external capacitors, so it will not be the current consumption of other circuits, in addition I through the JTAG simulation, is determined to enter the sleep mode.when i "undef CFG_DEVELOPMENT_DEBUG",it also can simulate.when i " SetBits16 (SYS_CTRL_REG, DEBUGGER_ENABLE, 0);"My system will to be crashes, how to properly stop the debugging in order for module?
Thanks
Hi doman,
What i mean is that while your code runs and the debugger from keil is attached the module will consume extra power, so in order to stop this from happening you will have to exit debugging mode from keil. Also the power consumption of the 580 is ~1.5uA when the device is sleeping, the proximity reporter sleeps and wakes up in order to advertise or keep a connection alive, you will be able to properly measure the lowest value of your power consumption when the device sleeps constantly if not i suppose that your instrument is averaging the current that the 580 consumes including the radio activities. Please also check the Tutorial 5: configuring sleep mode on DA1458x in order to see how to properly measure the power consumption.
Thanks MT_dialog
Hi MT_dialog:
I've done it. Thanks.
Hi MT_dialog:
I tried to define below in da1458x_config_basic.h in order to select deep sleep mode. Unfortunately, the power consumption is always ~500uA. What else I should do?
#undef CFG_EXT_SLEEP
#define CFG_DEEP_SLEEP
I tried to follow up UM-B-006 DA14580 Sleep mode configuration v1.1 document, frankly speaking, this document is really hard to capture what is truly needed to enable sleep mode, should I modify main loop function? what else I should do to enable sleep mode beside the modification in da1458x_config_basic.h?
My current mail loop is just reuse sdk one, as below lines. Can you advice what else I should modify to enable 14580 sleep mode? Either deep sleep or extended sleep is ok for me.
int main_func(void)
{
sleep_mode_t sleep_mode;
system_init();
while(1)
{
do {
schedule_while_ble_on();
}
while ((app_asynch_proc())); //grant control to the application, try to go to power down
if (((!BLE_APP_PRESENT) && (check_gtl_state())) || (BLE_APP_PRESENT))
{
GLOBAL_INT_STOP();
app_asynch_sleep_proc();
sleep_mode = rwip_power_down();
if ((sleep_mode == mode_ext_sleep) || (sleep_mode == mode_deep_sleep))
{
arch_goto_sleep(sleep_mode);
WFI();
arch_resume_from_sleep();
}
else if (sleep_mode == mode_idle)
{
if (((!BLE_APP_PRESENT) && check_gtl_state()) || (BLE_APP_PRESENT))
{
WFI();
}
}
GLOBAL_INT_START();
}
if (USE_WDOG)
{
wdg_reload(WATCHDOG_DEFAULT_PERIOD);
}
}
}
By the way, where can I found your mentioned "Tutorial 5: configuring sleep mode on DA1458x"?
Hi smdzj007,
You dont need to change anything in the main loop in order to have your device in deep sleep. To start with, the only thing you should do is to change (since you are using the SDK 5) in the user_config.h file the variable app_default_sleep_mode and leave everything else as is. Also in order to be able to measure the deep sleep current you need to burn you application in the OTP so the OTP mirroring and sysram shut down to execute.
The power measuring tutorial can be found in the Documents tab, in the tutorial section.
Thanks MT_dialog
Hi Doman,
We are facing similar issue. The power consumption is ~370uA during extended sleep mode. How did you fix this?
Hi wisilica
The same issue happened on my device,I use SDK 5.04 sleep_mode demo application,when system in deep sleep mode, the power comsumption is 370ua, when ADV, power comsumption is 410ua, I plug out JTAG connecter by the way,
Hi kernel,
Do you have the flash connected or if not the flash do you have any other jumpers applied on the J5 header (perhaps the SPI_SUP jumper) ?
Thanks MT_dialog
Hi MT_dialog,
My test board is DA14580 Development Kit Expert, There is no flash or jumper connected to the board ,hex file is directly load to RAM by JTAG
At first,I guess,the extra current consume because of CHIP DEBUG is not shutdown (download hex file by JTAG), so , I use another development board to test, Schematic diagram is attached,after download deep sleep demo application HEX file to the SPI flash,and turn off other circuit ,only supply power to main chip and spi flash ,the chip current is 160ua .
I don't know why ...
Hi kernel,
The additional power that you get is too low to be caused by the attached debugger, perhaps this extra current that you get is caused by an additional module attached on your test board or somekind of leakage and not from the 580 itself.
Thanks MT_dialog
Hi MT_dialog,
I check several times, there is no additional module consume current, just 580 and spi flash .
我自己的PCBA已经在制作,我将再次测试to make sure that the extra current is caused by leakage or not when I got my own board.
Thanks
Hi Kernel,
how can I contact you? we have a local team to support Huami , we worked with Huami Hefei,Huami SZ , my mail :Jelphi.zhang@diasemi.com
Regards,
Jelph