diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html
index d05eea2396c..e17a9c62e47 100644
--- a/Documentation/NuttxPortingGuide.html
+++ b/Documentation/NuttxPortingGuide.html
@@ -1887,6 +1887,9 @@ The system can be re-made subsequently by just typing make.
That timer interrupt runs at rate determined by CONFIG_MSEC_PER_TICKS (default 10 or 100Hz).
The timer generates an interrupt each CONFIG_MSEC_PER_TICKS milliseconds and increments a counter called g_system_timer.
g_system_timer then provides a time-base for calculating up-time and elapsed time intervals in units of CONFIG_MSEC_PER_TICKS.
+ The range of g_system_timer is, by default, 32-bits.
+ However, if the MCU supports type long long and CONFIG_SYSTEM_TIME16 is selected,
+ a 64-bit system timer will be supported instead.
System Timer Accuracy
On many system, the exact timer interval specified by CONFIG_MSEC_PER_TICKS cannot be achieved due to limitations in frequencies or in dividers.
@@ -1960,34 +1963,7 @@ else
In this way, the timer interval is controlled from interrupt-to-interrupt to produce an average frequency of exactly 100Hz.
- To enable UTC time representation use option: -
--CONFIG_SYSTEM_UTC=y --
- which adds the following variables: -
-g_system_utc (seconds, 4 bytes)g_tickcount (timer ticks, 1-2 bytes typically)- and replaces: -
-g_system_timer(4 bytes)g_basetime(8 bytes)g_tickbias(4 bytes)
- Otherwise internal time is computed from 32-bit running tick timer
- g_systemtimer the start date g_basetime and time offset the g_tickbias.
-
To enable hardware module use the following configuration options:
@@ -2014,47 +1990,29 @@ CONFIG_SYSTEM_UTC=y
up_rtc_time(). UTC time in seconds.up_rtc_gettime(). Replacement for g_system_tick
- This module depends on CONFIG_SYSTEM_UTC=y.
-
- The system tick is represented by, when CONFIG_SYSTEM_UTC=n:
+ The system tick is represented by::
g_system_timer
- or, when CONFIG_SYSTEM_UTC=y
-
g_tickcountg_system_utcRunning at rate of system base timer, used for time-slicing, and so forth.
- If hardware RTC is present (CONFIG_RTC) and and high-resolution timeing
+ If hardware RTC is present (CONFIG_RTC) and and high-resolution timing
is enabled (CONFIG_RTC_HIRES), then after successful
initiliazation variables are overriden by calls to up_rtc_gettime() which is
running continously even in power-down modes.
- In the case of CONFIG_RTC_HIRES is set the g_tickcount and
- g_system_utc keep counting at rate of a system timer, which however, is
- disabled in power-down mode.
+ In the case of CONFIG_RTC_HIRES is set the g_system_timer
+ keeps counting at rate of a system timer, which however, is disabled in power-down mode.
By comparing this time and RTC (actual time) one may determine the actual system active time.
To retrieve that variable use:
-
clock_gettime(CLOCK_ACTIVETIME, tp)
-
-
- If the CLOCK_ACTIVETIME time is never set it will serve as power-up time
- minus all deep sleeps.
-
@@ -3765,6 +3723,12 @@ build task name to save in the TCB. Useful if scheduler instrumentation is selected. Set to zero to disable.
CONFIG_SYSTEM_TIME16:
+ The range of system time is, by default, 32-bits.
+ However, if the MCU supports type long long and CONFIG_SYSTEM_TIME16 is selected,
+ a 64-bit system timer will be supported instead.
+ CONFIG_START_YEAR, CONFIG_START_MONTH, CONFIG_START_DAY -
Used to initialize the internal time logic.