Skip to content
Snippets Groups Projects

Add monotonic time

Merged Ferdinand Bachmann requested to merge yrlf/firmware:add-monotonic-time into master

This merge request adds a monotonic time function to epicardium and pycardium as discussed in #146 (closed).

The monotonic time is maintained by accumulating an offset to the RTC every time it is changed.

Epicardium APIs added:

  • API_RTC_GET_MONOTONIC_SECONDS, epic_rtc_get_monotonic_seconds()
  • API_RTC_GET_MONOTONIC_MILLISECONDS epic_rtc_get_monotonic_milliseconds()

Pycardium APIs added:

  • utime.monotonic()
  • utime.monotonic_ms()

It also fixes the decoding function from subseconds to milliseconds in epic_rtc_get_milliseconds(). The previous version was not numerically stable. See explanation in the commit message of 756c13df.

Edited by Ferdinand Bachmann

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading