i.MX53 not entering into System Idle Power State WINCE 7 VS 2008 RRS feed

  • Question

  • Hi,

    I am currently using the default PM from WINCE 7 in the BSP for i.MX53 from Adeneo. I have not make any changes to the default PM files (pwstates.h, pwstates.cpp, pwsdef.h, pwsdef.cpp and platform.cpp).

    My problem is setting the system power state to idle using SetSystemPowerState(NULL, POWER_STATE_IDLE, POWER_FORCE) from my application and change the settings in Platform.reg for the idle state to:

        "bkl1"=dword:4           ; D4
        "bkl1"=dword:4           ; D4

    The LCD backlight is not turning off when I change the state to idle using SetSystemPowerState(NULL, POWER_STATE_IDLE, POWER_FORCE). What could be causing this problem?

    If I call  instead SetSystemPowerState(NULL, POWER_STATE_SUSPEND, POWER_FORCE), the system goes into suspend mode. Also, I am able to turn off the backlight from my application using SetPowerRequirement(_T("BKL1:"),D4,POWER_NAME, NULL,0). But, I would like to change the system power state to idle and turn-off the backlight when the user press a button. I am able to do this for the suspend power state.

    Is there something I could be missing?


    David L.

    Thursday, July 2, 2015 7:47 PM


All replies

  • you need to modify the power management code of  back-light driver to handle the D4 event.

    Zebra @ TECHWARE MVP @ Windows Embedded CE

    • Proposed as answer by ZebraTW Saturday, July 4, 2015 4:04 AM
    • Unproposed as answer by DavidL83 Tuesday, July 7, 2015 3:15 PM
    Saturday, July 4, 2015 4:03 AM
  • Hi,

    Thank you for your answer. That is what I thought I was doing by modifying Platform.reg:

        "bkl1"=dword:4           ; D4
        "bkl1"=dword:4           ; D4

    to turn off the back-light when the system is in Idle state. Also, I can turn off the back-light using SetPowerRequirement(_T("BKL1:"),D4,POWER_NAME, NULL,0) which make me think that the back-light driver handles the D4 event.

    Do I am missing something? 

    Please help,

    David L.

    Sunday, July 5, 2015 4:16 PM
  • Hope this blog post shows some pointers to you.

    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.

    Tuesday, July 7, 2015 8:13 AM
  • Hi Vinoth,

    Thank you for your answer. It made some details about WINCE power management clear to me. I included virtual BOOL AppsCanRequestState() { return TRUE; } as suggested in the PowerStateSystemIdle class on the Pwstates.cpp file but using SetSystemPowerState(NULL, POWER_STATE_IDLE, POWER_FORCE) still does not work. On the other hand, SetSystemPowerState(NULL, POWER_STATE_USERIDLE, POWER_FORCE) works. Here is the PowerStateSystemIdle class:

    class PowerStateSystemIdle : public PowerState {
        PowerStateSystemIdle(PowerStateManager *pPwrStateMgr, PowerState * pNextPowerState = NULL )     
        :   PowerState(pPwrStateMgr,pNextPowerState)
        {;  };
        virtual void EnterState() {

            ((PowerStateManager *)m_pPwrStateMgr)->ReInitTimeOuts( );
        // This state does not need Resume Time out.
        virtual PLATFORM_ACTIVITY_EVENT  WaitForEvent(DWORD dwTimeouts = INFINITE , DWORD dwNumOfExternEvent = 0, HANDLE * pExternEventArray = NULL) {
            TIMEOUT_ITEM TimeoutItem;
            ((PowerStateManager *)m_pPwrStateMgr)->DisableUserIdleTimeout();
            ((PowerStateManager *)m_pPwrStateMgr)->DisableSystemIdleTimeout();
            DWORD dwTimeout = ((PowerStateManager *)m_pPwrStateMgr)->GetSmallestTimeout(&TimeoutItem);
            PLATFORM_ACTIVITY_EVENT activeEvent = PowerState::WaitForEvent(dwTimeout ,dwNumOfExternEvent, pExternEventArray) ;
            switch (activeEvent) {
                case UserActivity:
                    m_LastNewState = On;
                case Timeout: {
                    switch (TimeoutItem) {
                        case SuspendTimeout:
                            m_LastNewState = Suspend;
            return activeEvent;
        virtual DWORD  GetState() { return (DWORD)SystemIdle; };
        virtual LPCTSTR GetStateString() { return STRING_SYSTEMIDLE; };
        virtual DWORD StateValidateRegistry(DWORD /*dwDState*/ , DWORD /*dwFlag*/ ) {
            RETAILMSG(PM_RETAIL_EN, (TEXT("Entered PowerStateSystemIdle in pwstates  \r\n")));  
            return PowerState::StateValidateRegistry(2, POWER_STATE_IDLE );            
        virtual BOOL AppsCanRequestState() { return TRUE; }

    Is there something else I am missing?


    David L.

    Tuesday, July 7, 2015 3:30 PM
  • Hi David,

    Are you still running into issues?


    Adeneo Support team

    Tuesday, January 26, 2016 5:52 PM
  • Hi Adeneo,

    I was not able to use the System Idle mode but the User Idle mode worked for us without any issues.


    Miguel Lopez

    Tuesday, January 26, 2016 6:26 PM