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 @@ -47,6 +47,8 @@ Supported in this NuttX port:
alarm support, driven directly on the SDK fwlib register layer
* On-chip watchdog exposed as a ``/dev/watchdog0`` character device, driven
directly on the SDK fwlib register layer
* General-purpose timers exposed as ``/dev/timer0`` and ``/dev/timer1``
character devices, driven directly on the SDK fwlib register layer

Buttons and LEDs
================
Expand Down Expand Up @@ -190,6 +192,20 @@ which opens the device, sets a timeout, and pings it::

nsh> wdog # run the watchdog example

timer
-----

Minimal NSH with the on-chip general-purpose timer driver and the ``timer``
example enabled (no Wi-Fi). Two 32-bit basic timers clocked at 32.768 kHz are
registered from the board bring-up
(``boards/arm/rtl8720f/rtl8720f_evb/src/rtl8720f_timer.c``) as ``/dev/timer0``
(TIM1) and ``/dev/timer1`` (TIM2); they have no board wiring (they are
internal). TIM0 is reserved by the boot ROM as the system timer and is not
exposed. Exercise a device with the example, which sets an interval and counts
the update interrupts::

nsh> timer -d /dev/timer0 # run the timer example on TIM1

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 @@ -49,6 +49,8 @@ Supported in this NuttX port:
alarm support, driven directly on the SDK fwlib register layer
* On-chip watchdog exposed as a ``/dev/watchdog0`` character device, driven
directly on the SDK fwlib register layer
* General-purpose timers exposed as ``/dev/timer0`` and ``/dev/timer1``
character devices, driven directly on the SDK fwlib register layer

Buttons and LEDs
================
Expand Down Expand Up @@ -199,6 +201,20 @@ which opens the device, sets a timeout, and pings it::

nsh> wdog # run the watchdog example

timer
-----

Minimal NSH with the on-chip general-purpose timer driver and the ``timer``
example enabled (no Wi-Fi). Two 32-bit basic timers clocked at 32.768 kHz are
registered from the board bring-up
(``boards/arm/rtl8721dx/pke8721daf/src/rtl8721dx_timer.c``) as ``/dev/timer0``
(TIM1) and ``/dev/timer1`` (TIM2); they have no board wiring (they are
internal). TIM0 is reserved by the boot ROM as the system timer and is not
exposed. Exercise a device with the example, which sets an interval and counts
the update interrupts::

nsh> timer -d /dev/timer0 # run the timer example on TIM1

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 @@ -48,6 +48,8 @@ Supported in this NuttX port:
alarm support, driven directly on the SDK fwlib register layer
* On-chip watchdog exposed as a ``/dev/watchdog0`` character device, driven
directly on the SDK fwlib register layer
* General-purpose timers exposed as ``/dev/timer0`` and ``/dev/timer1``
character devices, driven directly on the SDK fwlib register layer

Buttons and LEDs
================
Expand Down Expand Up @@ -193,6 +195,20 @@ which opens the device, sets a timeout, and pings it::

nsh> wdog # run the watchdog example

timer
-----

Minimal NSH with the on-chip general-purpose timer driver and the ``timer``
example enabled (no Wi-Fi). Two 32-bit basic timers clocked at 32.768 kHz are
registered from the board bring-up
(``boards/arm/rtl8721f/rtl8721f_evb/src/rtl8721f_timer.c``) as ``/dev/timer0``
(TIM1) and ``/dev/timer1`` (TIM2); they have no board wiring (they are
internal). TIM0 is reserved by the boot ROM as the system timer and is not
exposed. Exercise a device with the example, which sets an interval and counts
the update interrupts::

nsh> timer -d /dev/timer0 # run the timer example on TIM1

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 @@ -149,4 +149,21 @@ config AMEBA_WDG
enabled, so stop() arms the WDG early interrupt and refreshes the
counter from its handler to inhibit the reset.

config AMEBA_TIMER
bool "Timer"
default n
select TIMER
---help---
Expose the Ameba general-purpose timers as NuttX timer devices at
/dev/timerN (start/stop/settimeout/getstatus, plus a periodic
expiration callback). The timeout is programmed directly in
microseconds.

The driver (arch/arm/src/common/ameba/ameba_timer.c) is a
parameterised lower half sitting on the SDK fwlib RTIM register
layer; the board picks which of the twelve on-chip timers to expose
via the per-chip instance table. On the pke8721daf /dev/timer0 is
TIM1 and /dev/timer1 is TIM2, both 32.768 kHz basic timers. TIM0
is reserved by the ROM as the system timer and is not exposed.

endmenu # Ameba Peripheral Support
Loading
Loading