Discussion:
can not suspend in CE6
(too old to reply)
QQ Lll
2009-08-03 08:53:51 UTC
Permalink
Hi All,
my platform is pxa270, is migrating to CE6.
when I press power button and driver call to SetSystemPowerState(NULL,
POWER_STATE_SUSPEND, 0);

and I get some error message from debug port as following,
=============================================
Exception 'Data Abort'(4) Thread-Id=01d90002(pth=87ecd000) PC=8023edd8
BVA=e0e00000, dwInfo = 000000f5
R0=87ecd000 R1=81f6e704 R2=6000001f R3=ffffc800
R4=00000000 R5=000000fb R6=d004aba0 R7=00000000
R8=00000000 R9=00200000 R10=c028b5b4 R11=00000000
R12=8023edd8 SP=d04af2c4 Lr=8023edd8 Psr=6000001f
Exception 'Data Abort'(4) Thread-Id=01d90002(pth=ffffc634) PC=8020b954
BVA=e0e00000, dwInfo = 000000f5
R0=a1f623c0 R1=00004000 R2=0000000d R3=e0e00000
R4=81f17000 R5=81f623c0 R6=81f6c728 R7=81f6e704
R8=000000fb R9=00000064 R10=c028b5b4 R11=00000000
R12=00000000 SP=ffffc784 Lr=802097e0 Psr=40000093
Exception 'Data Abort' (4): Thread-Id=01d90002(pth=87ecd000), Proc-
Id=00400002(pprc=81f6c308) 'NK.EXE', VM-active=01920002(pprc=87ef93c0)
'udevice.exe'
PC=8020b954(NK.EXE+0x0000b954) RA=802097e0(NK.EXE+0x000097e0)
SP=ffffc784, BVA=e0e00000
ERROR: Power Handler function yield to low priority thread.
===============================================

Thanks for your suggestion in advance.
Dean Ramsier
2009-08-03 17:58:41 UTC
Permalink
The power handler message means that driver made a blocking call (e.g.
Sleep, WaitForSingleObject etc) in the PowerDown stream driver function, or
called another function that did that. Blocking calls are illegal in that
context so should be removed.

The Data Abort can probably be debugged by including the kernel debugger and
looking at the call stack when the abort occurs.
--
Dean Ramsier - eMVP
BSQUARE Corporation
Post by QQ Lll
Hi All,
my platform is pxa270, is migrating to CE6.
when I press power button and driver call to SetSystemPowerState(NULL,
POWER_STATE_SUSPEND, 0);
and I get some error message from debug port as following,
=============================================
Exception 'Data Abort'(4) Thread-Id=01d90002(pth=87ecd000) PC=8023edd8
BVA=e0e00000, dwInfo = 000000f5
R0=87ecd000 R1=81f6e704 R2=6000001f R3=ffffc800
R4=00000000 R5=000000fb R6=d004aba0 R7=00000000
R8=00000000 R9=00200000 R10=c028b5b4 R11=00000000
R12=8023edd8 SP=d04af2c4 Lr=8023edd8 Psr=6000001f
Exception 'Data Abort'(4) Thread-Id=01d90002(pth=ffffc634) PC=8020b954
BVA=e0e00000, dwInfo = 000000f5
R0=a1f623c0 R1=00004000 R2=0000000d R3=e0e00000
R4=81f17000 R5=81f623c0 R6=81f6c728 R7=81f6e704
R8=000000fb R9=00000064 R10=c028b5b4 R11=00000000
R12=00000000 SP=ffffc784 Lr=802097e0 Psr=40000093
Exception 'Data Abort' (4): Thread-Id=01d90002(pth=87ecd000), Proc-
Id=00400002(pprc=81f6c308) 'NK.EXE', VM-active=01920002(pprc=87ef93c0)
'udevice.exe'
PC=8020b954(NK.EXE+0x0000b954) RA=802097e0(NK.EXE+0x000097e0)
SP=ffffc784, BVA=e0e00000
ERROR: Power Handler function yield to low priority thread.
===============================================
Thanks for your suggestion in advance.
ce_developer
2009-08-04 01:27:39 UTC
Permalink
Post by Dean Ramsier
The power handler message means that driver made a blocking call (e.g.
Sleep, WaitForSingleObject etc) in the PowerDown stream driver function, or
called another function that did that.  Blocking calls are illegal in that
context so should be removed.
The Data Abort can probably be debugged by including the kernel debugger and
looking at the call stack when the abort occurs.
--
Dean Ramsier - eMVP
BSQUARE Corporation
Post by QQ Lll
Hi All,
my platform is pxa270, is migrating to CE6.
when I press power button and driver call to SetSystemPowerState(NULL,
POWER_STATE_SUSPEND, 0);
and I get some error message from debug port as following,
=============================================
Exception 'Data Abort'(4) Thread-Id=01d90002(pth=87ecd000) PC=8023edd8
BVA=e0e00000, dwInfo = 000000f5
R0=87ecd000  R1=81f6e704  R2=6000001f  R3=ffffc800
R4=00000000  R5=000000fb  R6=d004aba0  R7=00000000
R8=00000000  R9=00200000 R10=c028b5b4 R11=00000000
R12=8023edd8  SP=d04af2c4  Lr=8023edd8 Psr=6000001f
Exception 'Data Abort'(4) Thread-Id=01d90002(pth=ffffc634) PC=8020b954
BVA=e0e00000, dwInfo = 000000f5
R0=a1f623c0  R1=00004000  R2=0000000d  R3=e0e00000
R4=81f17000  R5=81f623c0  R6=81f6c728  R7=81f6e704
R8=000000fb  R9=00000064 R10=c028b5b4 R11=00000000
R12=00000000  SP=ffffc784  Lr=802097e0 Psr=40000093
Exception 'Data Abort' (4): Thread-Id=01d90002(pth=87ecd000), Proc-
Id=00400002(pprc=81f6c308) 'NK.EXE', VM-active=01920002(pprc=87ef93c0)
'udevice.exe'
PC=8020b954(NK.EXE+0x0000b954) RA=802097e0(NK.EXE+0x000097e0)
SP=ffffc784, BVA=e0e00000
ERROR: Power Handler function yield to low priority thread.
===============================================
Thanks for your suggestion in advance.- Hide quoted text -
- Show quoted text -
I also used to get this message saying Power Handler has yielded to
Low priority thread when I am connected to PB but if you do F5 it
should move ahead and may be you can see which thread blocked the
power handler.

Good Luck
ce.developer
Dark Knight
2009-08-04 02:41:10 UTC
Permalink
Post by ce_developer
Post by Dean Ramsier
The power handler message means that driver made a blocking call (e.g.
Sleep, WaitForSingleObject etc) in the PowerDown stream driver function, or
called another function that did that.  Blocking calls are illegal in that
context so should be removed.
The Data Abort can probably be debugged by including the kernel debugger and
looking at the call stack when the abort occurs.
--
Dean Ramsier - eMVP
BSQUARE Corporation
Post by QQ Lll
Hi All,
my platform is pxa270, is migrating to CE6.
when I press power button and driver call to SetSystemPowerState(NULL,
POWER_STATE_SUSPEND, 0);
and I get some error message from debug port as following,
=============================================
Exception 'Data Abort'(4) Thread-Id=01d90002(pth=87ecd000) PC=8023edd8
BVA=e0e00000, dwInfo = 000000f5
R0=87ecd000  R1=81f6e704  R2=6000001f  R3=ffffc800
R4=00000000  R5=000000fb  R6=d004aba0  R7=00000000
R8=00000000  R9=00200000 R10=c028b5b4 R11=00000000
R12=8023edd8  SP=d04af2c4  Lr=8023edd8 Psr=6000001f
Exception 'Data Abort'(4) Thread-Id=01d90002(pth=ffffc634) PC=8020b954
BVA=e0e00000, dwInfo = 000000f5
R0=a1f623c0  R1=00004000  R2=0000000d  R3=e0e00000
R4=81f17000  R5=81f623c0  R6=81f6c728  R7=81f6e704
R8=000000fb  R9=00000064 R10=c028b5b4 R11=00000000
R12=00000000  SP=ffffc784  Lr=802097e0 Psr=40000093
Exception 'Data Abort' (4): Thread-Id=01d90002(pth=87ecd000), Proc-
Id=00400002(pprc=81f6c308) 'NK.EXE', VM-active=01920002(pprc=87ef93c0)
'udevice.exe'
PC=8020b954(NK.EXE+0x0000b954) RA=802097e0(NK.EXE+0x000097e0)
SP=ffffc784, BVA=e0e00000
ERROR: Power Handler function yield to low priority thread.
===============================================
Thanks for your suggestion in advance.- Hide quoted text -
- Show quoted text -
I also used to get this message saying Power Handler has yielded to
Low priority thread when I am connected to PB but if you do F5 it
should move ahead and may be you can see which thread blocked the
power handler.
Good Luck
ce.developer
Hi,

I agree with Dean, you should not have any system calls in power up
and power down on a driver. If you have to, use them in the power
manager ioctl calls instead.So check the power up and power down of
the drivers and see if there are any system calls (including sleep).

Regards,
Vaisakh P S
Accord Software Systems Pvt. Ltd,
Bangalore
(http://devwince.blogspot.com)
QQ Lll
2009-08-04 12:30:53 UTC
Permalink
Thanks all of your comment.
I make an image which only included display, touch and powerbutton,
and check all of their power handler, it does not have Sleep or
WaitForSingleObject, but still same status. How can I do next?
SKM
2009-08-04 13:44:01 UTC
Permalink
Can you correct your call in driver that suspend Pxa270 platfrom by this call:
SetSystemPowerState(NULL,POWER_STATE_SUSPEND, POWER_FORCE);
Compile your driver now,makeimage.Try to suspend now,if it works that all
good.

If it doesn't work then you can implement an IST that calls
SetSystemPowerState to turn off Pxa270 platfrom with the help of Power
Manager.
Can refer Bruce's post on implementing IST.
Reference:http://geekswithblogs.net/BruceEitman/archive/2009/01/16/windows-ce-interrupt-service-thread-example.aspx

Regards
Muneer
Post by QQ Lll
Thanks all of your comment.
I make an image which only included display, touch and powerbutton,
and check all of their power handler, it does not have Sleep or
WaitForSingleObject, but still same status. How can I do next?
Tom Gensel (eMVP)
2009-08-04 16:31:29 UTC
Permalink
If I were you I'd insert some debug messages into my power handler
functions in those drivers (e.g. entry/exit and progress msgs) to
narrow down the area in which the problem is courring. It is still
evident that one of them must be calling another function that is
using a disallowed blocking call.

Tom Gensel (eMVP)
Post by QQ Lll
Thanks all of your comment.
I make an image which only included display, touch and powerbutton,
and check all of their power handler, it does not have Sleep or
WaitForSingleObject, but still same status. How can I do next?
Dean Ramsier
2009-08-04 17:23:44 UTC
Permalink
Do a debug build, and turn on the zones for device, then suspend. It should
tell you every device that it is calling, and you should be able to identify
the offender.
--
Dean Ramsier - eMVP
BSQUARE Corporation
Post by QQ Lll
Thanks all of your comment.
I make an image which only included display, touch and powerbutton,
and check all of their power handler, it does not have Sleep or
WaitForSingleObject, but still same status. How can I do next?
Loading...