| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| boards/ | 29-Dec-2025 | - | 274 | 161 | ||
| socs/ | 29-Dec-2025 | - | 20 | 16 | ||
| src/ | 29-Dec-2025 | - | 67 | 48 | ||
| CMakeLists.txt | D | 29-Dec-2025 | 220 | 9 | 6 | |
| README.rst | D | 29-Dec-2025 | 1,017 | 44 | 31 | |
| prj.conf | D | 29-Dec-2025 | 33 | 3 | 1 | |
| sample.yaml | D | 29-Dec-2025 | 823 | 33 | 32 |
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 25.. zephyr-app-commands:: 26 :zephyr-app: samples/drivers/rtc 27 :board: mimxrt700_evk/mimxrt798s/cm33_cpu0 28 :goals: build flash 29 30.. zephyr-app-commands:: 31 :zephyr-app: samples/drivers/rtc 32 :board: mimxrt700_evk/mimxrt798s/cm33_cpu1 33 :goals: build ram 34 35Sample Output 36============= 37 38.. code-block:: console 39 40 RTC date and time: 2024-11-17 04:19:00 41 RTC date and time: 2024-11-17 04:19:01 42 43 <repeats endlessly> 44