[Tinyos-2-commits] CVS: tinyos-2.x/doc/txt tep107.txt,1.5,1.6
Phil Levis
scipio at users.sourceforge.net
Mon Feb 5 11:06:58 PST 2007
Update of /cvsroot/tinyos/tinyos-2.x/doc/txt
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv16433/txt
Modified Files:
tep107.txt
Log Message:
Further elucidation based on Martin's comments.
Index: tep107.txt
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/doc/txt/tep107.txt,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** tep107.txt 12 Dec 2006 18:22:54 -0000 1.5
--- tep107.txt 5 Feb 2007 19:06:56 -0000 1.6
***************
*** 185,188 ****
--- 185,189 ----
atomic {
+ platform_bootstrap();
call Scheduler.init();
call PlatformInit.init();
***************
*** 192,195 ****
--- 193,204 ----
}
+ The first call, platform_bootstrap(), is a minimalist function that
+ places the system into an executable state. This function MUST NOT include
+ operations besides those which are absolutely necessary for further code,
+ such as scheduler initialization, to execute.
+ Examples of platform_bootstrap() operations are configuring the memory
+ system and setting the processor mode. Generally, platform_bootstrap()
+ is an empty function. The platform_bootstrap() function SHOULD be
+ specified in a platform's ``hardware.h`` file.
The boot sequence has three separate initializations: Scheduler,
***************
*** 229,232 ****
--- 238,264 ----
one and only one instance of the Init interface.
+ Generally, component intialization occurs through SoftwareInit.
+ PlatformInit is for a small subset of initializations whose properties
+ requires that they be performed separately. Initializations invoked
+ through PlatformC meet some or all of the following criteria:
+
+
+ 1. The initialization requires configuring hardware resources. This implies that the code is platform-specific.
+
+ 2. The initialization should always be performed.
+
+ 3. The initialization is a prerequisite for common services in the system.
+
+ Three example operations that often belong in PlatformInit are I/O pin
+ configuration, clock calibration, and LED configuration. I/O pin
+ configuration meets the first two criteria. It should always be performed
+ (regardless of what components the OS uses) for low-power reasons:
+ incorrectly configured pins can draw current and prevent the MCU from
+ entering its lowest power sleep state[2_]. Clock calibration meets
+ all three criteria. LED configuration is a special case: while it
+ nominally meets all three criteria, the most important one is the third:
+ as LEDs are often needed during SoftwareInit initialization, they must
+ be set up before it is invoked.
+
Components whose initialization does not directly depend on hardware
resources SHOULD wire to MainC.SoftwareInit. If a component requires a
***************
*** 246,250 ****
configuration TimerMilliP {
! provides interface Timer<TMilli> as TimerMilli[uint8_t id];
}
implementation {
--- 278,282 ----
configuration TimerMilliP {
! provides interface Timer<TMilli> as Timinitialization in ordererMilli[uint8_t id];
}
implementation {
***************
*** 301,305 ****
Init.init() command MUST NOT assume that other components have been
initialized unless it has initialized them, and MUST NOT call any
! functional interfaces on any components that might be shared. An HAA
component MAY make other calls to initialize hardware state. A
component that is not part of an HAA SHOULD NOT call Init.init() on
--- 333,342 ----
Init.init() command MUST NOT assume that other components have been
initialized unless it has initialized them, and MUST NOT call any
! functional interfaces on any components that might be shared or
! interact with shared resources. Components MAY call functions
! on other components that are completely internal to the subsystem.
! For example, a networking layer can call queue operations to
! initialize its queue, but a link layer must not send commands
! over an SPI bus. An HAA
component MAY make other calls to initialize hardware state. A
component that is not part of an HAA SHOULD NOT call Init.init() on
More information about the Tinyos-2-commits
mailing list