diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index 0f54a3e871..8eb13e2970 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -2220,23 +2220,23 @@ The system can be re-made subsequently by just typing make.

System Timer In most implementations, system time is provided by a timer interrupt. - 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. + That timer interrupt runs at rate determined by CONFIG_USEC_PER_TICKS (default 10000 microseconds or 100Hz. If CONFIG_SCHED_TICKLESS is selected, the default is 100 microseconds). + The timer generates an interrupt each CONFIG_USEC_PER_TICKS microseconds 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_USEC_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. - As a result, the time interval specified by CONFIG_MSEC_PER_TICKS may only be approximate and there may be small errors in the apparent up-time time. + On many system, the exact timer interval specified by CONFIG_USEC_PER_TICKS cannot be achieved due to limitations in frequencies or in dividers. + As a result, the time interval specified by CONFIG_USEC_PER_TICKS may only be approximate and there may be small errors in the apparent up-time time. These small errors, however, will accumulate over time and after a long period of time may have an unacceptably large error in the apparent up-time of the MCU.

- If the timer tick period generated by the hardware is not exactly CONFIG_MSEC_PER_TICKS and if there you require accurate up-time for the MCU, then there are measures that you can take: + If the timer tick period generated by the hardware is not exactly CONFIG_USEC_PER_TICKS and if there you require accurate up-time for the MCU, then there are measures that you can take: