dcgong2917 opened a new pull request, #21059:
URL: https://github.com/apache/nuttx/pull/21059

   ## Summary
   
   Wire the shared Ameba RTC driver up on the AmebaSmart (RTL8730E) CA32 and
   register the clock at /dev/rtc0, with the one-shot alarm when RTC_ALARM is 
set.
   
   - Chip specifics go in ameba_rtc_chip.h: the RTC interrupt is GIC SPI 12
     (NuttX IRQ 44); APBPeriph_RTC is bit 19 and APBPeriph_RTC_CLOCK is bit 3
     (both bit 3 on RTL8721Dx).
   - The AP ROM carries no RTC_* symbols, so the SDK's RAM-side fwlib
     ameba_rtc.c is compiled into libameba_fwlib.a, in both make and CMake.
   - The shared driver (common/ameba/ameba_rtc.c) is not modified.
   - Adds an `rtc` configuration with the alarm example, and the board
     documentation.
   
   ## Impact
   
   Only the rtl8730e_evb board and the rtl8730e arch directory are touched,
   and only when CONFIG_AMEBA_RTC is enabled.  Other chips are unaffected.
   
   The scripts/Make.defs change only widens the --no-warn-mismatch condition;
   the CMake build gets the same flag from AMEBA_EXTRA_LIBS, so the first
   commit carries [skip-cmake-parity].
   
   ## Testing
   
   Host: Linux (WSL2), arm-none-eabi toolchain from the SDK.
   Board: RTL8730E EVB (Cortex-A32, SMP), `rtl8730e_evb:rtc`.
   
   - checkpatch: clean on both commits.
   - Built with make and with CMake; the nsh, adc and rtc configs build.
   - On hardware:
   
   nsh> date
   Wed, Oct 28 00:00:46 2026
   nsh> date -s "Oct 28 12:00:00 2026"
   nsh> date
   Wed, Oct 28 12:00:04 2026
   nsh> alarm 5
   Alarm 0 set in 5 seconds
   alarm_daemon: alarm 0 received
   
   Cold start reads the configured build date, `date -s` takes effect and the
   clock keeps counting, and the 5 second alarm fires on time.
   
   Note: the RTC is reset by CHIP_EN, power-on and system reset (the board
   reset button), so the time does not survive that; it does survive BOR,
   thermal, deep-sleep and watchdog resets.  This is documented on the board
   page.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to