From 12aa9693238f2f56d50690f28749eef5762d1fd4 Mon Sep 17 00:00:00 2001 From: Jason Kridner <jkridner@beagleboard.org> Date: Thu, 16 May 2024 13:47:35 -0400 Subject: [PATCH] Using RTC review items See https://openbeagle.org/docs/docs.beagleboard.io/-/merge_requests/111 * Do not add notes to say work-in-progress. Simply provide a todo item for someone to follow-up on later. Document what remains to be documented. * Refer to boards by their full name, ie. BeagleY-AI, not BeagleY. Let other people be lazy. Our documentation should not add ambiguity. If there are specific cases where we need to refer to collections of boards, use the most specific name. * Please use descriptive titles for links. You cannot name multiple links as 'Link'. This is not only counter-productive, it is not allowed by the tools. * Please use the YouTube plugin for YouTube videos. See https://docs.beagleboard.org/latest/intro/contribution/rst-cheat-sheet.html#youtube-example --- boards/beagley/ai/demos/using-rtc.rst | 45 +++++++++++++++++++-------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/boards/beagley/ai/demos/using-rtc.rst b/boards/beagley/ai/demos/using-rtc.rst index b4499caa..18c5e5a5 100644 --- a/boards/beagley/ai/demos/using-rtc.rst +++ b/boards/beagley/ai/demos/using-rtc.rst @@ -1,14 +1,15 @@ .. _beagley-ai-rtc: -.. note:: This page is a work in progress. Further testing and images will be added soon - - Using the on-board Real Time Clock (RTC) ################################################# +.. todo:: + + Add specific actions rather than notes that this is a work-in-progress. + Real Time Clocks (RTCs) provide precise and reliable timekeeping capabilities, which are beneficial for applications ranging from simple timekeeping to complex scheduling and secure operations. -Without an RTC, a computer must rely on something called Network Time Protocol (NTP) to obtain the current time from a network source. There are many cases however where an SBC such as BeagleY may not have +Without an RTC, a computer must rely on something called Network Time Protocol (NTP) to obtain the current time from a network source. There are many cases however where an SBC such as BeagleY-AI may not have a constant or reliable network connection. In situations such as these, an RTC allows the board to keep time even if the network connection is severed or the board loses power for an extended period of time. Fortunately, BeagleY-AI comes with a built-in `DS1340 <https://www.analog.com/media/en/technical-documentation/data-sheets/DS1340-DS1340C.pdf>`_ RTC for all your fancy time keeping needs! @@ -16,13 +17,13 @@ Fortunately, BeagleY-AI comes with a built-in `DS1340 <https://www.analog.com/me Required Hardware ********************** -BeagleY provides a **1.25 mm pitch, 2-pin JST GH connector** for a coin cell battery to enable the RTC to keep time even if power is lost to the board. +BeagleY-AI provides a **1.25 mm pitch, 2-pin JST GH connector** for a coin cell battery to enable the RTC to keep time even if power is lost to the board. These batteries are available from several vendors: -* Adafruit - `Link <https://www.adafruit.com/product/5817>`_ -* DigiKey - `Link <https://www.digikey.com/en/products/detail/raspberry-pi/SC1163/21658274>`_ -* Amazon (reusable battery holder) - `Link <https://www.amazon.com/KODASW-RTCBattery-Holder-Include-Battery/dp/B0CRKQ2MG1/>`_ +* `Raspberry Pi 5 RTC Battery via Adafruit <https://www.adafruit.com/product/5817>`_ +* `Raspberry Pi 5 RTC Battery via DigiKey <https://www.digikey.com/en/products/detail/raspberry-pi/SC1163/21658274>`_ +* `CR2023 battery holder for Pi 5 via Amazon <https://www.amazon.com/KODASW-RTCBattery-Holder-Include-Battery/dp/B0CRKQ2MG1/>`_ .. image:: ../images/beagley_rtc.png @@ -42,7 +43,7 @@ Uses for an RTC Reading time ********************** -.. note:: If you have not connected your BeagleY to a network so it can get time from an NTP server, you must set the time before being able to read it. If you don't do this first, you'll see errors. +.. note:: If you have not connected your BeagleY-AI to a network so it can get time from an NTP server, you must set the time before being able to read it. If you don't do this first, you'll see errors. Reading the current time on the RTC is achieved using the **hwclock** command. @@ -138,8 +139,26 @@ Going Further Consider learning about topics such as time keeping over GPS and Atomic Clocks! -Some good YouTube Videos and sources for inspiration - +There are some good YouTube videos below to provide sources for inspiration. + +Network Time Protocol - Computerphile +===================================== + +.. youtube:: BAo5C2qbLq8 + :width: 100% + :align: center + +Nanosecond Clock Sync - Jeff Geerling +===================================== + +.. youtube:: RvnG-ywF6_s + :width: 100% + :align: center + +Using GPS with PPS to synchronize clocks over the network +========================================================= + +.. youtube:: 7aTZ66ZL6Dk + :width: 100% + :align: center -* `Network Time Protocol - Computerphile <https://www.youtube.com/watch?v=BAo5C2qbLq8>`_ -* `Nanosecond Clock Sync - Jeff Geerling <https://www.youtube.com/watch?v=RvnG-ywF6_s>`_ -* `Using GPS with PPS to synchronize clocks over the network <https://www.youtube.com/watch?v=7aTZ66ZL6Dk>`_ \ No newline at end of file -- GitLab