This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit b1191a5cfa76e5554aa9c488d97e28c112464950
Author: dechao_gong <[email protected]>
AuthorDate: Wed Oct 28 10:45:32 2026 +0800

    Documentation/rtl8730e: document the RTC configuration
    
    Add the RTC feature bullet and the rtc configuration section to the
    rtl8730e_evb board page, covering the /dev/rtc0 registration, the
    year plus day-of-year hardware model, the cold-start seeding and the
    date and alarm commands used to exercise it.
    
    Signed-off-by: dechao_gong <[email protected]>
    Assisted-by: Claude <[email protected]>
---
 .../arm/rtl8730e/boards/rtl8730e_evb/index.rst     | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/Documentation/platforms/arm/rtl8730e/boards/rtl8730e_evb/index.rst 
b/Documentation/platforms/arm/rtl8730e/boards/rtl8730e_evb/index.rst
index dd05e6cb155..e0199e9b26f 100644
--- a/Documentation/platforms/arm/rtl8730e/boards/rtl8730e_evb/index.rst
+++ b/Documentation/platforms/arm/rtl8730e/boards/rtl8730e_evb/index.rst
@@ -49,6 +49,8 @@ Supported in this NuttX port:
 * On-chip watchdog exposed as a ``/dev/watchdog0`` character device
 * 12-bit ADC exposed as a ``/dev/adc0`` character device, sampled in polling
   mode through the SDK fwlib register layer
+* On-chip RTC exposed as a ``/dev/rtc0`` character device, with a one-shot
+  alarm
 * littlefs persistent storage mounted at ``/data`` (a dedicated SPI NOR flash
   partition), backing the Wi-Fi key-value store
 * Wi-Fi station and SoftAP through the ``wapi`` tool
@@ -212,6 +214,28 @@ samples, reported as raw codes. Exercise it with the 
example::
 
     nsh> adc -n 1     # sample CH2-CH5 once on /dev/adc0
 
+rtc
+---
+
+Minimal NSH with the RTC driver and the ``alarm`` example
+(``examples/alarm``) enabled (no Wi-Fi). The board registers the on-chip RTC
+at ``/dev/rtc0`` (see ``boards/arm/rtl8730e/rtl8730e_evb/src/rtl8730e_rtc.c``)
+and the system time is seeded from it at boot. The RTC has no board wiring
+(it is an internal clock in the always-on domain). The hardware keeps only a
+year and a day-of-year, so the driver converts to and from calendar
+month/day in software. After a cold power-up the counter starts in 1900; the
+driver then seeds it with ``CONFIG_START_YEAR/MONTH/DAY``, while a warm
+RTC that already holds a later date is left alone. The RTC is reset by
+CHIP_EN, power-on and system reset (which the board reset button
+triggers), but not by BOR, thermal, deep-sleep or watchdog resets. After a
+reset button press the registers therefore read back as zero (year 1900)
+when the driver starts and the clock is seeded again, whereas after a
+watchdog reset the time carries on. Exercise it with ``date`` and the alarm 
example::
+
+    nsh> date -s "Oct 28 12:00:00 2026"
+    nsh> date
+    nsh> alarm 5      # one-shot alarm on /dev/rtc0 firing in 5 seconds
+
 Wi-Fi
 =====
 

Reply via email to