CuiCuiYH
驱动牛犊
驱动牛犊
  • 注册日期2007-09-03
  • 最后登录2009-06-26
  • 粉丝0
  • 关注0
  • 积分22分
  • 威望115点
  • 贡献值0点
  • 好评度6点
  • 原创分0分
  • 专家分0分
阅读:2678回复:6

PXA300+WINCE5 第一次supend->USB wake up 后,activesync 无法连接问题,已解决

楼主#
更多 发布于:2008-12-01 09:58
  
请教大家,我的PDA 第一次按power button进入suspend模式之后再唤醒(power button 或者plug usb)后会立刻进入到systemidle,此时若唤醒源为usb则,usb不能连接成功,之后再使系统进入suspend再唤醒不会立刻进入systemidle模式,
硬件环境:
CPU:    Marvell PXA300 XScale Processor 624MHz
System Memory/RAM:    Mobile DDR/16Bit 64Mbyte
NAND FLASH:    NAND Flash/16Bit 128MByte
Power Management with Touch Screen controller chip:    Dialog DA9034
SYSTEM: WINCE 5

问题详细描述如下:
操作步骤:
1.上电,启动进入WINCE桌面
2.按power button 使system enter suspend mode
3.再次按Power button 使system wake up ,此过程中屏幕会白屏数秒(大概3~5s),之后显示桌面,但屏幕马上变暗.串口信息显示:
PWM: PBT_RESUME
PWM: Set System status ON
read DA9034 reg event C=0x0
read DA9034 reg event D=0x0
PWM: Waiting for PM state transition notification
CYH PWM: PBT_TRANSITION to system power state [Flags: 0x0]: 'systemidle'
4.此后再按下power button 使系统suspend 和wake up ,wake up得时间明显比第一次短,而且不会出现屏幕马上变暗,串口信息:
PWM: PBT_RESUME
PWM: Set System status ON
read DA9034 reg event C=0x0
read DA9034 reg event D=0x0
PWM: Waiting for PM state transition notification
CYH PWM: PBT_TRANSITION to system power state [Flags: 0x10000]: 'on'
------------------------------------------------
第二种操作情况:
1.上电,启动进入WINCE桌面
2.按power button 使system enter suspend mode
3.插入USB cable(UAB 另一端与PC相连)使system wake up ,此过程中屏幕会白屏数秒(大概3~5s),之后显示桌面,但屏幕马上变暗.此时usb连接得弹出窗口停留在"Connectting to Host"画面,activsync没有连接成功.
串口信息显示:
PWM: PBT_RESUME
PWM: Set System status ON
read DA9034 reg event C=0x0
read DA9034 reg event D=0x0
PWM: Waiting for PM state transition notification
CYH PWM: PBT_TRANSITION to system power state [Flags: 0x0]: 'systemidle'
read DA9034 reg sts A=0x5
read DA9034 reg sts B=0x1
read DA9034 reg EVENT_A=0x0
read DA9034 reg EVENT B=0x4
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x0
PWM: CYH Power State Flags:0x0
PWM: Waiting for PM state transition notification
AUTORAS:: Dialer notifies: [1] [Dialer Start]
4.重新给系统断电再上电(或者reset按钮 作reset),按power button 使system enter suspend mode
   再次按Power button 使system wake up ,
5.
此后再按下power button 使系统suspend 插入USB wake up ,wake up得时间明显比第一次短,而且不会出现屏幕马上变暗,activsync连接成功!
串口信息:
PWM: PBT_RESUME
PWM: Set System status ON
read DA9034 reg event C=0x0
read DA9034 reg event D=0x0
PWM: Waiting for PM state transition notification
CYH PWM: PBT_TRANSITION to system power state [Flags: 0x10000]: 'on'
read DA9034 reg sts A=0x5
read DA9034 reg sts B=0x1
read DA9034 reg EVENT_A=0x0
read DA9034 reg EVENT B=0x0
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x0
PWM: POWER_STATE_ON
CYH backlight_set 95-32
PWM: Waiting for PM state transition notification
Statll 0
AUTORAS:: Dialer notifies: [1] [Dialer Start]
gcu reset!OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=1
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=1
Posting WM_NETCONNECT(TRUE) message
AUTORAS:: Dialer notifies: [4] [Dialer Connected]
 
-------------------------------------------------
 DA9034 reg EVENT B bit4:USB_DEV
 
USB_DEV : USB device detection/removal caused a nIRQ to be generated
 
请问为什么系统第一次进入suspend wakeup后会立刻进入systemidle并且USB 唤醒得话也不能连接成功那?
 
 
   我后来作了个实验在pwrbutton.c 里得PWM: PBT_RESUME后调用了函数SystemIdleTimerReset();但是结果一样第一次还是会立刻进入sustemidle.
 
 
case PBT_RESUME:
                {
                    RETAILMSG(1, (TEXT("PWM: PBT_RESUME\r\n")));
   SystemIdleTimerReset();// prevent systemidle
 
 
这样得问题大家见过吗,能否给些建议谢谢!我把详细得串口信息发到附件里了.
学无止境
CuiCuiYH
驱动牛犊
驱动牛犊
  • 注册日期2007-09-03
  • 最后登录2009-06-26
  • 粉丝0
  • 关注0
  • 积分22分
  • 威望115点
  • 贡献值0点
  • 好评度6点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2008-12-01 10:12
附件传不上去,我贴到这里
---------------------------------------------------------------------------
1.以下是上电后第一次按下power button使系统进入supend,再按power button 使系统wake UP得信息

-------------suspend by press power button------------
[SDH1:] SDH_IOControl: Entering D3/D4...
backlight_set 1
[BKL1] Notify IPM Ready For Processor state for driver -84213756
CYH PWM: PBT_TRANSITION to system power state [Flags: 0x200000]: 'suspend'
read DA9034 reg sts A=0x4
read DA9034 reg sts B=0x0
read DA9034 reg EVENT_A=0x0
read DA9034 reg EVENT B=0x0
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x0
PWM: POWER_STATE_SUSPEND
PWM: Waiting for PM state transition notification
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=24, HSS=2
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=24, HSS=2
SA2Video::power_ioctl 3
SA2Video::set_power_state 4, original state 1XllpLCDSuspend
Suspend_Graceful
XllpLCDSuspend-
OALIoCtlHalPreSuspend
SA2Video::PowerHandler 1gcu suspend!
+Touch panel power handler Start
-Touch panel power handler End
[MMC] SDH: +SDH_PowerDown
GPIO - PowerDown
BUZZER - PowerDown
PWB_PowerDown
PWB_PowerDown-MiccoPreSuspend
Battery Driver::BatteryPDDPowerHandler
IMM_PowerDown...
FMD_PowerDown
Save Register Counter 19
g_SRAM_Start is :0xabb14000
Finish init save content
PWER::0x8000000f AD3ER:0x80000001
+OALKitlPowerOff
Call XllpPmEnterSleep

----------WAKE UP by power button---------------
-InitDebugSerial
Resume back from XllpPmEnterSleep
Wakeup Source 1027, AD3SR 0x1
+OALKitlPowerOn
OEMPowerOff(): to restart the RCOMP eval, and enable RCOMP interrupts
Return from OEMPowerOff
+FMD_PowerUp
[FMD] probe the flash successfully, index=2
[FMD] It is 1G 16bit Micron NAND
-FMD_PowerUp
IMM_PowerUp...
1-wire driver Sequent call of CreateFileMapping(MFPRMDB_SHARED_FILENAME)!
Battery Driver::BatteryPDDPowerHandler
PWB_PowerUp
BUZZER - PowerUp
GPIO - PowerUp
[MMC] SDH: +SDH_PowerUp
SA2Video::PowerHandler 0+Touch panel power handler Start
-Touch panel power handler End
[STUART]Close
[STUART]Open
ThreadRun IIR=c0
[UART]Modem interrupt
CBulPdd16550: #### ubModemStatus = 11 ####
CBulPdd16550: #### ubModemStatus = 10 ####
[SDH1:] SDH_IOControl: Entering D0...
backlight_set 95-32
[BKL1] Notify IPM Ready For Processor state for driver -84213756
Battery Driver::BatteryPDDResume
CYH PWM: PBT_TRANSITION to system power state [Flags: 0x10000]: 'on'
[SDH1:] fSimulateCardInsertion
read DA9034 reg sts A=0x5
read DA9034 reg sts B=0x0
read DA9034 reg EVENT_A=0x0
read DA9034 reg EVENT B=0x0
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x20
PWM: POWER_STATE_ON
CYH backlight_set 95-32
PWM: Waiting for PM state transition notification
[BKL1:] MinOP Set/Release FAILED
SA2Video::power_ioctl 0
SA2Video::set_power_state 1, original state 4LCDInitControllerCommon lccr1 0x000
0013f @ 0x00430000
SetDevicePower: Wrong Return Value from 'sdh1:', returning ERROR_GEN_FAILURE
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=1
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=1
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=24, HSS=2
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=24, HSS=2
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=1
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=1
PWM: PBT_RESUME
OALIOCtlIPM:  Received SET_OP
PWM: Set System status ON
    OALIOCtlIPM:  next XL=16, HSS=0
read DA9034 reg event C=0x0
OALIOCtlIPM:  Received SET_OP
read DA9034 reg event D=0x0
    OALIOCtlIPM:  next XL=16, HSS=0
PWM: Waiting for PM state transition notification
CYH PWM: PBT_TRANSITION to system power state [Flags: 0x0]: 'systemidle'
read DA9034 reg sts A=0x5
read DA9034 reg sts B=0x0
read DA9034 reg EVENT_A=0x0
read DA9034 reg EVENT B=0x0
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x0
PWM: CYH Power State Flags:0x0
PWM: Waiting for PM state transition notification
OEMIoControl: Unsupported Code 0x1010024 - device 0x0101 func 9
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x0

--------------------------------------------------------------------------------------------------------------------
2.以下是上电后首先按power button 使系统进入suspend ,通过插入USB cable唤醒系统的信息,此时USB 没有连接上(通过activsync).

------------suspend by press power button ----------------
[SDH1:] SDH_IOControl: Entering D3/D4...
backlight_set 1
[BKL1] Notify IPM Ready For Processor state for driver -84213756
CYH PWM: PBT_TRANSITION to system power state [Flags: 0x200000]: 'suspend'
read DA9034 reg sts A=0x4
read DA9034 reg sts B=0x0
read DA9034 reg EVENT_A=0x0
read DA9034 reg EVENT B=0x0
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x0
PWM: POWER_STATE_SUSPEND
PWM: Waiting for PM state transition notification
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=24, HSS=2
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=24, HSS=2
SA2Video::power_ioctl 3
SA2Video::set_power_state 4, original state 1XllpLCDSuspend
Suspend_Graceful
XllpLCDSuspend-
OALIoCtlHalPreSuspend
SA2Video::PowerHandler 1gcu suspend!
+Touch panel power handler Start
-Touch panel power handler End
[MMC] SDH: +SDH_PowerDown
GPIO - PowerDown
BUZZER - PowerDown
PWB_PowerDown
PWB_PowerDown-MiccoPreSuspend
Battery Driver::BatteryPDDPowerHandler
IMM_PowerDown...
FMD_PowerDown
Save Register Counter 19
g_SRAM_Start is :0xabb14000
Finish init save content
PWER::0x8000000f AD3ER:0x80000001
+OALKitlPowerOff
Call XllpPmEnterSleep

----------------plug usb to wake up system,but PDA can not connect with PC via activsync---------------

-InitDebugSerial
Resume back from XllpPmEnterSleep
Wakeup Source 1027, AD3SR 0x1
+OALKitlPowerOn
OEMPowerOff(): to restart the RCOMP eval, and enable RCOMP interrupts
Return from OEMPowerOff
+FMD_PowerUp
[FMD] probe the flash successfully, index=2
[FMD] It is 1G 16bit Micron NAND
-FMD_PowerUp
IMM_PowerUp...
1-wire driver Sequent call of CreateFileMapping(MFPRMDB_SHARED_FILENAME)!
Battery Driver::BatteryPDDPowerHandler
PWB_PowerUp
BUZZER - PowerUp
GPIO - PowerUp
[MMC] SDH: +SDH_PowerUp
SA2Video::PowerHandler 0+Touch panel power handler Start
-Touch panel power handler End
[STUART]Close
[STUART]Open
ThreadRun IIR=c0
[UART]Modem interrupt
CBulPdd16550: #### ubModemStatus = 11 ####
CBulPdd16550: #### ubModemStatus = 10 ####
[SDH1:] SDH_IOControl: Entering D0...
backlight_set 95-32
[BKL1] Notify IPM Ready For Processor state for driver -84213756
Battery Driver::BatteryPDDResume
CYH PWM: PBT_TRANSITION to system power state [Flags: 0x10000]: 'on'
[SDH1:] fSimulateCardInsertion
read DA9034 reg sts A=0x5
read DA9034 reg sts B=0x1
read DA9034 reg EVENT_A=0x0
read DA9034 reg EVENT B=0x0
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x20
PWM: POWER_STATE_ON
CYH backlight_set 95-32
PWM: Waiting for PM state transition notification
Statll 0
[BKL1:] MinOP Set/Release FAILED
SA2Video::power_ioctl 0
SA2Video::set_power_state 1, original state 4LCDInitControllerCommon lccr1 0x000
0013f @ 0x00430000
SetDevicePower: Wrong Return Value from 'sdh1:', returning ERROR_GEN_FAILURE
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=1
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=1
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=0
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=0
PWM: PBT_RESUME
PWM: Set System status ON
read DA9034 reg event C=0x0
read DA9034 reg event D=0x0
PWM: Waiting for PM state transition notification
CYH PWM: PBT_TRANSITION to system power state [Flags: 0x0]: 'systemidle'
read DA9034 reg sts A=0x5
read DA9034 reg sts B=0x1
read DA9034 reg EVENT_A=0x0
read DA9034 reg EVENT B=0x4
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x0
PWM: CYH Power State Flags:0x0
PWM: Waiting for PM state transition notification
AUTORAS:: Dialer notifies: [1] [Dialer Start]
gcu reset!OEMIoControl: Unsupported Code 0x1010024 - device 0x0101 func 9
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x0
PWM: PBT_POWERINFOCHANGE
PWM:    AC line status 0, battery flag 12, backup flag 255, 196608 levels
PWM: Waiting for PM state transition notification
OEMIoControl: Unsupported Code 0x1010024 - device 0x0101 func 9

----------------------------------------------------------------------------------------------------------------
3.以下是上电后首先按power button 使系统进入suspend 并按Power Button使系统wake up,
之后再按按power button使系统suspend,然后通过插入USB cable唤醒系统的信息,此时USB 可以连接成功(通过activsync)

---------------suspend system by press power button----------------
[SDH1:] SDH_IOControl: Entering D3/D4...
backlight_set 1
[BKL1] Notify IPM Ready For Processor state for driver -84213756
SA2Video::power_ioctl 3
SA2Video::set_power_state 4, original state 1XllpLCDSuspend
Suspend_Graceful
XllpLCDSuspend-
CYH PWM: PBT_TRANSITION to system power state [Flags: 0x200000]: 'suspend'
read DA9034 reg sts A=0x4
read DA9034 reg sts B=0x0
read DA9034 reg EVENT_A=0x0
read DA9034 reg EVENT B=0x0
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x0
PWM: POWER_STATE_SUSPEND
PWM: Waiting for PM state transition notification
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=24, HSS=2
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=24, HSS=2
OALIoCtlHalPreSuspend
SA2Video::PowerHandler 1gcu suspend!
+Touch panel power handler Start
-Touch panel power handler End
[MMC] SDH: +SDH_PowerDown
GPIO - PowerDown
BUZZER - PowerDown
PWB_PowerDown
PWB_PowerDown-MiccoPreSuspend
Battery Driver::BatteryPDDPowerHandler
IMM_PowerDown...
FMD_PowerDown
Save Register Counter 19
g_SRAM_Start is :0xabb14000
Finish init save content
PWER::0x8000000f AD3ER:0x80000001
+OALKitlPowerOff
Call XllpPmEnterSleep

------------------wake up system by plug USB cable,PDA can  connect with PC via activsync----------
-InitDebugSerial
Resume back from XllpPmEnterSleep
Wakeup Source 1027, AD3SR 0x1
+OALKitlPowerOn
OEMPowerOff(): to restart the RCOMP eval, and enable RCOMP interrupts
Return from OEMPowerOff
+FMD_PowerUp
[FMD] probe the flash successfully, index=2
[FMD] It is 1G 16bit Micron NAND
-FMD_PowerUp
IMM_PowerUp...
1-wire driver Sequent call of CreateFileMapping(MFPRMDB_SHARED_FILENAME)!
Battery Driver::BatteryPDDPowerHandler
PWB_PowerUp
BUZZER - PowerUp
GPIO - PowerUp
[MMC] SDH: +SDH_PowerUp
SA2Video::PowerHandler 0+Touch panel power handler Start
-Touch panel power handler End
[STUART]Close
[STUART]Open
ThreadRun IIR=c0
[UART]Modem interrupt
CBulPdd16550: #### ubModemStatus = 11 ####
CBulPdd16550: #### ubModemStatus = 10 ####
[SDH1:] SDH_IOControl: Entering D0...
backlight_set 95-32
[BKL1] Notify IPM Ready For Processor state for driver -84213756
SA2Video::power_ioctl 0
SA2Video::set_power_state 1, original state 4LCDInitControllerCommon lccr1 0x000
0013f @ 0x00430000
[SDH1:] fSimulateCardInsertion
Battery Driver::BatteryPDDResume
CYH PWM: PBT_TRANSITION to system power state [Flags: 0x10000]: 'on'
read DA9034 reg sts A=0x5
read DA9034 reg sts B=0x1
read DA9034 reg EVENT_A=0x1
read DA9034 reg EVENT B=0x4
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x0
PWM: POWER_STATE_ON
CYH backlight_set 95-32
PWM: Waiting for PM state transition notification
PWM: PBT_RESUME
PWM: Set System status ON
read DA9034 reg event C=0x0
read DA9034 reg event D=0x0
PWM: Waiting for PM state transition notification
CYH PWM: PBT_TRANSITION to system power state [Flags: 0x10000]: 'on'
read DA9034 reg sts A=0x5
read DA9034 reg sts B=0x1
read DA9034 reg EVENT_A=0x0
read DA9034 reg EVENT B=0x0
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x0
PWM: POWER_STATE_ON
CYH backlight_set 95-32
PWM: Waiting for PM state transition notification
Statll 0
AUTORAS:: Dialer notifies: [1] [Dialer Start]
gcu reset!OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=1
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=1
Posting WM_NETCONNECT(TRUE) message
AUTORAS:: Dialer notifies: [4] [Dialer Connected]
OEMIoControl: Unsupported Code 0x1010024 - device 0x0101 func 9
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=0
OALIOCtlIPM:  Received SET_OP
    OALIOCtlIPM:  next XL=16, HSS=0
read DA9034 reg EVENT C=0x0
read DA9034 reg EVENT D=0x0
学无止境
ziyun
驱动小牛
驱动小牛
  • 注册日期2003-07-28
  • 最后登录2009-05-31
  • 粉丝0
  • 关注0
  • 积分17分
  • 威望109点
  • 贡献值0点
  • 好评度20点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2008-12-01 14:30
我也有这样的问题,我发现是某些驱动在suspend,resume时要耗时去切换电源状态,我的板子上是wifi模块和tdmb模块,不知道你是怎么情况,要是你解决了上来说一下
CuiCuiYH
驱动牛犊
驱动牛犊
  • 注册日期2007-09-03
  • 最后登录2009-06-26
  • 粉丝0
  • 关注0
  • 积分22分
  • 威望115点
  • 贡献值0点
  • 好评度6点
  • 原创分0分
  • 专家分0分
地板#
发布于:2008-12-02 11:59
@ziyun

若system resume 后立刻进入systemidle,串口会打印出下面的错误信息:
[BKL1:] MinOP Set/Release FAILED
SetDevicePower: Wrong Return Value from 'sdh1:', returning ERROR_GEN_FAILURE

难道和这两个地方有关,另外我发现正常情况(resume后不立刻进入systemidle)和问题情况下的suspend 和resume时一些device的上电顺序也不一样.
学无止境
ziyun
驱动小牛
驱动小牛
  • 注册日期2003-07-28
  • 最后登录2009-05-31
  • 粉丝0
  • 关注0
  • 积分17分
  • 威望109点
  • 贡献值0点
  • 好评度20点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2008-12-02 13:19
你检查一下你的bkl驱动,powerset里面肯定有问题
CuiCuiYH
驱动牛犊
驱动牛犊
  • 注册日期2007-09-03
  • 最后登录2009-06-26
  • 粉丝0
  • 关注0
  • 积分22分
  • 威望115点
  • 贡献值0点
  • 好评度6点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2008-12-03 17:09
通过试验,改回到原来BSP 原始得pwrbutton.c得代码,发现即使wake up后不立刻进入systemidle ,usb第一次唤醒也不能连接成功.

所以我把问题得题目改了,
在backlight.cpp里函数BackLightSetState,第一次wake up时 IPM_notify(is_on); 会返回错误代码3:    IPM_STATUS_READ_TIME_OUT,
不明白为什么第一次醒来时会time out,上电启动初始化时也会调用IPM_notify(is_on); ,都是ok得,suspend 调用返回也是ok 得.
 下面是两个函数:
==============
BOOL BackLightSetState(DWORD dwContext, CEDEVICE_POWER_STATE state)
{
    // sets the backlight state (turns the backlight on and off)
  //  DEBUGMSG(ZONE_FUNCTION, (L"+BackLightSetState(0x%08x)\r\n", (DWORD) state));//CYH MASK
RETAILMSG(1, (L"+BackLightSetState(0x%08x)\r\n", (DWORD) state));//CYH ADD
    BOOL is_on = is_state_on(state);

    backlight_set(is_on);
    IPM_notify(is_on);

    return TRUE;
}


===========
static void IPM_notify(BOOL is_on)
{
    DWORD dwProcState;
    BOOL ret;

    if(is_on)
    dwProcState = IPM_PROCESSOR_RING_OSC_RDY |IPM_PROCESSOR_D0_RDY;
    else
        dwProcState = IPM_PROCESSOR_RING_OSC_RDY |IPM_PROCESSOR_D0_RDY
                      | IPM_PROCESSOR_D2_RDY | IPM_PROCESSOR_D1_RDY;

    NKDbgPrintfW(_T("[BKL1] Notify IPM Ready For Processor state for driver %d\r\n"),ipm_client_id);
    if (IPM_NotifyReadyForProcState(ipm_client_id, dwProcState, 3000) == IPM_STATUS_SUCCESS)
    {
    // NKDbgPrintfW(_T("[BKL1] Notify IPM Ready For Processor state for driver Completed\r\n"));
    }
    else
    NKDbgPrintfW(_T("[BKL1] Notify IPM Ready For Processor state for driver FAILED\r\n"));


    if(is_on)
        ret = IPM_SetMinOp(ipm_client_id, IPM_OP_104MHZ ,3000);
    else
        ret = IPM_ReleaseMinOp(ipm_client_id, 1000);

    if (ret == IPM_STATUS_SUCCESS)
    {
            NKDbgPrintfW(_T("[BKL1:] MinOP Set/Release OK!!CYH \r\n"));

        //NKDbgPrintfW(_T("[%s] MinOP Set/Release Success!\r\n"),pController->szName);
    } else
        NKDbgPrintfW(_T("[BKL1:] MinOP Set/Release FAILED %x CYH\r\n"),ret);
}
学无止境
CuiCuiYH
驱动牛犊
驱动牛犊
  • 注册日期2007-09-03
  • 最后登录2009-06-26
  • 粉丝0
  • 关注0
  • 积分22分
  • 威望115点
  • 贡献值0点
  • 好评度6点
  • 原创分0分
  • 专家分0分
6楼#
发布于:2008-12-04 10:42
问题解决了 ,就是这个地方第一次susoend 再resume时会发生错误,这个延时退出太长了,我把延时改小了,然后把其他得改动都恢复回去,第一次醒来就不会进入systemidle,而且醒来时间也很快了,唤醒后activsync也可以连接成功了.
  if(is_on)
        ret = IPM_SetMinOp(ipm_client_id, IPM_OP_104MHZ ,30);
在此感谢ziyun 的提示!谢谢!
学无止境
游客

返回顶部