Code Monkey home page Code Monkey logo

rtcdue's People

Contributors

markuslange avatar per1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rtcdue's Issues

Consider encouraging use of TAI rather than UTC for nontrivial applications

Many libraries that use UTC or unixtime contain subtle bugs in determining the correct calendar date/time and parsing/math errors when presented with a date/time like 20yy1231T115960Z. I strongly suspect (but haven't tested) that the Arduino RTC_ routines are also flawed in this manner, rendering them naively-buggy if using UTC directly as a time source; however, using RTC_ with TAI would be fine since there would be no leap seconds.

Reasons:

  • UTC contains leap seconds, TAI doesn't. [1]
  • TAI doesn't have horrific edge-cases like 61 second minutes, so a correct implementation using TAI is much simpler.
  • A downside to converting TAI <---> UTC requires a current leap-second table that can and will change over the years.
  • Converting TAI <---> unixtime is straightforward, as-if there were no leap seconds.

Users can either:
A. Periodically set their embedded system's RTC to TAI from a reliable external source after converting to TAI with a proper library. [2]
B. Assume the risks of UTC and simply don't do correct interval measuring, don't store correct date/times in the past, and don't require correct, monotonic time.

References:

  1. TAI/UTC https://cr.yp.to/proto/utctai.html
  2. libtai https://cr.yp.to/libtai.html
  3. Future leap second news https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat
  4. Leap second text table https://raw.githubusercontent.com/eggert/tz/master/leap-seconds.list
  5. Leap second binary table https://cr.yp.to/libtai/leapsecs.dat

[Question] RTC Deep-sleep interrupt

Newbie to CPU programming here. I'm trying to use the SAM3X's low-power backup mode to reduce energy consumption on my Due. One of the ways that the CPU can be woken is with an interrupt signal from the RTC, which is not turned off in backup mode. Ideally, I'm trying to do this routinely(Every X seconds) and I'd like to know if that is possible using this repo. Atmel has sample code for this but it's inaccessible because I'm on macOS. Thank you!

arduino 1.8

tried it and could not not make work with arduino 1.8 , serial.begin is not working ? please advise

RTC Code Occasionally Gets Stuck

Hello,

The RTCDue library code occasionally gets stuck on the following line of code(usually when attempting to set the time right after calling rtc.begin() ):

while ((RTC->RTC_SR & RTC_SR_SEC) != RTC_SR_SEC);

This is according to the atmel ICE debugger, and I am a bit lost as to why this is only occurring some of the time. This line seems to be waiting for a tick to occur that never comes?

Problem

I need to know what this library is used for. I uploaded the RTCDue_Simple_Sample trial program to my arduino and nothing was written out on the serial monitor and the board has not been communicating ever since. The programing port logs in but nothing can be loaded into the board. Can you please help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.