:TEP: 102
:Group: Core Working Group
:Type: Documentary
-:Status: Draft
+:Status: Final
:TinyOS-Version: 2.x
:Author: Cory Sharp, Martin Turon, David Gay
-:Draft-Created: 22-Sep-2004
-:Draft-Version: $Revision$
-:Draft-Modified: $Date$
-:Draft-Discuss: TinyOS Developer List <tinyos-devel at mail.millennium.berkeley.edu>
-
.. Note::
This memo documents a part of TinyOS for the TinyOS Community, and
by a 32768Hz crystal.
Examples of widths are 8-bit, 16-bit, 32-bit, and 64-bit. The width
-for timer interfaces and components SHOULD be 32-bits. That is, for
-lack of a good reason, timer interfaces should expose a 32-bit
-interface. In a number of circumstances there are good reasons not
-to expose a 32-bit interface. This TEP emphasizes 32-bit widths
-while reasonably accommodating other widths.
+for timer interfaces and components SHOULD be 32-bits. This TEP
+emphasizes 32-bit widths while reasonably accommodating other widths -
+a particular platform may have good reasons not to expose a 32-bit
+interface.
Accuracy reflects how closely a component conforms to the precision it
claims to provide. Accuracy is affected by issues such as clock drift (much
cancel any previously running alarm.
fired()
- signals that the alarm has occurred.
+ signals that the alarm has expired.
isRunning()
return TRUE if the alarm has been started and has not been cancelled
BusyWait blocks for no less than the specified amount of time. No
explicit upper bound is imposed on the enacted delay, though it is
-expected the underlying implementation spins in a busy loop until
+expected that the underlying implementation spins in a busy loop until
the specified amount of time has elapsed.
::
cancel any previously running timer.
fired()
- signals that the timer has occurred.
+ signals that the timer has expired (one-shot) or repeated (periodic).
isRunning()
return TRUE if the timer has been started and has not been cancelled
- and has not fired for the case of one-shot timers. One a periodic
+ and has not fired for the case of one-shot timers. Once a periodic
timer is started, isRunning will return TRUE until it is cancelled.
isOneShot()
provides interface Alarm< T32khz, uint8_t >;
}
-This pattern MAY be used to defined components for the platform that
-are mutually incompatible in single application. Incompatible
+This pattern MAY be used to define components for the platform that
+are mutually incompatible in a single application. Incompatible
components SHOULD produce compile-time errors when compiled
together.
4. HIL requirements
====================================================================
-The following component MUST be provided on all platforms::
+The following component MUST be provided on all platforms
+::
+
HilTimerMilliC
BusyWaitMicroC
+Both of these components use "binary" units, i.e., 1/1024s for
+HilTimerMilliC and 1/1048576s for BusyWaitMicroC. Components using
+other precisions (e.g., regular, non-binary milliseconds) MAY also be
+provided.
+
HilTimerMilliC
--------------------------------------------------------------------
* ``VirtualizeAlarmC.nc``
* ``VirtualizeTimerC.nc``
-The implementation of Timers for the MSP430 is in
+The implementation of timers for the MSP430 is in
``tinyos-2.x/tos/chips/msp430/timer``:
* ``Alarm32khz16C.nc`` is generic and provides a new ``Alarm<T32khz,uint16_t>``
* ``Msp430TimerP.nc`` is generic and implements the HPL for MSP430 timer
special function registers
+Implementation of timers for the ATmega128 and PXA27x may be found in
+``tinyos-2.x/tos/chips/atm128/timer`` and
+``tinyos-2.x/tos/chips/pxa27x/timer`` respectively.
+
+
7. Author's Address
====================================================================
| Cory Sharp