⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support。We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
alan.a
Offline
Last seen:2 years 4 months ago
加入:2018-10-31 07:50
Related to kernel timer

Hii......
i have some doubts in kernel timer
1.如果我尝试使用此内核计时器实现挂墙时钟,24小时内发生多少时间漂移?
2.你能提供一个例子或吗document how to use this kernel timer (setting,handling. etc...)?
3.在我的申请中,我希望每6小时的距离中的距离。我想如果我使用这个内核计时器(最大延迟5分钟)并在5分钟内唤醒
to track this 6 hours(for next beaconing). is it possible to implement this?
4.如果内核定时器在5分钟内触发,则会发生电流消耗多少(每5个都没有广告或扫描才会发生火灾
minute and back to sleep)( i think better start from ble_app_ barebone example for implementing this functionality)?

Keywords:
Device:
PM_Dialog
Offline
Last seen:58 min 57 sec ago
Staff
加入:2018-02-08 11:03
Hi alan.a,

Hi alan.a,

You can set a timer up to KE_TIMER_DELAY_MAX (5 sec), if you set a value above that limit the stack will make the sanity checks and you will get an error. In your case I would suggest you use a timer with the maximum delay and restart the time until you reach your desired time. But this will be a little bit inaccurate, because the app_easy_timer counts low power clocks. The app_timer_set() is a wrapper of ke_timer_set(). Timer ID, task ID and timeout in units of 10 ms. The maximum valid timeout is 30000, which corresponds to a 5 min period. I would highly suggest you have a look at app_easy_timer.h header file. Also, when using kernel timers, the maximum time that they can count is also KE_TIMER_DELAY_MAX meaning up to approximately 5 minutes. Regarding the documentations, I would suggesyou to read theUM-B-050 : DA1458x Software Developers Guide (SDK5)and theUM-B-051 : DA14580 Software Platform Reference (SDK5)user manulas from our support portal. When the device is not in extended or deep sleep mode and without any ble activity i can measure about 0.490 mA, but the power consuyption depends on your application and what you want to implement the timer.

Thanks, PM_Dialog

alan.a
Offline
Last seen:2 years 4 months ago
加入:2018-10-31 07:50
Hii...

Hii...
Thanks for your reply.
I understand from above :- kernal timer is accurate than General timer is it right?
if i implemented a RTC clock using this kernel timer how much drift in 24 hours?
In my application i need only advertise once in 6 hours ie, in one day 4 times only i advertising remaining time no activity occurs so i want to reduce current. RTC clock here i used for track 6 hours. i think if i create a kernel timer firing of maximum delay ie approximately 5 minutes, in every 5 minutes timer fire and wake up from sleep and update variable(tracks RTC time) and go back to sleep(extended sleep)
I think deep sleep is not possible for this application is it right?.

PM_Dialog
Offline
Last seen:58 min 57 sec ago
Staff
加入:2018-02-08 11:03
Hi alan.a,

Hi alan.a,

DA14580不支持RTC实现。内核定时器和App_easy_Timer都具有最大延迟,最多可达5秒。。我不确定你想要实施什么,能否澄清它?您是否意识到深度睡眠功能?如果没有,请告诉我。

Thanks, PM_Dialog

alan.a
Offline
Last seen:2 years 4 months ago
加入:2018-10-31 07:50
hii...

hii...
yaa i need to implement deep sleep because i want to reduce current consumption and also i want to track hours. if no activity occurs Da14580 goes to sleep but hours must track.
我的申请工作基于小时。例如,每6小时间隔BLE信标出现并返回深度睡眠(即,第一个信标在下午8点发生在8.00下午14.00 PM)之间,在此信标不发生任何活动之间,所以我希望DA14580进入深度睡眠以节省电流和计时器需要追踪下一个信标的时间是我的应用程序

PM_Dialog
Offline
Last seen:58 min 57 sec ago
Staff
加入:2018-02-08 11:03
Hi alan.a,

Hi alan.a,

If I am able to understand correctly, would you to burn the OTP memory? In deep sleep mode, the 42KB on-chip system RAM and possibly part of 8KB on-chip retention RAM are switched off. When DA14580 wakes up, the OTP content must be copied to the on-chip RAM. Copying OTP is time consuming and power consuming. In extended sleep mode, data is stored in the on-ship RAM and is retained. When DA14580 wakes up, no OTP copying is required. Please check the “Which low power mode is more efficient for a user application?” from the FAQs page:

https://support.dialog-semiconductor.com/guide/faq-da1458x-power-consumption

Be aware that the OTP stands for One Time Programmable, thus you cant erase and re-write the OTP multiple times, but you can only flip the bits that are still set to 0 and turn them to 1. The ble_app_sleepmode implements the deep sleep mode but in development mode. Please check the CFG_DEVELOPMENT_DEBUG definition and the comments of the definition.

Thanks, PM_Dialog