element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum How does one set the RTC on the Pi 5 and also recover the time from it?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 14 replies
  • Answers 2 answers
  • Subscribers 656 subscribers
  • Views 7278 views
  • Users 0 members are here
Related

How does one set the RTC on the Pi 5 and also recover the time from it?

andylhart
andylhart over 1 year ago

All is in the subject line. I Have a Pi 5 but have been unable to find out how to use the RTC, there is a a dearth of information it seems. 

  • Sign in to reply
  • Cancel
  • shabaz
    0 shabaz over 1 year ago

    There's no RTC in the conventional sense. Linux will maintain its own clock, by obtaining the current time from the network. The time will need to be obtained this way each time the Pi is powered on.

    If you want a RTC that retains its time (for instance through battery back-up with a coin cell etc) and does not require the Pi to be connect to a network time server, then you'd need additional hardware plugged onto the Pi. If you mention your actual end use-case, then it may be possible to provide a better answer to meet your needs. 

    • Cancel
    • Vote Up -1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • scottiebabe
    0 scottiebabe over 1 year ago

    Not sure, but it definitely has an rtc community.element14.com/.../how-can-i-connect-a-battery-for-the-real-time-clock-rtc-on-the-raspberry-pi-5 hopefully it just works.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 1 year ago in reply to scottiebabe

    What's with the negative vote? That's pretty rude considering it was a genuine mistake when trying to provide a helpful answer.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • colporteur
    0 colporteur over 1 year ago in reply to shabaz

    image

    RTC DS3221 I have used with some success.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 1 year ago in reply to colporteur

    Or it seems just a battery on the Pi 5 (apparently that's new for the Pi 5). 

     andylhart I'm presuming you can just use the Linux 'date' command, provided that the correct driver is already part of the new Pi OS. Not many people probably have the Pi 5 yet (I don't), so if there's no other information, I'd try the 'date' command (type 'man date' to see how to use it, or temporarily connect to a network for the time to automatically update).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • colporteur
    0 colporteur over 1 year ago in reply to scottiebabe

    I found this link and your cable was attached.

    picockpit.com/.../

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • scottiebabe
    0 scottiebabe over 1 year ago in reply to colporteur

    Thanks to the wonderful faq by cstanton  .If we should never use the down vote button, perhaps we should remove it and have likes only?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 1 year ago in reply to scottiebabe

    Clearly there is an issue here. Negative-vote me whenever you wish. I'm not suggesting that you should never downvote.

    I've called you out on it because I don't think it is justified. You called me out on my comment with the down-vote. What's the difference? I would also stick up for any user if I thought they were getting unfairly down-voted by anyone. Do what you like.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • cstanton
    0 cstanton over 1 year ago in reply to shabaz
    shabaz said:
    There's no RTC in the conventional sense

    The Raspberry Pi 5 now has an RTC! 

    It's part of the Renesas / Dialog DA9091 PMIC.

    It's supported by a 3v coin cell battery that connects to J5. This means we can now use "hwclock".

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • cstanton
    0 cstanton over 1 year ago in reply to shabaz
    shabaz said:
    What's with the negative vote?

    With the way Verint operates, upvoted comments become more visible towards the 'top' of the thread, and downvoted comments are less prevalent.

    I can see that being justified with regard to accuracy for someone with a question and looking for an answer.

    It's similar to how Reddit operates. However, functionality on the site is always being assessed.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube