DA14580
Basic Development Kit
SDK 5.0.3
你好,对话 -
We're continuing development of a battery powered BLE device based on the ble_app_peripheral example. I've set up going into extended sleep and waking up the peripherals at 1 second intervals using an app_easy_timer callback to sample sensor data and store the ADC readings. When I wake up the peripherals, I do not wake up the BLE functions .... and do not want to to minimize battery power. After the sensor readings, I want to return to extended sleep until the next sensor read interval. This is all working functionally, but recent power profiling indicates that after the wake up to record samples I am not getting back into full extended sleep mode. I was hoping with extended sleep mode configured, this would occur out of the main loop, but this does not appear to be happening. I've put arch_ble_ext_wakeup_on() at the end of the sensor sampling routine, but it doesn't appear to be returning me to full extended sleep mode either.
I have tried executing this same code without waking up the peripherals and sampling sensor data and confirmed the extended sleep is achieved.
What do I need to do to get back to the low extended sleep mode power?
Thanks again, Max
Hi Max44,
如果没有BLE操作,580将自动下降睡眠,内核定时器需要BLE核心以唤醒,因此当计时器将在要触发的时间器时自动唤醒BLE核心,之后,您应该拍摄测量,580将恢复睡眠,并将关闭外围设备。580将经过主循环,以便执行计时器的处理程序,因为调度消息位于主循环中的函数。现在考虑到你的设备不睡觉,你确定这是这种情况吗?您是否在测量时调用ARCH_DISABLE_SLEEP()?您是否在Pro Board上使用电源分布器检查,以确保您的设备无法睡眠?
Thanks MT_dialog
MT,
Thanks for the info. We built a clone of the current to voltage conversion circuit to profile power since we had similar parts on hand. The baseline current we see when in known extended sleep mode is definitely much lower than what we're seeing between peripheral samples.
To give more detail on what I'm doing to test: The program initializes and begins normal BLE operation (same as the ble_app_peripheral example). Development debug and UART is configured off, extended sleep mode is configured on. I usually run the program by loading into RAM via Keil, the exiting the debugger. I have also run by booting from EEPROM. After a delay of 10 seconds, I invoke extended sleep and start a 1 second timer. In the one second timer callback, I power up the peripherals using the periph_init() functions. I do not call arch_disable_sleep(). I then run several ADC samples, storing the results in a RAM array. I accumulate a 256 byte page of EEPROM data before initiating an EEPROM page write. This will occur once every 64 seconds. At the end of the one second sample routine I release the EEPROM, return the pads to the power on state, restart the 1 second timer, call arch_ble_ext_wakeup_on(), then exit. This repeats endlessly looping through sections of the EEPROM to see how long the battery lasts.
So ..... I have a version of this program that just goes into extended sleep and then an endless loop without running the peripheral samples as above to verify extended sleep. Recall you provided advice to me on doing this after the BLE advertising completed and it works perfectly. The power profiler shows low current and we have measured this to be around 2 uA in our design.
运行通过ADC样本的程序的程序版本,一秒在1秒样本之间没有显示相同的低电流,就像在扩展睡眠模式下停止时一样。
I'm in the middle of bringing up a second test setup and will verify all of this. Meanwhile, let me know if you see anything I'm not doing quite right in the above.
Thanks, Max
Hi Max44,
据我所知,我看不到会导致睡眠模式取消的东西,是否可以附上电源分布式快照来检查当前的消耗吗?您是否确定您看到的功耗增加是580,而不是任何电源和消耗能量的其他组件?
Thanks MT_dialog
MT,
一个很好的观点。让我仔细看看ate of the external components and see if I can turn some things off to verify the additional power draw is or is not coming from there. We were expecting some additional current, but thought it would be minimal. I'll report back.
Regards, Max
MT,
You were right. I finally tracked the problem to configuring a GPIO output as a scope trigger in the ADC sample routine. The pin had an external pullup that was causing the GPIO to sink around 300uA when it was inactive, the default state. My fault, I'm ashamed to admit. :(
I value your review of the operation, however. It's good confirm we can expect to drop back into extended sleep mode after the periodic ADC samples, which I now see after correcting the offending GPIO. Everything is functioning well and we're in a phase of tuning power and measuring battery life.
Consider this resolved. Thanks again for the good support.
Max
Hi Max44,
Thanks for letting us know, glad i could help.
最好的问候mt_dialog.