Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Documentation/platforms/arm/rtl8720f/boards/rtl8720f_evb/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Supported in this NuttX port:
the SDK fwlib timer register layer
* ADC channels exposed as an ``/dev/adc0`` character device, driven directly
on the SDK fwlib register layer
* On-chip RTC exposed as a ``/dev/rtc0`` date/time character device with
alarm support, driven directly on the SDK fwlib register layer

Buttons and LEDs
================
Expand Down Expand Up @@ -161,6 +163,20 @@ example::

nsh> adc -n 1 # one sweep of /dev/adc0

rtc
---

Minimal NSH with the on-chip RTC driver and the ``alarm`` example enabled
(no Wi-Fi). The RTC is registered at ``/dev/rtc0`` from the board bring-up
(``boards/arm/rtl8720f/rtl8720f_evb/src/rtl8720f_rtc.c``); it has no board
wiring (it is an internal clock). The hardware stores year + day-of-year, so
the shared driver bridges to a full calendar. Read and set the clock with the
NSH ``date`` command, and arm a one-shot wakeup with the example::

nsh> date # read /dev/rtc0
nsh> date -s "Jun 16 12:00:00 2026" # set the RTC
nsh> alarm 10 # fire an alarm in 10 seconds

nsh
---

Expand Down
16 changes: 16 additions & 0 deletions Documentation/platforms/arm/rtl8721dx/boards/pke8721daf/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Supported in this NuttX port:
the SDK fwlib timer register layer
* ADC channels exposed as an ``/dev/adc0`` character device, driven directly
on the SDK fwlib register layer
* On-chip RTC exposed as a ``/dev/rtc0`` date/time character device with
alarm support, driven directly on the SDK fwlib register layer

Buttons and LEDs
================
Expand Down Expand Up @@ -170,6 +172,20 @@ example::

nsh> adc -n 1 # one sweep of /dev/adc0

rtc
---

Minimal NSH with the on-chip RTC driver and the ``alarm`` example enabled
(no Wi-Fi). The RTC is registered at ``/dev/rtc0`` from the board bring-up
(``boards/arm/rtl8721dx/pke8721daf/src/rtl8721dx_rtc.c``); it has no board
wiring (it is an internal clock). The hardware stores year + day-of-year, so
the shared driver bridges to a full calendar. Read and set the clock with the
NSH ``date`` command, and arm a one-shot wakeup with the example::

nsh> date # read /dev/rtc0
nsh> date -s "Jun 16 12:00:00 2026" # set the RTC
nsh> alarm 10 # fire an alarm in 10 seconds

Wi-Fi
=====

Expand Down
16 changes: 16 additions & 0 deletions Documentation/platforms/arm/rtl8721f/boards/rtl8721f_evb/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Supported in this NuttX port:
the SDK fwlib timer register layer
* ADC channels exposed as an ``/dev/adc0`` character device, driven directly
on the SDK fwlib register layer
* On-chip RTC exposed as a ``/dev/rtc0`` date/time character device with
alarm support, driven directly on the SDK fwlib register layer

Buttons and LEDs
================
Expand Down Expand Up @@ -164,6 +166,20 @@ trigger. Read the channels with the example::

nsh> adc -n 1 # one sweep of /dev/adc0

rtc
---

Minimal NSH with the on-chip RTC driver and the ``alarm`` example enabled
(no Wi-Fi). The RTC is registered at ``/dev/rtc0`` from the board bring-up
(``boards/arm/rtl8721f/rtl8721f_evb/src/rtl8721f_rtc.c``); it has no board
wiring (it is an internal clock). The hardware stores year + day-of-year, so
the shared driver bridges to a full calendar. Read and set the clock with the
NSH ``date`` command, and arm a one-shot wakeup with the example::

nsh> date # read /dev/rtc0
nsh> date -s "Jun 16 12:00:00 2026" # set the RTC
nsh> alarm 10 # fire an alarm in 10 seconds

nsh
---

Expand Down
17 changes: 17 additions & 0 deletions arch/arm/src/common/ameba/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,21 @@ config AMEBA_ADC
polling in task context (the chip does not enable a hardware
software-trigger path).

config AMEBA_RTC
bool "RTC"
default n
select RTC
select RTC_DRIVER
select RTC_DATETIME
---help---
Expose the Ameba on-chip real-time clock as a NuttX date/time RTC
at /dev/rtc0 (rdtime/settime). Enable RTC_ALARM as well to get a
single one-shot alarm whose expiry fires the RTC interrupt and the
registered upper-half callback.

The driver (arch/arm/src/common/ameba/ameba_rtc.c) sits on the SDK
fwlib RTC register layer. The hardware keeps a year plus a
day-of-year (no month/day register); the driver bridges that to the
NuttX month/day calendar with the libc UTC calendar routines.

endmenu # Ameba Peripheral Support
Loading
Loading