12 posts / 0 new
Last post
mohit3112
Offline
Last seen:7 months 1 week ago
Expert
加入:2014-08-04 13:45
连接后睡眠

int一pp_connection_function i started a timer for 5 sec to enable extended sleep mode , but i saw the current consumption reduced from 500uA to 100uA, not to 2uA .
so is it possible to make da14850 sleep between connection intervals.

code
在app_connection_func.
//调用计时器
ke_timer_set(flip_main_timer,task_app,500);

// timer处理程序
int flip_main_timer_handler(ke_msg_id_t const msgid,
void const *param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
{
app_set_extended_sleep();
return (KE_MSG_CONSUMED);
}

this results in 100uA current , can i make this lower like 30 uA or 5uA
I am using SDK 3.0.8
谢谢
莫希特

JE_Dialog
Offline
Last seen:1 day 21 hours ago
工作人员
加入:2013-12-05 14:02
Hello Mohit, how are you

Hello Mohit, how are you measuring the current ? please note that if you are using the power profler in smart snippets (on expert / PRO board), the measurement circuit has a high offset current. From the examlpe below, you can see the device going into extended sleep after connection event, although the waveform doesn't go down to zero : this is offset in the measurement on the amplifier-ADC on the development board . To measure the uA level, you do need a high resolution DMM as described in AN-B-015.

BR JE_Dialog

mohit3112
Offline
Last seen:7 months 1 week ago
Expert
加入:2014-08-04 13:45
i am measuring current using

i am measuring current using a digital multimeter it shows average current. I am using PAN1740 usb dongle.

Here is the experiment i did:-

1. when device is advertising and after 5 sec i switch to ext sleep mode the current consumption is 5uA to 2uA.
// code in timer handler
app_adv_stop()
app_set_extended_sleep();

2. when device is connected and after 5 sec i switch to ext sleep mode thecurrent consumption is 100uA i know this cannot be offset current as i have achieved 5uA in case 1
//code in timer handler
app_set_extended_sleep();

my problem is that in connected state even after enabling sleep peripheral is communicating with the phone and not going to sleep mode

我不使用键盘项目,我修改了模板项目进行测试

谢谢
莫希特

JE_Dialog
Offline
Last seen:1 day 21 hours ago
工作人员
加入:2013-12-05 14:02
Hi Mohit, thanks : in

Hi Mohit, thanks : in connected state, what is the connection interval that is set by the phone ? you are measing average current...

考虑平均连接事件需要大约5uc ...如果您有一个单位的连接间隔,那么每秒都会在连接事件上消耗50uc(忽略少量睡眠能量):单独相当于在连接事件上相当于50ua。如果它是一个1秒的连接间隔,那么它会达到5ua的平均....

BR JE_Dialog

mohit3112
Offline
Last seen:7 months 1 week ago
Expert
加入:2014-08-04 13:45
currently my connection

currently my connection interval is around 45ms , but as central device decides the connection interval is it possible to get connection interval of 1 sec always .

Also for measuring the connection interval i am adding SysTick Timer code in BLE_EVENT_HANDLER in rwble.c file , is the the current place , or i have to place it somewhere else ?

JE_Dialog
Offline
Last seen:1 day 21 hours ago
工作人员
加入:2013-12-05 14:02
你好,Mohit, 45女士

你好,Mohit, 45女士connection internal, that would explain the 100uA average current.

A periperhal can request new connection paramaters to the master in connected state. This can be done using the gapc_param_update_cmd function. This is how a slave device on 14580 can request new connection parameters from the master so yes, you could request a longer connection interval.

The SYSTICK is implemented in the DA14580 as described in the Cortex M0 user guide, available from the ARM website.Registers are the same (0xE000E010-0xE000E01F).
Please be aware that when the DA14580 goes to sleep, the SYSTICK counter is stopped - so it is not suitable for measuring the connection interval.

BR JE_Dialog

mohit3112
Offline
Last seen:7 months 1 week ago
Expert
加入:2014-08-04 13:45
我需要一个精确的计时器

我需要一个精确的计时器来测量来自我们心率传感器的RR间隔。如你所说的,在睡眠模式下停止了Systick建议我另一个定时器(猜测Timer0也在睡眠模式下停止)

also i have one more doubt in sleep mode configuration , when i do app_set_extended_sleep() and app_ble_ext_wakeup_on() in advertising mode the current consumption is reduces to 5 uA and device will not advertise until it gets an external interrupt.

if i do ext app_set_extended_sleep() and app_ble_ext_wakeup_on() in connection state it means that it should wake up on ext interrupt only , but it also wakes up on interrupt given by BLE core, any explanation?

JE_Dialog
Offline
Last seen:1 day 21 hours ago
工作人员
加入:2013-12-05 14:02
你好莫希特,如何准确

你好莫希特,如何准确the timer function that you need ?

My understanding of the set-up in conenction state is different : it will wake up synchronously wiht the BLE core, as this is governed by the connection paramers as agered with central device.

BR JE_Dialog

mohit3112
Offline
Last seen:7 months 1 week ago
Expert
加入:2014-08-04 13:45
i need millisecond precise

i need millisecond precise timer, if possible microseconds , because unavailability of timer in sleep mode we are facing problem of precision loss in rr interval calculation. Is there a way to enable sleep mode with timer 0 is on , i have used lld_evt_time_get() sometimes it give zero and sometimes it give actual value , another possible solution is using ke_timer but it gives 10ms precision.

MT_dialog
Offline
Last seen:3 days 2 hours ago
工作人员
加入:2015-06-08 11:34
Hi mohit3112

Hi mohit3112

抱歉,当DA进入睡眠模式时,您无法使用芯片的HW定时器。唯一的方法是使用10ms ke_timer。

谢谢MT_dialog

jetliang
Offline
Last seen:2年6个月前
加入:2014-12-02 06:50
嗨,我想知道什么是什么

嗨,我想知道什么是什么funtion of "lld_sleep_enter(sleep_lp_cycles, rwip_env.ext_wakeup_enable)"?

MT_dialog
Offline
Last seen:3 days 2 hours ago
工作人员
加入:2015-06-08 11:34
Hi jetliang,

Hi jetliang,

这是指指示系统睡觉的fucntion,它得到的参数是sleep_duration - 在唤醒时醒来的循环和ext_wakeup是如果启用外部中断(意味着唤醒)一些外部中断)。

谢谢MT_dialog