The first time that pxa300 + wince5 supend uses USB wake up, the ActiveSync connection fails.

Source: Internet
Author: User
Tags unsupported

Hardware environment:
CPU: Marvell pxa300 x scale processor 624 MHz
System memory/Ram: Mobile DDR/16bit 64 Mbyte
Nand flash: NAND Flash/16bit 128 Mbyte
Power Management with touch screen controller chip: Dialog da9034
System: wince 5
After pressing the power button on my PDA for the first time and entering the suspend mode, I will wake up (power button or plug USB) and immediately enter the systemidle. if the source is USB, the USB cannot be connected successfully, then, the system enters the suspend and then wakes up. The system does not immediately enter the systemidle mode,

The problem is described as follows:
Procedure:
1. Power on, start and enter the wince Desktop
2. Press the power button to enable system enter suspend mode.
3. Press the power button again to make the system wake up. During this process, the screen will be white for several seconds (about 3 ~ 5S), the desktop is displayed after, but the screen is dimmed immediately. Serial Port information is displayed:
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. then press the power button to make the system suspend and wake up. The wake up time is obviously shorter than the first time, and the screen will not be dimmed immediately. Serial Port information:
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'
------------------------------------------------
The second operation:
1. Power on, start and enter the wince Desktop
2. Press the power button to enable system enter suspend mode.
3. insert USB cable (the other end of UAB is connected to the PC) to enable system wake up. During this process, the screen will be white screen for several seconds (about 3 ~ 5S), then display the desktop, but the screen immediately dimmed. At this time the USB connection pop-up window stays in the "connectting to host" screen, activsync is not connected successfully.
Serial Port information display:
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. Power off the system again (or reset the button for Reset), and press the power button to enable system enter suspend mode.
Press the power button again to make system wake up,
5.
Then press the power button to insert the system suspend into the USB wake up. The time of the wake up is obviously shorter than that of the first time, and the screen will not be dimmed immediately. The activsync connection is successful!
Serial Port information:
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: inclued set_op
Oalioctlipm: Next XL = 16, HSS = 1
Oalioctlipm: inclued 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

What system will immediately enter systemidle after the first access to suspend wakeup and the USB will not be able to be connected if it is awakened successfully?

I later made an experiment and called the systemidletimerreset () function after the PWM: pbt_resume in pwrbutton. C. But the result is the same. The first time, the system will immediately enter sustemidle.

Case pbt_resume:
{
Retailmsg (1, (text ("PWM: pbt_resume/R/N ")));
Systemidletimerreset (); // prevent systemidle

....

}

 

========================================================== ====================

Date: 2008-12-03 update

Update.

1. I did an experiment yesterday, removed the sdhc function, and re-compiled the system. The results were not improved.

2. This morning, the pwrbutton. C is restored to the original BSP with the power button suspend failure, but it can be awakened.

Steps:

1) power on, start the system, enter the suspend mode from the Start menu, and then press the power button to wake up. This time, the system does not enter the sustemidle, but it takes a long time to wake up,

Serial Port information:

[Sdh1:] sdh_iocontrol: Entering D3/d4...
Backlight_set 1
[Bkl1] Notify IPM ready for processor state for driver-84213757
PWM: pbt_transition to system power State [flags: 0x200000]: 'suspend'
Oemiocontrol: Unsupported code 0x1010024-device 0x0101 func 9
Oalioctlipm: inclued set_op
Oalioctlipm: Next XL = 24, HSS = 2
Oalioctlipm: inclued set_op
Oalioctlipm: Next XL = 24, HSS = 2
Sa2video: power_ioctl 3
Sa2video: set_power_state 4, original state 1 xllplcdsuspend
Suspend_graceful
Xllplcdsuspend-
Oalioctlhalpresuspend
Sa2video: powerhandler 1gcu suspend!
+ Touch panel power handler start
-Touch Panel power handler end
[MMC] SDH: + sdh_powerdown
Buzzer-powerdown
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

-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
Buzzer-powerup
[MMC] SDH: + sdh_powerup
Sa2video: powerhandler 0 + touch panel power handler start
-Touch Panel power handler end
Battery DRIVER: batterypddresume
[Sdh1:] sdh_iocontrol: Entering d0.0...
Backlight_set 95-32
[Bkl1] Notify IPM ready for processor state for driver-84213757
PWM: pbt_transition to system power State [flags: 0x10000]: 'on'
[Stuart]: Running y IPM that do not enter d0cs
[Sdh1:] fsimulatecardinsertion
[Bkl1:] MINOP set/release failed
Sa2video: power_ioctl 0
Sa2video: set_power_state 1, original state 4 lcdinitcontrollercommon lccr1 0x000
0013f @ 0x00430000
[Stuart]: ipm_setminop failed (enipmretstatus = 3)
Oalioctlipm: inclued set_op
Oalioctlipm: Next XL = 16, HSS = 1
Oalioctlipm: inclued set_op
Oalioctlipm: Next XL = 16, HSS = 1
Oalioctlipm: inclued set_op
Oalioctlipm: Next XL = 16, HSS = 0
Oalioctlipm: inclued set_op
Oalioctlipm: Next XL = 16, HSS = 0
PWM: pbt_resume
PWM: Set system status on
PWM: pbt_transition to system power State [flags: 0x10000]: 'on'
Oemiocontrol: Unsupported code 0x1010024-device 0x0101 func 9
Time: --- ds2781 voltage: 3441 MV --- ds2781 current:-194 Ma
Oemiocontrol: Unsupported code 0x1010024-device 0x0101 func 9
Time: --- ds2781 voltage: 3441 MV --- ds2781 current:-172 Ma

2) Enter suspend from the menu and press the power button to wake up. The wake-up time is very short and no white screen is displayed. Serial Port information:

Oemiocontrol: Unsupported code 0x1010024-device 0x0101 func 9
Gcu reset! Time: --- ds2781 voltage: 3441 MV --- ds2781 current:-172 Ma
[Sdh1:] sdh_iocontrol: Entering D3/d4...
Backlight_set 1
[Bkl1] Notify IPM ready for processor state for driver-84213757
Sa2video: power_ioctl 3
Sa2video: set_power_state 4, original state 1pwm: pbt_transition to system power
State [flags: 0x200000]: 'suspend'
Xllplcdsuspend
Suspend_graceful
Xllplcdsuspend-
Oalioctlipm: inclued set_op
Oalioctlipm: Next XL = 24, HSS = 2
Oalioctlipm: inclued 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
Buzzer-powerdown
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
-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
Buzzer-powerup
[MMC] SDH: + sdh_powerup
Sa2video: powerhandler 0 + touch panel power handler start
-Touch Panel power handler end
Battery DRIVER: batterypddresume
[Sdh1:] sdh_iocontrol: Entering d0.0...
Backlight_set 95-32
[Bkl1] Notify IPM ready for processor state for driver-84213757
Sa2video: power_ioctl 0
Sa2video: set_power_state 1, original state 4 lcdinitcontrollercommon lccr1 0x000
0013f @ 0x00430000
PWM: pbt_transition to system power State [flags: 0x10000]: 'on'
[Stuart]: Running y IPM that do not enter d0cs
[Sdh1:] fsimulatecardinsertion
PWM: pbt_resume
PWM: Set system status on
PWM: pbt_transition to system power State [flags: 0x10000]: 'on'
Oalioctlipm: inclued set_op
Oalioctlipm: Next XL = 16, HSS = 1
Oalioctlipm: inclued set_op
Oalioctlipm: Next XL = 16, HSS = 1
Oalioctlipm: inclued set_op
Oalioctlipm: Next XL = 16, HSS = 0
Oalioctlipm: inclued set_op
Oalioctlipm: Next XL = 16, HSS = 0

3) power-off, power-on, start the system, enter suspend from the Start menu, and insert USB cable to wake up. Although the system does not enter the systemidle, the connection fails, and the "connectting to host" window stops, in this case, the machine is easy to die.

 

========================================================== ==============

2008-12-04 update

The problem has been solved:

I carefully observe the serial port information. The first time I woke up, it took time to get stuck in the white screen.

[Bkl1:] MINOP set/release failed

I tracked the code and found it in backlight. CPP has the backlightsetstate function. Each time suspend and resume call this function, ipm_policy (is_on) during the first wake up; error code 3: ipm_status_read_time_out is returned, that is to say, it takes a long time to exit when the call fails. I have not figured out why the call fails. It will also be called when the power-on initialization and suspend is enabled.Ipm_notify (is_on );All of them are successful, and only the first wake up will fail.

I just need to change the delay exit time to a small value. The first time I woke up, no matter whether it was power button wake-up or USB wake-up, it would not enter systemidle, and USB activsync could be connected.

The code for the two functions is as follows:
Bytes ----------------------------------------------------------------------------------------------------------

BoolBacklightsetstate(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 ));

Bool is_on = is_state_on (State );

Backlight_set (is_on );
Ipm_notify (is_on );// Here an error is returned

Return true;
}

Static voidIpm_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;

Nkdbuplintfw (_ T ("[bkl1] Notify IPM ready for processor state for driver % d/R/N"), ipm_client_id );
If (ipm_policyreadyforprocstate (ipm_client_id, dwprocstate, 3000) = ipm_status_success)
{
// Nkdbuplintfw (_ T ("[bkl1] Notify IPM ready for processor state for driver completed/R/N "));
}
Else
Nkdbuplintfw (_ 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); // cyh mask
// 2008-12-04,
// System first time enter systemidle and wake up
// In this satuation, when wake up, will return "MINOP set/release failed 3", it mean failed, and will have a delay (3000 ),
// This will make System Enter "systemile", USB ActiveSync fail if the wake up source is USB.
// In order to solve this issule, here make the delay 30,
Ret = ipm_setminop (ipm_client_id, ipm_op_104mhz, 30); // cyh add to solve the Fisrt time USB as resume source, ActiveSync fail issule
Else
Ret = ipm_releaseminops (ipm_client_id, 1000 );

If (ret = ipm_status_success)
{
// Nkdbuplintfw (_ T ("[% s] MINOP set/release success! /R/N "), pcontroller-> szname );
} Else
Nkdbuplintfw (_ T ("[bkl1:] MINOP set/release failed % x/R/N"), RET );
}

Summary:

[Bkl1:] MINOP set/release failedI found out this error at the beginning, that is, I did not go into details, but turned my head to find a method to prohibit the system from entering systemidle. I used the systemidletimerreset () function, which does not work yet, I removed the sdhc driver again to see if it was caused by SD, Because SD will return an error.

"Setdevicepower: Wrong return value from 'sdh1: ', returning error_gen_failure"

The removal of sdhc does not work, so we can trace it back.[Bkl1:] MINOP set/release failedIt took four days to locate the problem. If the goal was clear at the beginning, do not try to troubleshoot the problem one by one. I want to solve the problem faster. the cause of this problem has not been further explored and can be solved for the time being. I will try again later.

In addition, you should carefully check the problem and find out where there is an exception. For example, this problem is the problem of time consumption.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.