如何让设备长时间处于延长睡眠模式?

14 posts / 0 new
最后一篇文章
dhirajp15
离线
最后一次见到:2年1个月前
已加入:2016-06-08 15:26
如何让设备长时间处于延长睡眠模式?

嗨,对话,
我修改通过改变app_defaul ble_barebone应用t_sleep_mode=ARCH_EXT_SLEEP_ON to work in extended sleep mode .Configured an gpio for led indication.
我保留了一个LED指示灯,指示设备是处于活动模式还是睡眠模式编辑arch\u main.c,如下所示:

sleep_mode = rwip_power_down();
GPIO\ U设置激活(GPIO\ U CNXN\ U LED\ U端口、GPIO\ U CNXN\ U LED\ U引脚);
if ((sleep_mode == mode_ext_sleep) || (sleep_mode == mode_deep_sleep)) {
//power down the radio and whatever is allowed
GPIO_SetInactive(GPIO_CNXN_LED_PORT, GPIO_CNXN_LED_PIN);
进入睡眠(睡眠模式);

//wait for an interrupt to resume operation
WFI();
//恢复操作
arch_resume_from_sleep();
我观察到LED一直亮着。如何增加睡眠时间?

Keywords:
Device:
MT\u对话框
离线
最后一次见到:2 months 2 weeks ago
工作人员
已加入:2015-06-08 11:34
你好,dhirajp15,

你好,dhirajp15,

The 580 wakes up only if there is an upcomming BLE activity, if there is no BLE event it sleeps and waits in the WFI() for a BLE interrupt, by increasing the advertising intervals or the connection intervals (in case of a connection) the 580 is going to sleep until its time to transmit/receive. Also if you placed extra code there and you see the LED always on, most probably you dont ever sleep because most probably the app_default_sleep_mode in the user_config.h file has the value of ARCH_SLEEP_OFF which means no sleep, try setting it to ARCH_EXT_SLEEP_ON and you should see the LED blinking.

谢谢你的对话

dhirajp15
离线
最后一次见到:2年1个月前
已加入:2016-06-08 15:26
谢谢你的对话.I can see

谢谢你的对话。我可以通过增加广告延迟看到led闪烁。但万用表显示的平均电流如下:
无睡眠模式:4.7mA
延长睡眠模式:4.34mA
延长睡眠模式(增加广告延迟)=4.26mA
深度睡眠模式=读数与延长睡眠模式相同
我哪里出错了?

MT\u对话框
离线
最后一次见到:2 months 2 weeks ago
工作人员
已加入:2015-06-08 11:34
你好,dhirajp15,

你好,dhirajp15,

Have you set the variable that i ve mentioned in my previous post to ARCH_EXT_SLEEP_ON ? the example projects have the sleep feature off by default. Regarding the deep sleep mode the current that you will see is the same as in extended sleep, since for deep sleep its required to burn the OTP, in developement mode you will not see any changes in the current. Also please have a look at my answer on this threadhttp://support.dialog-semiconductor.com/expected-consumption-connected-s....

谢谢你的对话

dhirajp15
离线
最后一次见到:2年1个月前
已加入:2016-06-08 15:26
Hi MT_dialog,

Hi MT_dialog,
我在应用程序中使用DA14583模块,想设置深度睡眠配置,但在第15页的DA14583数据表中写着该设备不能进入深度睡眠。为什么会这样?

MT\u对话框
离线
最后一次见到:2 months 2 weeks ago
工作人员
已加入:2015-06-08 11:34
你好,dhirajp15,

你好,dhirajp15,

Please dont post a different question on an irrelevant thread, especially between posts since its difficult to track, please make create a new thread.

关于您的问题,583不支持深度睡眠,因为为了使用深度睡眠,您必须使用OTP(在深度睡眠中,580将在每个连接间隔中唤醒,并将OTP内容复制到SYSRAM,因为SYSRAM已关闭),583中的OTP已经用辅助引导加载器烧录了(或者您可以烧录高级引导加载器以获得附加功能)。OTP的辅助引导加载程序将打开SPI,583将从SPI引导。该过程耗时耗力,因此通过唤醒、复制过程和在每个连接间隔从SPI引导消除了深度睡眠的好处。

谢谢你的对话

dhirajp15
离线
最后一次见到:2年1个月前
已加入:2016-06-08 15:26
你好,我已经设置了

你好,我已经设置了variable ARCH_EXT_SLEEP_ON , still the consumption do not decrease.

MT\u对话框
离线
最后一次见到:2 months 2 weeks ago
工作人员
已加入:2015-06-08 11:34
你好,dhirajp15,

你好,dhirajp15,

当你将这个变量设置为这个值时,580应该在广告发布后自动进入休眠状态,现在在你的例子中,我猜你尝试使用keil进行调试,但是你没有停止这个过程
调试模式使设备无法在代码中进一步运行,它会一直阻塞,直到调试器被禁用,这就是为什么在长时间睡眠时看到的电流会稍微减少。除
that, do you have a pro kit in order to check with smart snippets if the device actually sleeps ? Also you can go in the default_app_on_db_init_complete() function and comment out the
EXECUTE_DEFAULT_OPERATION_VOID() define, try to measure again and check the power consumption (actually this will disable the advertising procedure and the device will go to sleep without doing anything-will not advertise). Additionally the device doesn't fall directly in sleep mode, for the first couple of seconds it remains fully active and then goes into sleep mode.

谢谢你的对话

dhirajp15
离线
最后一次见到:2年1个月前
已加入:2016-06-08 15:26
Thanks MT_Dialog, The decice

Thanks MT_Dialog, The decice consumes less current , it was the external proccessor which consumed more current.

Ok Now I want to use external wakeup in extended sleep mode.
I have done the following modifications in ble_app_barebone:
//in da1458x_config_advance.h
#define CFG_EXTERNAL_WAKEUP
//在拱门上
//在拱门内进入睡眠()
#if ((EXTERNAL_WAKEUP) && (!BLE_APP_PRESENT)) // external wake up, only in external processor designs
ext_wakeup_enable(UART2_RTS_PORT, UART2_RTS_PIN, 1);
//在拱门内从睡眠中恢复
#if ((EXTERNAL_WAKEUP) && (!BLE_APP_PRESENT)) // external wake up, only in external processor designs
ext_wakeup_enable(UART2_RTS_PORT,UART2_RTS_PIN, 1);
// Disable external wakeup interrupt
//ext_wakeup_disable();
what i observe is the device gets connected to the app but do not accept commands from UART( co processor).
when sleep mode =ARCH_SLEEP_OFF, UART communication works properly
我还应该在代码中修改什么?

MT\u对话框
离线
最后一次见到:2 months 2 weeks ago
工作人员
已加入:2015-06-08 11:34
Hi dhirajp.

Hi dhirajp.

Please have a look at the AN-B-026 this will give you an idea in how you should transfer data via UART when operating over an external processor and waking up the 580 properly in order to receive data.

谢谢你的对话

dhirajp15
离线
最后一次见到:2年1个月前
已加入:2016-06-08 15:26
All the changes mentioned in

All the changes mentioned in the AN-B-026 are already done be me

MT\u对话框
离线
最后一次见到:2 months 2 weeks ago
工作人员
已加入:2015-06-08 11:34
你好,dhirajp15,

你好,dhirajp15,

Since when you are awake you can properly receive data from the UART and when sleeping you cant, means that after you toggle the gpio you immidiatelly send data from the UART of your external processor, but the 580 isn't awake yet. If you check the AN-B-026 in "Waking up the 580 using any gpio" it mentions that in order to transfer data over UART the usage of flow control is mandatory and that you will have to wait until the 580 asserts or de-asserts the flow control signal in order to start sending data from the external MCU.

谢谢你的对话

dhirajp15
离线
最后一次见到:2年1个月前
已加入:2016-06-08 15:26
嗨,MT\u dialog,

嗨,MT\u dialog,
协处理器仅在CTS变低时发送数据。我观察到的是,当我使用EXT\u WAKEUP或不使用EXT\u WAKEUP触发设备时,只需设置ARCH\u EXT\u SLLEP\u,电流消耗增加,这意味着它从睡眠中醒来,但不接受来自协处理器的数据。我们需要在从睡眠中醒来后再次初始化外围设备吗?
非常感谢。

MT\u对话框
离线
最后一次见到:2 months 2 weeks ago
工作人员
已加入:2015-06-08 11:34
你好,dhirajp15,

你好,dhirajp15,

当580从LP处理程序唤醒时,外围设备被初始化,在SLP中,gtl或hci接口被初始化以设置流控制,因此不需要再次初始化外围设备,如果定义外部唤醒或不定义外部唤醒,您会看到一些电流消耗,也许这意味着你的引脚配置有问题。如果没有外部唤醒定义,则没有唤醒计时器的设置,因此没有唤醒,您看到的电流可以是任何东西,可能是漏电或580唤醒以外的其他东西。如果您有一个dev pro工具包,您可以使用智能代码段来检查580是否唤醒,方法是在外围设备初始化后的LP函数之后放置一个arch\u set\u pxact\u gpio()。

另外,我假设您对完全嵌入式设计感兴趣(这意味着580中没有应用程序代码),对吗?通过gtl和580通讯?我刚刚注意到在上面的修改中,您已经声明唤醒引脚应该是UART2\u RTS,在唤醒处理程序中,您需要放置一个配置为输入的引脚,这样当您切换MCU的RTS时,580的CTS(即设置为唤醒引脚)580将启动唤醒过程,当唤醒程序完成时,MCU的580/CTS的RTS将变低,即您可以开始发送数据。我也不明白为什么当你从睡眠中恢复的时候会出现唤醒中断。

谢谢你的对话