Hello!
My device go to sleep after 8 sec if I connect 3V battery(CR2003 lithium).
But I can not understand how go to sleep with li-po accum 3.7V
#define dg_configBATTERY_TYPE (BATTERY_TYPE_CUSTOM)
#定义dg_configBATTERY_CHARGE_VOLTAGE 0 xA // 4.2V
#define dg_configBATTERY_TYPE_CUSTOM_ADC_VOLTAGE (3439)
#define dg_configPRECHARGING_THRESHOLD (2462) // 3.006V
#define dg_configCHARGING_THRESHOLD (2498) // 3.05V
#define dg_configBATTERY_CHARGE_CURRENT 9 // 210mA
#define dg_configBATTERY_PRECHARGE_CURRENT 20 // 2.1mA
#define dg_configBATTERY_CHARGE_NTC 1 // disabled
#define dg_configPRECHARGING_TIMEOUT (30 * 60 * 100) // N x 10msec
Keywords:
Device:
Hi Ruslan,
I am not sure i understand the question, if you have set the default sleep mode in pm_mode_extended_sleep using the pm_set_sleep_mode, then the device will stay allways on for 8 seconds in order to make sure that the XTAL32 is settled and then it will continue operating in sleep mode (sleeping and waking up depending on the BLE activity). This is default function of the SDK and isn't related to the battery.
Thanks MT_dialog
Yes, I have set the default sleep mode in pm_mode_extended_sleep using the pm_set_sleep_mode.
My device go to sleep after 8 sec if I connect 3v battery - that's what I need. In sleep mode device consumes current 1-2 uA. If I push wkup button, my device consumes 2 mA during 8 sec.
But my device do not go to sleep if I connect 3.7v accum. Why is this happening? With 3.7v accum, my device consumes 2-3mA all time.
Hi Ruslan,
There is no relation between the voltages that the device operates, and the ability for the device to go to sleep, i suppose that the device is a custom one. Do you have perhaps the USB connected ? since voltage on VBUS means that the device is charging and runs on the LDO's instead of the DCDC and its always active, this is the only assumption that i can make from what you are mentioning in order for a device to be forced and stay active. Tested on the pro dev kit with a 3.7V battery and couldn't see the device staying active. Are you able to replicate that via a dev kit or via an SDK example ? You should also consider the case where the extra power consumption that you observe with the 3.7V is a side-effect by something else and not that the device is not sleeping.
Thanks MT_dialog
When I test, I disconnect USB.
I connect laboratory power and play with voltage.
With 2.6V my device go to sleep.
With 2.7V and more my device do not go to sleep.
I think I write incorrect code with extended sleep.