[Tinyos-beta-commits]
CVS: tinyos-1.x/beta/teps/txt tep112.txt, 1.1, 1.2
Martin Turon
mturon at users.sourceforge.net
Mon Sep 12 23:49:24 PDT 2005
Update of /cvsroot/tinyos/tinyos-1.x/beta/teps/txt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30796
Modified Files:
tep112.txt
Log Message:
Added comments regarding some complications from last meeting.
Index: tep112.txt
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/teps/txt/tep112.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** tep112.txt 3 Sep 2005 02:01:15 -0000 1.1
--- tep112.txt 13 Sep 2005 06:49:21 -0000 1.2
***************
*** 10,14 ****
:Author: Martin Turon, Robert Szewczyk
! :Draft-Created: 19-Apr-2005
:Draft-Version: $Revision$
:Draft-Modified: $Date$
--- 10,14 ----
:Author: Martin Turon, Robert Szewczyk
! :Draft-Created: 03-Sep-2005
:Draft-Version: $Revision$
:Draft-Modified: $Date$
***************
*** 75,79 ****
conditions such as ADC and Timer state.
! command HPLPwrMgr.adjustPower {
// chips/CPU determines exact sleep mode
if (external timers running) {
--- 75,79 ----
conditions such as ADC and Timer state.
! command McuPwrMgrMcu.adjustPower {
// chips/CPU determines exact sleep mode
if (external timers running) {
***************
*** 89,93 ****
}
! This code is to use a proper HPL interface into the MCU and not directly
call registers by punching through the HPL abstraction layer. As such,
it must be called by a wired in component. This must happen in the
--- 89,93 ----
}
! This code is to use a proper HAA interface into the MCU and not directly
call registers by punching through the HPL abstraction layer. As such,
it must be called by a wired in component. This must happen in the
***************
*** 99,109 ****
atomic {
! signal HPLPwrMgr.sleep();
__nesc_atomic_sleep();
}
! signal HPLPwrMgr.wake();
}
! The HPLPwrMgr.sleep event is in a critical timing path for sleeping the
processor. It is crucial that this code be extremely efficient. The
first job of the sleep() code is to run adjustPower only if necessary.
--- 99,113 ----
atomic {
! signal HalPwrMgr.sleep();
__nesc_atomic_sleep();
}
!
! // << Interrupt handler executes and returns >>
! // Pin state management not available in interrupt context!
!
! signal HalPwrMgr.wake();
}
! The HalPwrMgr.sleep event is in a critical timing path for sleeping the
processor. It is crucial that this code be extremely efficient. The
first job of the sleep() code is to run adjustPower only if necessary.
***************
*** 111,121 ****
subsytems are required to responsibly set if they are started or stopped.
! async atomic event HPLPwrMgr.sleep() {
if (pwr_state.bits.dirty) {
! call HPLPwrMgr.adjustPower();
}
- // set power down pin states
}
4. Platform Pin State Management
--- 115,134 ----
subsytems are required to responsibly set if they are started or stopped.
! async atomic event HalPwrMgr.sleep() {
if (pwr_state.bits.dirty) {
!
! // set power down pin states
! call HalPwrMgrPlatform.adjustPower();
!
! // recalculate minimum MCU power down mode
! call HalPwrMgrMcu.adjustPower();
!
}
}
+ It is the responsibility of the platform developer to set the power state
+ dirty bits when in the subsystem Hpl code. Starting/stopping the ADC would
+ set the dirty bit for example.
+
4. Platform Pin State Management
***************
*** 137,143 ****
the device has been started or stopped by the application:
! async atomic HALFlashPwrMgr.sleep() {
// this must be fast, responsible code: just flip one pin!
! call HPLFlashPwrPin.clr();
}
--- 150,166 ----
the device has been started or stopped by the application:
! command HalPwrMgrPlatform.adjustPower {
! // chips/CPU determines exact sleep mode
! if (!flash_running) {
! call HalFlashPwrMgr.sleep();
! }
! if (!thermistor_sampling) {
! call HalThermistor.sleep();
! }
! }
!
! async atomic HalFlashPwrMgr.sleep() {
// this must be fast, responsible code: just flip one pin!
! call HalFlashPwrPin.clr();
}
More information about the Tinyos-beta-commits
mailing list