Hello
I am using da14695 controller with WiRa sdk and social distancing tag example and it has timer and i2c peripherals in project.
By default sleep mode used by example is extended sleep mode.
But the active mode and extended sleep mode is both taking same amount of current. How to verify that the controller is gone into extended sleep mode. How much max current will take in that sleep mode.
Will hardware timer and i2c peripherals and its pins has to be deinitilized before putting into extended sleep mode.
Please mention procedure to put the controller into extended sleep mode and to verify it.
Thank you
Device:
Hi jagath52,
Please take a look at theDA1469x Power Consumption Tutorial. The purpose of this document is to describe the procedure of performing measurements of power consumption for the DA1469x family products.
Thanks, PM_Dialog
Hello sir
谢谢你的重播
I want to understand how the Extended sleep mode works and the plan is to use or put the device in extended sleep mode when ever i want.
In document the extended sleep mode is in between radio events. But i want to put the device into extended sleep mode at any time and it has to wake up from extended sleep mode at any time.
I am able to put the controller into extended sleep at any time but after wake up i need to know, after wake up from extended sleep mode from where the execution starts.
The assembly language function "deep_sleep" is used for both to put the controller in sleep and to wakeing from sleep but by default timer is used for intrrupt.
I want to use gpio for wakeup
Thank you
Jagath
Hi jagath52,
Please take a look at theDA1469x Tutorial External Interruptiontutorial from the DA1469x support page. The tutorial aims to demonstrate how to use the wake-up controller to handle a gpio interrupt and wake-up the system. The button_interrupt_cb() will be executed in handling mode.
Thanks, PM_Dialog
Hello PM_Dialog
I am referring the same tutorial for external interruption from exteneded sleep mode.
I am getting stuck after waking up from extended sleep mode.
During normal controller operation the sleep mode will be in active mode which is set in system_init() -- pm_sleep_mode_set(pm_mode_active)
Whenever required i want to change the sleep mode to "pm_mode_extended_sleep" using same api. In this case still advertisment is present.
So what i have done is whenever i want to switch to extended sleep mode i am suspending the sdt_ble_events_task(), stopping the advertisment then switching to exteneded sleep mode pm_sleep_mode_set(pm_mode_extended_sleep). Then in callback which is used to wakeup from extended sleep mode i have to resume the task and start the advertisement.
But after waking up from extended sleep mode if i call ble_gap_adv_start(GAP_CONN_MODE_UNDIRECTED) and OS_TASK_RESUME(handle) the system is hangng.
in sdt_ble_events_task() function i am enabling this block at any time so that controller goes to extended sleep mode
{
ble_gap_adv_stop();
pm_set_wakeup_mode(false);
pm_sleep_mode_set(pm_mode_exted_sleep);
pm_set_sys_wakeup_mode(pm_sys_wakeup_mode_slow)
OS_TASK_SUSPEND(OS_GET_CURRENT_TASK());
}
I am using wakeup from gpio
void button_interrupt_cb(void)
{
hw_wkup_reset_interrupt ();
pm_sleep_mode_set(pm_mode_active);
ble_gap_adv_data_set(sizeof(adv_data), adv_data, 0, NULL);
ble_gap_adv_start(GAP_CONN_MODE_UNDIRECTED);
OS_TASK_RESUME(handle);
}
Thank you
Jagath
Hi jagath52
>>>I am getting stuck after waking up from extended sleep mode.
Could you please clarify this statement?
Additionally, I understood that you are using the WiRa, so did you modified the code to stop advertising and put the device into sleep mode?
Can you please share a screenshot from the PowerProfiler? Please also probe the GPIO that you want to wake up to check if it has the correct voltage level.
Thanks, PM_Dialog