summaryrefslogtreecommitdiff
path: root/nuttx/configs/sama5d4-ek/README.txt
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-10 11:34:20 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-10 11:34:20 -0600
commit1869a50dc6bfe5ff97b0f66d7458fabd6d04fbe8 (patch)
tree5db763f716b54acef7a32d68ab6ac89ef76c9d96 /nuttx/configs/sama5d4-ek/README.txt
parentb399e981ac2ab1154dc59021eb942781868ddae0 (diff)
downloadpx4-nuttx-1869a50dc6bfe5ff97b0f66d7458fabd6d04fbe8.tar.gz
px4-nuttx-1869a50dc6bfe5ff97b0f66d7458fabd6d04fbe8.tar.bz2
px4-nuttx-1869a50dc6bfe5ff97b0f66d7458fabd6d04fbe8.zip
Update README files
Diffstat (limited to 'nuttx/configs/sama5d4-ek/README.txt')
-rw-r--r--nuttx/configs/sama5d4-ek/README.txt57
1 files changed, 57 insertions, 0 deletions
diff --git a/nuttx/configs/sama5d4-ek/README.txt b/nuttx/configs/sama5d4-ek/README.txt
index 26c6c1154..7d0cb70ba 100644
--- a/nuttx/configs/sama5d4-ek/README.txt
+++ b/nuttx/configs/sama5d4-ek/README.txt
@@ -94,6 +94,7 @@ Contents
- TRNG and /dev/random
- Audio Support
- TM7000 LCD/Touchscreen
+ - Tickless OS
- SAMA4D4-EK Configuration Options
- Configurations
- To-Do List
@@ -3108,6 +3109,62 @@ TM7000 LCD/Touchscreen
---
To be provided.
+Tickless OS
+===========
+
+ By default, a NuttX configuration uses a periodic timer interrupt that
+ drives all system timing. The timer is provided by architecture-specifi
+ code that calls into NuttX at a rate controlled by CONFIG_USEC_PER_TICK.
+ The default value of CONFIG_USEC_PER_TICK is 10000 microseconds which
+ corresponds to a timer interrupt rate of 100 Hz.
+
+ An option is to configure NuttX to operation in a "tickless" mode. Some
+ limitations of default system timer are, in increasing order of
+ importance:
+
+ - Overhead: Although the CPU usage of the system timer interrupt at 100Hz
+ is really very low, it is still mostly wasted processing time. One most
+ timer interrupts, there is really nothing that needs be done other than
+ incrementing the counter.
+ - Resolution: Resolution of all system timing is also determined by
+ CONFIG_USEC_PER_TICK. So nothing that be time with resolution finer than
+ 10 milliseconds be default. To increase this resolution,
+ CONFIG_USEC_PER_TICK an be reduced. However, then the system timer
+ interrupts use more of the CPU bandwidth processing useless interrupts.
+ - Power Usage: But the biggest issue is power usage. When the system is
+ IDLE, it enters a light, low-power mode (for ARMs, this mode is entered
+ with the wfi or wfe instructions for example). But each interrupt
+ awakens the system from this low power mode. Therefore, higher rates
+ of interrupts cause greater power consumption.
+
+ The so-called Tickless OS provides one solution to issue. The basic
+ concept here is that the periodic, timer interrupt is eliminated and
+ replaced with a one-shot, interval timer. It becomes event driven
+ instead of polled: The default system timer is a polled design. On
+ each interrupt, the NuttX logic checks if it needs to do anything
+ and, if so, it does it.
+
+ Using an interval timer, one can anticipate when the next interesting
+ OS event will occur, program the interval time and wait for it to fire.
+ When the interval time fires, then the scheduled activity is performed.
+
+ The following configuration options will enable support for the Tickless
+ OS for the SAMA5D platforms using TC0 channels 0-3 (other timers or
+ timer channels could be used making the obvious substitutions):
+
+ RTOS Features -> Clocks and Timers
+ CONFIG_SCHED_TICKLESS=y : Configures the RTOS in tickless mode
+
+ System Type -> SAMA5 Peripheral Support
+ CONFIG_SAMA5_TC0=y : Enable TC0 (TC channels 0-3
+
+ System Type -> Timer/counter Configuration
+ CONFIG_SAMA5_ONESHOT=y : Enables one-shot timer wrapper
+ CONFIG_SAMA5_FREERUN=y : Enabled free-running timer wrapper
+ CONFIG_SAMA5_TICKLESS_ONESHOT=0 : Selects TC0 channel 0 for the one-shot
+ CONFIG_SAMA5_TICKLESS_FREERUN=1 : Selects TC0 channel 1 for the free-
+ : running timer
+
SAMA4D4-EK Configuration Options
=================================