|
发表于 2007-12-13 10:07:24
|
显示全部楼层
我又查了一下资料,希望对你又帮助
----------------------------------
The sleep mode operation is controlled by Layer 1. Before Layer 1 can write commands to the hardware to enter sleep mode, some sleep mode conditions need to be checked individually. The sleep mode prerequisites of RTOS and Layer 1 activities are checked in Layer 1. Additionally Layer 1 provides a interface for other software module or device driver that wants to inhibit the power saving function and keep the handset running in normal mode. The interface functions are provided in l1sm_public.h. The interface uses a sleep disable flag. When this flag contains a non-zero value, the system cannot enter sleep mode until it is cleared. For any software module that needs inhibiting the power saving mode shall firstly register and get a sleep mode handler from Layer 1. The API for this functionality is uint8 L1SM_GetHandle(void). Each sleep mode handler independently controls a bit of the Sleep Disable Flag. If a software module has already got a sm_handle from Layer 1 and wants to inhibit the handset from low power mode, it shall set the corresponding bit in sleep disable flag to disable low power mode. The API for this functionality is void SM_SleepDisable(sm_handle). Whenever a software module can enter low power mode, it shall clear the corresponding bit in sleep disable flag to enable the handset for low power operation again. The API for this functionality is void SM_SleepEnaable(sm_handle). A prerequisite to enter low power operation is that all sm_handles are enabled, not in disabled state. If there are one or more software modules in sm_disable state, the handset will not enter low power mode.
Regarding Layer 1 software control for sleep mode operation, it follows the control scenario of MT6205B slow clock unit, and MT6205B data sheet [1] can be referenced for detail information. In l1d_data.h, 2 customer-defined constants are declared to optimize sleep mode performance. The first constant is “FM_DURATION_DEFAULT”. Due to the inaccuracy of 32KHz oscillator, compared with the 13MHz oscillator, we need to calibrate the frequency error before entering sleep mode. “FM_DURATION_DEFAULT” is about the time interval to perform frequency measurement operation. The actual time interval to perform frequency measurement is 2*( FM_DURATION_DEFAULT +1) 32KHz cycles. If “FM_DURATION_DEFAULT” gets larger, the frequency measurement result will be more reliable and the power consumption will increase because of the frequency calibration process. The second constant to optimize sleep mode performance is the “CLK_SETTLE_DEFAULT”, the default off-chip VCXO settling duration. We need to program it to wakeup 13MHz clock and make sure that 13MHz clock has reached a stable amplitude and frequency before the time of expected wakeup point. The settle time is related to the chip and board circuits design. A typical value is from 3-6ms.
---------------------------------- |
|