what's the kernel timer accuracy?

4 posts / 0 new
Last post
toughworld
Offline
Last seen:3 years 3 months ago
加入:2015-05-12 09:55
what's the kernel timer accuracy?

I'm developping some nodes need to be synchronized in time.Node has to be in sleep to save power.I'm using kernel timer to wake up,so I have used the systick in wake periad to overcome time under 10ms,because app_timer_set accept time multiply 10ms.
I have read in a post that the kernel timer's accuracy is -20ms to 0 which is confusing me.Would someone explain the accuracy a bit more?When internal RCX20 clock is used in sleep ,is the accuracy affect?
Timer Accuracy is quite importante to my application.I hope the timer to wake up in 10*n ms accuratly .Thank you

Device:
MT_dialog
Offline
Last seen:2 months 5 days ago
工作人员
加入:2015-06-08 11:34
Hi toughworld,

Hi toughworld,

The timer's accurancy is 10ms, the inaccurancy of the of the kernel timer can be observed in two cases:

- when the timer is set by an asynchronous event(push button etc)and the timeout is t, the expiration of the timer can happen in range of t-10ms to t.

- a timer can expire one tick earlier (10ms) when another timer expires on this tick, meaning that suppose you have two timers one expires in 40ms and another in 110. Timer 40ms will exprire normally when the time elapses in the first two sequences but when its time for the second timer to elapse the first will elapse also in 30 ms.

Thanks MT_dialog

toughworld
Offline
Last seen:3 years 3 months ago
加入:2015-05-12 09:55
I got it,Thank you very much.

I got it,Thank you very much.
One more question,Does using external XTAL32 oscilator ,instead of internal RCX20 clock help improve kernel timer accuracy caused by crystal precision?For example , when the da run in a longtime ,mutiple da14580 may lose syc for crystal precision.

MT_dialog
Offline
Last seen:2 months 5 days ago
工作人员
加入:2015-06-08 11:34
Hi toughworld,

Hi toughworld,

No, you will not be able to improve the accurancy of the kernel timer even if you use the external XTAL32.

Thanks MT_dialog