不能输入深度睡眠模式

嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程https://www.dialog-seminile.com/support.。我们将在未来几天修复错误/优化搜索和标记。
4个帖子/ 0新
最后一篇
rexdevelopment.
离线
最后一次露面:2 years 11 months ago
加入:2016-07-25 19:14
不能输入深度睡眠模式

嗨对话框,

1.我使用“app_easy_gap_undirected_advertise_with_timeout_start(uint16_t delay, void (*timeout_callback)(void))' to do Advertising, then close it after 10 seconds (delay is 10s), and I add a 'arch_set_sleep_mode(ARCH_DEEP_SLEEP_ON)' in 'static void app_easy_gap_advertise_stop_handler(void)' to make DA14580 go to deep sleep, but it does not enter deep sleep. Are there other processes or functions that I need to close before DA14580 can go to deep sleep?

以下是我固件的代码:
void app_easy_gap_undirected_advertise_with_timeout_start(uint16_t delay, void (*timeout_callback)(void))
{

//停止当前运行的计时器
if(adv_timer_id!= easy_timer_invalid_timer)
app_easy_timer_cancel(avd_timer_id);
if(timeout_callback!= null)
adv_timeout_callback = timeout_callback;

avad_timer_id = app_easy_timer(delay,app_easy_gap_advertise_stop_handler);
app_easy_gap_undirected_advertise_start();

}

static void app_easy_gap_advertise_stop_handler(void)
{
app_easy_gap_advertise_with_timeout_stop();

app_easy_gap_advertise_stop();

adv_timer_id = app_easy_timer(sleep_timeout,app_timeout_callback);

ARCH_SET_SLEEP_MODE(ARCH_DEEP_SLEEP_ON);
}

2.如果我将'app_easy_gap_undircted_advertise_start()'更改为'app_easy_gap_non_connectable_advertise_start()',则DA14580可以成功输入深度睡眠模式。是否不同的广告类型定义可以遵循的睡眠或空闲模式?

3. I find this section of code keeps DA14580 in idle mode. How can I know which KERNEL EVENTS are still on going (preventing deep sleep mode)?

rwip.c (Line323)
/ ************************************************************************
**************检查内核活动**************
************************************************************************ /
//检查某些内核处理是否正在进行中
如果(!KE_SLEEP_CHECK())
break;

//可以启用处理器睡眠
proc_sleep = mode_idle;

dbg_swdiag(睡眠,algo,1);

4.如果我知道哪个事件仍在继续,我可以直接终止内核事件进入深度睡眠模式吗?

5. Can I force deep sleep mode even if I cannot identify or terminate the Kernel Events?

SDK5.0.3

Thanks

Keywords:
Device:
mt_dialog.
离线
最后一次露面:2天前1周
职员
加入:2015-06-08 11:34
Hi RexDevelopment,

Hi RexDevelopment,

除了将App_default_sleep_mode更改为Arch_Deep_sleep_On和Off Course还是更改内存配置也没有其他进程或更改它所需的,以便设置FW以便深入睡眠。你怎么知道该设备无法深入睡眠,通过功耗检查它?你看到设备在广告上继续?另请注意,为了获得适当的功耗和测试深度睡眠模式,您必须使用#undefine CFG_Development_Debug并将图像中的图像烧毁,并与彩色应用程序标志一起烧毁OTP中的图像。雷竞技安卓下载关于代码,app_easy_gap_undirected_advertise_with_timeout_start()将启动广告并设置计时器以完成广告过程,何时发生计时器,当时会发生App_easy_gap_advertise_stop_handler()以便停止广告并触发用户可能附加的回调。我没有得到你想在修改的app_easy_gap_advertise_stop_handler()中要做的事情,但是你再次在甚至停止前一个之前再次调用广告功能,并且您设置了计时器以便在指定时间唤醒。您可以尝试的是在app_easy_gap_undirected_advertise_with_timeOut_start()中的一个unull函数作为回调,通过一个将设置一个计时器的函数,该函数将计算下一个唤醒并将发起广告,如下所示:

void set_the_timer(void)
{
app_easy_timer(1000, default_advertise_operation);
}

app_easy_gap_undirected_advertise_with_timeout_start(user_default_hnd_conf.advertise_period,set_the_timer);

There is no BLE event that will not allow you to go to sleep, the device will wake up and sleep depending on BLE events that it has available, for example sleep wakeup and advertise go back to sleep, there is no event that will keep the device awake for long unless there are multiple events that the device needs to serve and sleeping is out of the question. The cancelling of the sleep mode can be done only from the application side. The device will have to serve the events available and then go to sleep. I ve tried to replicate your code and in the app_easy_timer() that you set in the app_easy_gap_advertise_stop_handler() the device stalls by a timer assertion.

Also regarding your implementation you can also have a look at the ble_app_sleepmode and change wake up button with a kernel timer in order to implement this.

谢谢mt_dialog.

rexdevelopment.
离线
最后一次露面:2 years 11 months ago
加入:2016-07-25 19:14
Hi MT_dialog,

Hi MT_dialog,

Thanks for your reply. I use VAM (current meter) to measure the current consumption. When DA14580 enters deep sleep mode, we read ~10uA from VAM. If DA14580 does not enter sleep, we read ~550uA from VAM. we also use mobile phone to check whether DA14580 is advertising.

在我们的固件中,我们的循环需要从 - AredFortise - >深睡眠 - >信标 - >深睡眠。

For our application, we have to make DA14580 do a cycle 'app_easy_gap_undirected_advertise_start()', sleep mode and 'app_easy_gap_non_connectable_advertise_start()', so I can not base my firmware on reference design architecture.
1.)我可以使da14580进入深度睡眠模式吗?
2.)只要确认,DA14580只能进入“深度睡眠模式”如果图像被刻录为“OTP”?我目前在我们的光线上使用闪存,并且在睡眠/唤醒周期的部分时,电流达到10ua。我还观察到EVB上的10UA,具有相同的固件。我错过了什么?

谢谢,
亚历克斯

mt_dialog.
离线
最后一次露面:2天前1周
职员
加入:2015-06-08 11:34
Hi RexDevelopment,

Hi RexDevelopment,

1)没有额外的方法可以将设备放入深度睡眠中,即我已经提到了。根据默认睡眠模式的设备将照顾睡眠并唤醒。10UA对于深度睡眠模式是相当多的一些,也许额外的电流来自您在自定义PCB上或在Dev套件上连接的另一个模块。由于我可以看到您的电路板上有闪光灯,可能额外的电流来自闪光灯。

2)是的,测试深度睡眠模式的唯一方法是刻录OTP并不要忘记拒绝CFG_Development_Debug,因为您没有设备不会强大的Sysram,它会像你一样延长睡眠。

谢谢mt_dialog.