[riot-notifications] [RIOT] Kinetis: hwtimer refactor (#3146)

Joakim Gebart notifications at github.com
Tue Jun 2 19:36:37 CEST 2015


This PR reduces the number of lost ticks in the Kinetis hwtimer, see #3139 
The number of lost ticks is reduced to 14 in a 900 second test run of tests/vtimer_msg, that corresponds to a timer error of less than 0.5 ┬Ás / sec. Lost ticks are not good, but at least at this rate the hwtimer_now clock is actually usable.

Note: these lost ticks that this PR is trying to reduce are purely in software, it does not matter if the RTC crystal is slow/fast or otherwise bad, as both  LPTMR and RTT was running off the same crystal source during the test and should therefore count up at the same time.

 - Use hwtimer_set for hwtimer_set_absolute()
 - Collect hwtimer statistics with #if ENABLE_STATS
 - Assembler optimized functions for CNR handling
 - Correct another off-by-1, after counter reset in hwtimer_set
 - Defer CMR update from hwtimer_unset until ISR fires
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/3146

-- Commit Summary --

  * kinetis: hwtimer refactor/rewrite

-- File Changes --

    M cpu/kinetis_common/hwtimer_arch.c (242)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/3146.patch
https://github.com/RIOT-OS/RIOT/pull/3146.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3146
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150602/eb10aa19/attachment.html>


More information about the notifications mailing list