[riot-commits] [RIOT-OS/RIOT] cb7df8: ztimer: periph_rtt: ensure RTT_MAX_VALUE is honored

Koen Zandberg noreply at github.com
Fri Apr 24 09:42:06 CEST 2020


  Branch: refs/heads/2020.04-branch
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: cb7df87312f6be21d542d9a1fedf8b288a22d0e3
      https://github.com/RIOT-OS/RIOT/commit/cb7df87312f6be21d542d9a1fedf8b288a22d0e3
  Author: Kaspar Schleiser <kaspar at schleiser.de>
  Date:   2020-04-24 (Fri, 24 Apr 2020)

  Changed paths:
    M sys/ztimer/periph_rtt.c

  Log Message:
  -----------
  ztimer: periph_rtt: ensure RTT_MAX_VALUE is honored

Previously, ztimer would happily set an absolute RTT alarm value that exceeds
RTT's maximum value (though not a longer interval), as the `val` was
simply added to `rtt_get_counter()`.
This commit ensures that the target value wraps around RTT_MAX_VALUE.

Fixes #13920.

(cherry picked from commit d8c129fc476f63822ce6ae430298482631adcc9e)


  Commit: 4928dfa98252626461f4c9407e734ed5eb7f7d66
      https://github.com/RIOT-OS/RIOT/commit/4928dfa98252626461f4c9407e734ed5eb7f7d66
  Author: Koen Zandberg <koen at bergzand.net>
  Date:   2020-04-24 (Fri, 24 Apr 2020)

  Changed paths:
    M sys/ztimer/periph_rtt.c

  Log Message:
  -----------
  Merge pull request #13938 from leandrolanzieri/backport/2020.04/ztimer_rtt_maxval_fix

ztimer: periph_rtt: ensure RTT_MAX_VALUE is honored [backport 2020.04]


Compare: https://github.com/RIOT-OS/RIOT/compare/426ca6da48d9...4928dfa98252


More information about the commits mailing list