Hii......
i have some doubts in kernel timer
1. if i try to implement a wall clock using this kernel timer how much time drift occurs in 24 hours?
2.你能提供一个例子或吗document how to use this kernel timer (setting,handling. etc...)?
3. In my application i want BLE beaconing in every 6 hours gap . i think if i use this kernel timer(max delay 5 minutes) and wakeup on 5 minutes
to track this 6 hours(for next beaconing). is it possible to implement this?
4. if kernel timer fires in ever 5 minutes how much current consumption will occurs(there is no advertising or scanning just fires on every 5
minute and back to sleep)( i think better start from ble_app_ barebone example for implementing this functionality)?
Keywords:
Device:
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
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?.
Hi alan.a,
The DA14580 does not support RTC implementation. Both kernel timer and app_easy_timer have maximum delay and it is up to 5 sec. . I not really sure what you are trying to implement, can you please clarify it? Are you aware of the deep sleep functionality? If not, please let me know.
Thanks, PM_Dialog
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.
我的应用程序基于时间工作。例如each 6 hour intervel ble beacon occurs and back to deep sleep(ie, first beacon occurs at 8.00 Am next will happen 14.00 PM) between this beacons no activity occurs so i want the DA14580 goes to deep sleep for saving current and a timer need to track hours for next beaconing this is my application
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