Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
jwoegerbauer
Old
(Last edited by jwoegerbauer; 28th July 2011 at 07:29 PM.)
#1  
jwoegerbauer's Avatar
Senior Member - OP
Thanks Meter 134
Posts: 441
Join Date: Jul 2009
Location: Bavaria (Germany)
Default [REQ] Powermanagement utilities for CE 6,0 Core w/ ARM CPU needed

Hi all,

need for Windows CE 6.0 Core the following utilities in native code compiled for ARM CPU (because I don't have a compiler I could make the work by myself)

Suspend
ShutDown
DisplayOff
SoftReset
HardReset

as they already numerously exist for CE 5.0 Core

Reason: the CE 6.0 power management API has changed in comparison to CE 5.0, and the CE 5.0 related tools won't work anymore in CE 6.0.
For example, a SoftReset

in CE 5.0 usually was coded as

Code:
void SoftReset()
{
     KernelIoControl(IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, NULL);
}
and in CE 6.0 it now must be coded as

Code:
const int POWER_FORCE = 4096;
const int POWER_STATE_RESET = 0x00800000;

void SoftReset()
{
SetSystemPowerState(null, POWER_STATE_RESET, POWER_FORCE);
}
because IOCTL_HAL_REBOOT will have no effect if called from a user application
as stated here: http://blogs.msdn.com/b/ce_base/arch...ws-ce-6-0.aspx

Thanks in advance for helping!
 
jwoegerbauer
Old
#2  
jwoegerbauer's Avatar
Senior Member - OP
Thanks Meter 134
Posts: 441
Join Date: Jul 2009
Location: Bavaria (Germany)
~150 views, no reply: I'm disappointed. Really noone?
 
billounet
Old
#3  
Junior Member
Thanks Meter 0
Posts: 6
Join Date: May 2009
Quote:
Originally Posted by jwoegerbauer View Post
~150 views, no reply: I'm disappointed. Really noone?
Hi,
probably because your request is far away from the forum purpose, as Windows Mobile isn't windows ce. The only common part is the kernel.
Windows Mobile is based on Windows CE 5 kernel.

For Windows CE 6, the kernel has been reworked by MSFT and there is a clear split between the kernel mode and user mode memory area. So kernel is running in kernel space, and apps run in user mode area.
When calling KernelIoControl from an app, the thread has to migrate from the user mode to the kernel, so some validation is performed by the system before migrating, and especially the kernel calls. So you should find on your system a oalctl.dll which filter the allowed iocontrols calls from application.

One more point is the power management on the device is managed by the power manager, skipping calls to the power manager for power transistion will impact on the overal system power. The PM uses the registry to get its configuration, this config set how the system behave for the various system power state. Each driver power state is defined for each system power state.

You can override this from an application by requesting specific porwer state for a specific driver using SetPowerRequirement API.

Knowing this then you can implement your own app.

Billounet
 
jwoegerbauer
Old
(Last edited by jwoegerbauer; 4th August 2011 at 03:24 PM.)
#4  
jwoegerbauer's Avatar
Senior Member - OP
Thanks Meter 134
Posts: 441
Join Date: Jul 2009
Location: Bavaria (Germany)
@Billounet
Thx for reply. Wasn't what I really expected, namely getting some small exe files compiled to be used on PNAs (ARM CPU) based on Windows CE 6.0 Core - or at least 1 exe file which switches to the desired power state on given command line parameter.
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...