Hi Dialog,
i have added Sample128 and Low Power Mode to my project basics on SDK_3.0.6,Sample128 functional,but Low Power Mode failed,and when i download my project ,Jlink always failed to identify target(it can download sometimes), if i download Sample128 without Low Power Mode Jlink functionnal.
i have done following steps to add Low Power Mode
1. i define CFG_DEEP_SLEEP in da15480_config.h and undefine
2. i comment and uncomment following code with add or comment app_disable_sleep();
#if (EXT_SLEEP_ENABLED)
app_set_extended_sleep();
#elif (DEEP_SLEEP_ENABLED)
app_set_deep_sleep();
#else
app_disable_sleep();
# endif
3. i add some code as below in app_adv_timer_handler ,i add a 3 min timer in app_adv_func,when timer expired, it would call app_adv_timer_handler,then BLE goto deep Sleep,but the current didn't drop(3ma),it seem DA didn't goto Sleep。if i download DA1458x_SDK_3.0.6\dk_apps\keil_projects\proximity\reporter_fh,the current did drop blew 100ua.
int app_adv_timer_handler(ke_msg_id_t const msgid,
void const *param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
{
GPIO_SetActive(GPIO_Power_Port,GPIO_Power_Pin);
app_adv_stop();
ke_timer_clear(APP_ADV_TIMER, TASK_APP);
app_set_deep_sleep();
ke_timer_clear(APP_ADV_TIMER, TASK_APP);
app_ble_ext_wakeup_on();
app_button_enable();
return (KE_MSG_CONSUMED);
}
Thank you for your help in advance.
1.i set a breakpoint in app_adv_stop,i found as long as it stop advertising,Whether to perform a sleep program,the current drop the same
2. if i erase spi flash,the current is the same as stop advertising