• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

boards/04-Jan-2025-5042

src/04-Jan-2025-6748

CMakeLists.txtD04-Jan-2025220 96

README.rstD04-Jan-2025757 3423

prj.confD04-Jan-202533 31

sample.yamlD04-Jan-2025363 2019

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