Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Teensy 3.6 and RTC date and time not ok when power lost.

  1. #1
    Junior Member
    Join Date
    May 2018
    Posts
    16

    Teensy 3.6 and RTC date and time not ok when power lost.

    I have a Teensy 3.6 with a battery, when i reset the Teensy, the clock is ok.
    When i lost the power, the time is from te HEX file?
    Also with the Example "TimeTeensy3" what is this???
    Thanks.

  2. #2
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    1,973
    as forum rule states: please post complete source code ...

    you probably need setSyncProvider(getTeensy3Time);

    see https://forum.pjrc.com/threads/43336...sy-3-6-and-RTC
    this question has been asked and answered on the forum often.

  3. #3
    Junior Member
    Join Date
    May 2018
    Posts
    16
    Yes, this is into the setup loop "setSyncProvider(getTeensy3Time);"

    How can the rtc time to the hex time ?

    Thanks.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,072
    Quote Originally Posted by Stanleyvc View Post
    When i lost the power, the time is from te HEX file?
    The RTC is supposed to keep time as long as 3V remains on the VBAT pin.

    If you disconnect power from VBAT, then next time you boot the RTC is uninitialized. The time you compiled the code is used as a default, because no other info is available. If you have access to accurate time, you can use the functions to set the time.

  5. #5
    Junior Member
    Join Date
    May 2018
    Posts
    16
    Thanks Paul,

    Is the rtc state or \ and the vbat reading in the source?

    Thanks.

  6. #6
    Junior Member
    Join Date
    May 2018
    Posts
    16
    The battery house was the problem, not good connection.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •