Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
boards/ | 18-Mar-2025 | - | 50 | 42 | ||
src/ | 18-Mar-2025 | - | 67 | 48 | ||
CMakeLists.txt | D | 18-Mar-2025 | 220 | 9 | 6 | |
README.rst | D | 18-Mar-2025 | 757 | 34 | 23 | |
prj.conf | D | 18-Mar-2025 | 33 | 3 | 1 | |
sample.yaml | D | 18-Mar-2025 | 363 | 20 | 19 |
README.rst
1.. zephyr:code-sample:: rtc 2 :name: Real-Time Clock (RTC) 3 :relevant-api: rtc_interface 4 5 Set and read the date/time from a Real-Time Clock. 6 7Overview 8******** 9 10This sample shows how to use the :ref:`rtc driver API <rtc_api>` 11to set and read the date/time from RTC and display on the console 12and can be built and executed on boards supporting RTC. 13 14Building and Running 15******************** 16 17Build and flash as follows, replacing ``stm32f3_disco`` with your board: 18 19.. zephyr-app-commands:: 20 :zephyr-app: samples/drivers/rtc 21 :board: stm32f3_disco 22 :goals: build flash 23 :compact: 24 25Sample Output 26============= 27 28.. code-block:: console 29 30 RTC date and time: 2024-11-17 04:19:00 31 RTC date and time: 2024-11-17 04:19:01 32 33 <repeats endlessly> 34