嗨对话框,
我修改ble_barebone美联社p by changing app_default_sleep_mode=ARCH_EXT_SLEEP_ON to work in extended sleep mode .Configured an gpio for led indication.
我已经保留了一个导致指示设备是否处于活动模式或睡眠模式,如下所示,编辑ARCH_MAIN.c
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)) {
//power down the radio and whatever is allowed
GPIO_SetInactive(GPIO_CNXN_LED_PORT, GPIO_CNXN_LED_PIN);
Arch_Goto_Sleep(Sleep_Mode);
//wait for an interrupt to resume operation
WFI();
//恢复操作
arch_resume_from_sleep();
我始终观察LED停留。如何增加睡眠期?
Keywords:
Device:
嗨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.
谢谢mt_dialog.
谢谢mt_dialog。通过增加广告延迟,我可以看到LED轻弹。但万用表所示的平均电流如下:
没有睡眠模式:4.7ma
扩展睡眠模式:4.34ma
扩展睡眠模式(增加广告延迟)= 4.26mA
具有深度睡眠模式=读数与扩展睡眠模式相同
我在哪里出错?
嗨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-seminiondionder.com/expected-consumption-connected ...。
谢谢mt_dialog.
Hi MT_dialog,
我在我的应用程序中使用DA14583模块,并希望在页面NO上的DA14583的数据表中设置Deep Sleep Configuration.But。15写的是,这个设备无法深入睡眠。为什么这么做?
嗨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.
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.
谢谢mt_dialog.
嗨mt_dialog,我已经设置了variable ARCH_EXT_SLEEP_ON , still the consumption do not decrease.
嗨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.
谢谢mt_dialog.
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
//在Arch_Main.c.中
// arch_goto_sleep()内
#if ((EXTERNAL_WAKEUP) && (!BLE_APP_PRESENT)) // external wake up, only in external processor designs
ext_wakeup_enable(UART2_RTS_PORT, UART2_RTS_PIN, 1);
// arch_resume_from_sleep内
#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
我还应该在代码内修改什么?
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.
谢谢mt_dialog.
All the changes mentioned in the AN-B-026 are already done be me
嗨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.
谢谢mt_dialog.
嗨mt_dialog,
CO Proccessor仅在CTS变为低时发送数据。并且我观察到的是,当我使用ext_wakeup或ext_wakeup触发设备时,只需设置arch_ext_sllep_on时,当前的消耗增加它会增加它从睡眠中唤醒,但它不接受来自coproccessor的数据。我们需要在醒来后再次初始化外围设备从睡觉?
谢谢你。
嗨Dhirajp15,
当580从LP处理程序中唤醒580并在SLP中唤醒GTL或HCI接口时初始化外设才能初始化,以便设置流量控制,因此不需要再次初始化外围设备,因此您看到的事实如果您定义外部唤醒,或者您没有,则可能意味着您的引脚配置有问题。如果没有外部唤醒定义,没有唤醒定时器的设置,因此没有唤醒,你看到的目前可以是任何东西,也许泄漏或其他东西比580醒来。如果您有Dev Pro套件,则可以使用Smart Spippets来检查580是否通过在外围设备初始化之后置于LP函数后的ARCH_SET_PXACT_GPIO()来检查580。
我也假设您对完全嵌入的设计感兴趣(意味着580中没有应用程序代码)是对的吗?并通过580沟通GTL?我刚刚注意到在上面的POST修改中,你声明了唤醒引脚应该是UART2_RTS,在唤醒处理程序中,您需要将配置作为输入的引脚放置,使得当您切换MCU的RTS 580的CTS时(将设置为唤醒引脚)580将启动醒来的过程,当醒来的过程完成时,MCU的580 / CTS的RTS将会较低,您可以启动发送数据。此外,当您从睡眠中恢复时,我也没有看到启用中断的原因。
谢谢mt_dialog.