Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • F firmware
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 74
    • Issues 74
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 29
    • Merge requests 29
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • card10card10
  • firmware
  • Merge requests
  • !285

Add monotonic time

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ferdinand Bachmann requested to merge yrlf/firmware:add-monotonic-time into master Aug 30, 2019
  • Overview 6
  • Commits 6
  • Pipelines 3
  • Changes 4

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 Aug 30, 2019 by Ferdinand Bachmann
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: add-monotonic-time