WinCE7 freezes during restart


  • I created an image nk.bin from the BSP and I try to restart the windows CE 7. I've created an EXE file that contains the following code:

    [System.Runtime.InteropServices.DllImport("coredll.dll")] private static extern

    Int32 SetSystemPowerState(Char[] psState, Int32 StateFlags, Int32 Options);

    static void Main(string[] args) { const int POWER_STATE_RESET = 0x800000; SetSystemPowerState(null, POWER_STATE_RESET, 0); }

    As soon as I click on the EXE the windows freezes. I got image as a referance from the company that provided me the BSP and when I run the same EXE on it then it does restart.

    What's wrong with my image?

    Tuesday, April 23, 2019 6:56 AM

All replies

  • You do not seem to be looking at the result code from the call for one thing.  Are you sure the call is occurring?  Does the BSP handle this correctly?  Power management does require power aware drivers to work correctly.
    Tuesday, April 23, 2019 3:46 PM
  • EliranAB

    There are so many things that could be wrong with your image.  A few that I can think of:

    1. Your OS doesn't correctly support starting the reset
    2. Your bootloader doesn't handle reset
    3. Your RAM is corrupt with regard to variables expected to be good after reset
    4. And probably many other things so you really need to do some debugging which might include hardware tools like a scope or JTAG debugger.

    Work with your supplier.

    Bruce Eitman
    Senior Enginer
    Bruce.Eitman AT Synopsys DOT com
    My BLOG
    I work for

    Tuesday, April 23, 2019 4:31 PM