summaryrefslogtreecommitdiff
path: root/wasp/drivers/nrf_rtc.py
AgeCommit message (Collapse)Author
2021-06-19rtc: Undo the once-per-second wake upDaniel Thompson
So... waking up once per second turns out to be a dumb idea because it regresses the stop watch and HRS tools (which now also only wake up once per second). Undo this change but sprinkle a few more micropython.native decorations on methods used on the wakeup path to minimise power. Fixes: fb18705b9b9cc ("manager/rtc: Experimental power saving technique") Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-06-18drivers: nrf_rtc: Fix sphinx buildDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-06-04manager/rtc: Experimental power saving techniqueDaniel Thompson
Currently the time is calculated 8 times per second from (relatively) slow python code. Optimize the power consumed by reducing the number of times we check for wall time updates to only once-per-second and use native code generation to reduce VM overhead when executing this critical code. At the time of writing the difference is battery life has not yet been measured (but we know the current master branch is worse than v0.4 and, in theory at least, this should close the gap). Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-14manager: Implement alarm callbacks for applications to useDaniel Thompson
Create a simple time queue where actions (functions or bound methods) can be queued against the real time clock. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-05-14drivers: nrf_rtc: Finalize docstringsDaniel Thompson
2020-05-10drivers: nrf_rtc: Fix some tab/space issuesDaniel Thompson
These issues do not appear when parsing with micropython but when we import this file into sphinx then things go a bit south.
2020-05-09Add PNVRAM support to avoid forgetting the time during a reboot.Daniel Thompson
2020-04-26wasp: drivers: nrf_rtc: Fix a nasty bug when setting the timeDaniel Thompson
The code to recalculate the uptime to walltime adjustment was broken (e.g. the longer we leave it after reboot the more inaccurate the time setting becomes). Fixes: 80079e4 ("wasp: nrf_rtc: Add a tiny bit of extra resolution")
2020-04-26wasp: nrf_rtc: Add a tiny bit of extra resolutionDaniel Thompson
We now have a couple of applications (stopwatch, Game of Life) that benefit from sub-second precision. The micropython RTC/utime code for nrf still needs a major overhaul but this allows us to paper over the cracks for just a little longer.
2020-03-22Add licensing information for all wasp-os files.Daniel Thompson
2020-03-07drivers: nrf_rtc: Add a higher res monotonic timerDaniel Thompson
2020-02-19wasp: Add full dd-mm-yyyy calender trackingDaniel Thompson
2020-02-03wasp: pinetime: Basic RTC supportDaniel Thompson
Currently this supports time only (no date) and it based on the RTCounter class which is customized for nRF ports. At present the nRF port doesn't have proper machine.rtc support so we have implemented within wasp instead.