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

Koen Zandberg noreply at github.com
Thu Apr 23 18:42:20 CEST 2020


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: d8c129fc476f63822ce6ae430298482631adcc9e
      https://github.com/RIOT-OS/RIOT/commit/d8c129fc476f63822ce6ae430298482631adcc9e
  Author: Kaspar Schleiser <kaspar at schleiser.de>
  Date:   2020-04-23 (Thu, 23 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.


  Commit: 5e5ed8233d03c52c18cd3b693eaf476a8b930684
      https://github.com/RIOT-OS/RIOT/commit/5e5ed8233d03c52c18cd3b693eaf476a8b930684
  Author: Koen Zandberg <koen at bergzand.net>
  Date:   2020-04-23 (Thu, 23 Apr 2020)

  Changed paths:
    M sys/ztimer/periph_rtt.c

  Log Message:
  -----------
  Merge pull request #13922 from kaspar030/ztimer_rtt_maxval_fix

ztimer: periph_rtt: ensure RTT_MAX_VALUE is honored


Compare: https://github.com/RIOT-OS/RIOT/compare/341916cd307b...5e5ed8233d03


More information about the commits mailing list