[riot-commits] [RIOT-OS/RIOT] fa3b91: kinetis: lptmr reload instead of spinning

benpicco noreply at github.com
Wed Sep 11 10:13:00 CEST 2019


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: fa3b9168a09c49f949f1321d51a2ca38e7158b0a
      https://github.com/RIOT-OS/RIOT/commit/fa3b9168a09c49f949f1321d51a2ca38e7158b0a
  Author: Joakim Nohlgård <joakim.nohlgard at eistec.se>
  Date:   2018-12-14 (Fri, 14 Dec 2018)

  Changed paths:
    M cpu/kinetis/periph/timer.c

  Log Message:
  -----------
  kinetis: lptmr reload instead of spinning

Spinning for the correct time has the side effect that it may cause
infinite recursion if the callback function calls timer_set.

timer_set->callback->...->timer_set->callback->...->timer_set-> infinity

In theory, the drawback is that the callback for very short timeouts
(<2 lptmr ticks) may be delayed up to 2 lptmr ticks (61 µs)

In practice however, tests performed using tests/bench_timers shows that
this change only affects the accuracy of the timer target when timer_set
is called with a timeout of 0, which results in a delay of 30 µs.


  Commit: b6fe0e25fe939c9411007dc277e42403d7b41284
      https://github.com/RIOT-OS/RIOT/commit/b6fe0e25fe939c9411007dc277e42403d7b41284
  Author: benpicco <benpicco at googlemail.com>
  Date:   2019-09-11 (Wed, 11 Sep 2019)

  Changed paths:
    M cpu/kinetis/periph/timer.c

  Log Message:
  -----------
  Merge pull request #10020 from gebart/pr/kinetis-lptmr-reload

kinetis: lptmr reload instead of spinning


Compare: https://github.com/RIOT-OS/RIOT/compare/6f63ef42a7e3...b6fe0e25fe93


More information about the commits mailing list