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 59da9d9578f894b2fcb9eb9784d83363a7443e23 Author: ouyangxiangzhen <[email protected]> AuthorDate: Wed Oct 28 14:56:44 2026 +0800 docs: document HRTIMER_PRECISION_SHIFT and TIMER_ADJUST_NSEC time_clock.rst describes the tickless options and the hrtimer, but does not cover the newly added CONFIG_HRTIMER_PRECISION_SHIFT, nor CONFIG_TIMER_ADJUST_NSEC (renamed from TIMER_ADJUST_USEC, unit changed from us to ns). Add a short HRTimer Options section. Assisted-By: mimo-v2.6-pro Signed-off-by: ouyangxiangzhen <[email protected]> --- Documentation/os/time/time_clock.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/os/time/time_clock.rst b/Documentation/os/time/time_clock.rst index edb834dafaa..7fc5ea4e390 100644 --- a/Documentation/os/time/time_clock.rst +++ b/Documentation/os/time/time_clock.rst @@ -316,6 +316,14 @@ Tickless Configuration Options This value should never be less than the underlying resolution of the timer. Errors may ensue. +- ``CONFIG_TIMER_ADJUST_NSEC``: Adjusts the scheduled wake-up time by + this many nanoseconds so timers fire that much earlier, + compensating for interrupt latency. It replaces + ``CONFIG_TIMER_ADJUST_USEC``; the unit changed from microseconds to + nanoseconds. It is used by the tickless watchdog path + (``wd_adjust_next_tick()``) even when ``CONFIG_HRTIMER`` is not + enabled. + Tickless Imported Interfaces ---------------------------- @@ -625,6 +633,13 @@ or ``kill()`` to communicate with NuttX tasks. High-resolution Timer Interfaces ================================ +**CONFIG_HRTIMER_PRECISION_SHIFT**. Reduces the resolution of the +high-resolution timer to decrease the frequency of timer interrupts. +The value N defines the left-shift bits of the precision unit: +precision = 1 << N nanoseconds and the mask is precision - 1 (default +0 = full precision). This option is only available with +``CONFIG_HRTIMER``. + Hard real-time applications, such as motor control, often require nanosecond-level task timing, which tick-based timers like wdog cannot provide. Reducing the tick interval to micro-
