none
How to know which module triggered the Power manager to resume RRS feed

  • Question

  • Our device which run on WEC 7, features "sleep time"

    By using this code, we observed that at least the screen turns black for a second within our set value (i.e. 5 mins)

    CRegistryManager reg;

    reg.SetMainKey( _T("System\\CurrentControlSet\\Control\\Power") );
    reg.SetRegistryInt( _T("Timeouts"), _T("ACUserIdle"), nUserIdleSeconds );
    reg.SetRegistryInt( _T("Timeouts"), _T("ACSystemIdle"), nSystemidleSeconds );
    reg.SetRegistryInt( _T("Timeouts"), _T("ACSuspend"), nSuspendSeconds );
    // Force the system to reload the power settings from the registry.
    HANDLE hEvent = CreateEvent( NULL, FALSE, FALSE,_T("PowerManager/ReloadActivityTimeouts") );
    if (hEvent != NULL)
    {
    SetEvent( hEvent );
    CloseHandle( hEvent );
    }

    The problem is that it immediately resumes. Is there a faster way to look which module resumed the system? Thanks

    Friday, June 6, 2014 7:33 AM

All replies

  • Hi,

    If you have access to BSP then having a look at OEMPowerOff function might give some information.

    Regards,

    GSR

    Friday, June 6, 2014 11:47 AM
  • Set the PM debugzones to 0xFFFF and capture the debug output. It will tell you exactly what has caused your device to wakeup.

    Debug kernel + KITL is easiest.


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Sunday, June 8, 2014 11:49 PM
    Moderator
  • The simplest way is to build the BSP in debug mode and capture the debug log ...

    You can even enable kernel debugger and KITL and even use break points.

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com

    Monday, June 9, 2014 5:50 AM
  • Isn't that an exact repeat of what I said?

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Monday, June 9, 2014 5:51 AM
    Moderator