none
Configurable "Switch State to Suspend" Timeout Problem RRS feed

  • Question

  • Hi all,

    "Power" control panel application has configurable timeout values below:

    * Switch State to User Idle (1 minute)

    * Switch State to System Idle (2 minute)

    * Switch State to Suspend (3 minute)

    But our WinCE600 based device does not switch state to suspend after 6 minutes. Is there any known bug of PM public code corresponding to this problem? Is the responsible code with timeout operations only PM?

    Thanks a lot for your helps and explanations,

    Yasemin

    Wednesday, October 12, 2011 6:02 AM

Answers

  • There's no bug as far as I know. The fact that you're not going into suspend may depend from other reasons, for example:

    -OEMPowerOff in your BSP is a stub or it does not actually put the CPU in suspend

    -Your OS design includes the minimal PM catalog item where the PDD functions are stubbed

    -Some code is resetting the activity timers (see http://msdn.microsoft.com/en-us/library/ee497763.aspx)


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    • Marked as answer by yaseminyilmaz Thursday, October 13, 2011 6:06 AM
    Wednesday, October 12, 2011 6:55 AM

All replies

  • There's no bug as far as I know. The fact that you're not going into suspend may depend from other reasons, for example:

    -OEMPowerOff in your BSP is a stub or it does not actually put the CPU in suspend

    -Your OS design includes the minimal PM catalog item where the PDD functions are stubbed

    -Some code is resetting the activity timers (see http://msdn.microsoft.com/en-us/library/ee497763.aspx)


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    • Marked as answer by yaseminyilmaz Thursday, October 13, 2011 6:06 AM
    Wednesday, October 12, 2011 6:55 AM
  • Thanks a lot to you for your helps. Your explanation has been very helpful to find the problem. I've examined the PM default code and realized that PowerStateManager::m_dwCurSuspendTimeout counter is not decreased at all because of calling PowerStateManager::ResetSystemIdleTimeTimeout. When I've uncommented the calling of this function in the case of PM_SYSTEM_ACTIVITY_EVENT of PowerState::WaitForEvent, the counter has started to decrease. I've not written code resetting the activity timer. What do you advise for finding the code causing this?

     

     

                case PM_SYSTEM_ACTIVITY_EVENT:
                    if (m_pPwrStateMgr->GetSystemActivityTimer()) {
    
                        if (m_dwEventArray [ PM_SYSTEM_ACTIVITY_EVENT ] == m_pPwrStateMgr->GetSystemActivityTimer()->hevActive ) { // Active Signaled. Same State and Wait For Inactive
                            m_dwEventArray [ PM_SYSTEM_ACTIVITY_EVENT ] = m_pPwrStateMgr->GetSystemActivityTimer()->hevInactive;
                            //m_pPwrStateMgr->ResetSystemIdleTimeTimeout(FALSE); // User Activity will tread as System Actiivty
                            platEvent = SystemActivity ;
                        }
                        else  { // Inactive Signaled . Start to wait on Active.
                            ASSERT(m_dwEventArray [ PM_SYSTEM_ACTIVITY_EVENT ]  == m_pPwrStateMgr->GetSystemActivityTimer()->hevInactive);
                            m_dwEventArray [ PM_SYSTEM_ACTIVITY_EVENT ]  = m_pPwrStateMgr->GetSystemActivityTimer()->hevActive ;
    						
                            //m_pPwrStateMgr->ResetSystemIdleTimeTimeout(TRUE);
                            platEvent = SystemInactivity ;
                        }
                    }
                    break;
    
    


     



    Thursday, October 13, 2011 6:05 AM