Hi dialog,
我通过更改app_default_sleep_mode = arch_ext_sleep_on来修改ble_barebone应用程序,以在扩展睡眠模式下工作。配置LED指示的GPIO。
I have kept an LED to indicate whether the device is in active mode or sleep mode editing the arch_main.c as follow:
sleep_mode = rwip_power_down();
GPIO_SetActive(GPIO_CNXN_LED_PORT, GPIO_CNXN_LED_PIN);
if((sleep_mode == mode_ext_sleep)||(sleep_mode == mode_deep_sleep)){
//关闭收音机,无论允许的信息
gpio_setinactive(gpio_cnxn_lex_port,gpio_cnxn_led_pin);
arch_goto_sleep(sleep_mode);
//等待中断恢复操作
WFI();
//resume operation
ARCH_RESUME_FROM_SLEEP();
I observe the LED stays on always. how to increase the sleep period?
设备:
Hi dhirajp15,
只有在有较越来的BLE活动时,580才会醒来,如果没有BLE事件,它睡眠并在WFI()中等待BLE中断,通过增加广告间隔或连接间隔(在连接情况下)580将睡觉直到它传输/接收的时间。此外,如果您在那里放置额外的代码,并且您看到LED始终打开,大多数可能睡觉,因为大多数可能是user_config.h文件中的app_default_sleep_mode有arch_sleep_off的值,这意味着没有睡眠,尝试将它设置为arch_ext_sleep_on,您应该看到LED闪烁。
Thanks MT_dialog
谢谢MT_dialog。我可以看到flicki领导ng by increasing the advertising delay. But the average current shown by the multimeter is as follows:
without sleep mode: 4.7mA
with extended sleep mode: 4.34mA
with extended sleep mode (increasing advertising delay)=4.26mA
with deep sleep mode=readings are same as extended sleep mode
Where am I going wrong?
Hi dhirajp15,
您是否设置了我以前发布到Arch_ext_sleep_on的变量?默认情况下,示例项目将休眠功能关闭。关于深度睡眠模式,您将看到的当前与延长睡眠中的当前相同,因为深入睡眠,所以在开发模式下,您不会看到当前的任何更改。另请看看我对此线程的答案http://support.dialog-semiconductor.com/expected-consumption-connected-s....
Thanks MT_dialog
嗨mt_dialog,
I am using DA14583 module in my application and want to setup deep sleep configuration.But in the datasheet of DA14583 on page no. 15 it is written that this device can not go to deep sleep. Why is it so?
Hi dhirajp15,
请不要在不相关的线程上发布不同的问题,特别是在岗位之间难以跟踪,请创建一个新的线程。
Regarding your question the 583 doesn’t support deep sleep because in order to use deep sleep you will have to use the OTP (in deep sleep the 580 will wake up in every connection interval and copy the OTP content to the SYSRAM, since the SYSRAM is switched off), the OTP in the 583 is already burned with the secondary bootloader (or you can burn the advanced bootloader for additional functionality). The secondary bootloader to the OTP will switch on the SPI and the 583 will boot from the SPI.The process is time and energy consuming so the benefit of deep sleep is eliminated by the wakeup, the copying procedure and the booting from the SPI in every connection interval.
Thanks MT_dialog
嗨mt_dialog,我设置了变量arch_ext_sleep_on,仍然不会减少消费。
Hi dhirajp15,
When you set that variable to that value, the 580 should automatically go into sleep after advertising, now in your case i guess that you try to debug using keil and you dont stop the
debug mode so the device can't go any further in the code, it stucks until the debugger is disabled so thats why you see a slightly less current when you are in extended sleep. Other than
那个,如果设备实际睡眠,您是否有专业套件,以便检查智能片段吗?您还可以进入Default_App_On_db_init_complete()函数并注释出来
Execute_default_operation_void()定义,尝试再次测量并检查功耗(实际上这将禁用广告过程,并且设备将在不做任何事情的情况下睡觉 - 不会宣传)。此外,该设备不会直接陷入睡眠模式,对于前几秒钟,它保持完全有效,然后进入睡眠模式。
Thanks MT_dialog
谢谢mt_dialog,decetice消耗了更少的电流,它是外部proccessor,它消耗了更多的电流。
好的,现在我想在扩展睡眠模式下使用外部唤醒。
我在ble_app_barebone中完成了以下修改:
//在da1458x_config_advance.h.中
#define cfg_external_wakeup.
//in arch_main.c
//inside the arch_goto_sleep()
#if((hyperent_wakeup)&&(!ble_app_present))//外部唤醒,只在外部处理器设计中
ext_wakeup_enable(uart2_rts_port,uart2_rts_pin,1);
//inside the arch_resume_from_sleep
#if((hyperent_wakeup)&&(!ble_app_present))//外部唤醒,只在外部处理器设计中
ext_wakeup_enable(uart2_rts_port,uart2_rts_pin,1);
//禁用外部唤醒中断
//ext_wakeup_disable();
我观察到的是设备已连接到应用程序,但不接受来自UART(CO处理器)的命令。
当睡眠模式= ARCH_SLEEP_OFF时,UART通信正常工作
what else should i modify inside the code?
嗨dhirajp。
请看看AN-B-026这将在通过外部处理器运行并正确唤醒580以便接收数据时,为您提供一个想法,在您应该如何通过UART传输数据。
Thanks MT_dialog
AN-B-026中提到的所有更改都已完成为我
Hi dhirajp15,
由于当您醒来时,您可以从UART妥善接收数据,并且在您无法睡觉时会接收数据,意味着在切换GPIO后,您可以从外部处理器的UART中发送数据,但580尚未清醒。如果您检查AN-B-026“使用任何GPIO唤醒580”,它提到,为了通过UART传输数据,流量控制的使用是强制性的,并且您将不得不等到580断言或脱节断言流量控制信号,以便从外部MCU开始发送数据。
Thanks MT_dialog
HI MT_dialog,
the co proccessor is sending the data only when the CTS turns low. And the What I observe is that when I trigger the device Using EXT_WAKEUP or without using EXT_WAKEUP just setting ARCH_EXT_SLLEP_ON the current consumption increases meaning it wakes up from sleep but it doesnt accept data coming from Coproccessor.Do we need to initialize the peripherals again after waking up from sleep?
Thank you.
Hi dhirajp15,
The peripherals are initialized when the 580 wakes up from the LP Handler and in the SLP the gtl or the hci interface is initialized in order to set the flow control on, so there is no need to initialize the peripherals again, the fact that you see some current consumption either if you define the external wake up, or you dont, perhaps it means that something is wrong with the configuration of your pins. If there is no external wakeup definition there is no setting of the wakeup timer, therefore there is no wake up, the current that you see can be anything, perhaps a leakage or something else than the 580 waking up. If you have a dev pro kit, you can use smart snippets in order to check if the 580 wakes up, by placing an arch_set_pxact_gpio() after the LP function after the peripherals initialization.
Also i assume that you are interested in a fully embedded design (meaning that there is no application code in the 580) is that right ? and communicate over gtl with the 580 ? I just noticed in the modification at the post above, you ve declared that the wake up pin should be UART2_RTS, in the wake up handler you need to place a pin configured as INPUT so that when you toggle the MCU's RTS the CTS of the 580 (that is set as the wakeup pin) the 580 will start the waking up procedure, when the waking up procedure is done the RTS of the 580 / CTS of the MCU will go low and that is were you can start send data. Also i dont see the reason for enabling the waking up interrupt when you resume from sleep.
Thanks MT_dialog