locked
Raspberry PI - Wake Up from shutdown state RRS feed

  • Question

  • I'm after a solution for switching on and off the Raspberry Pi with a single button. I've managed to turn it off, but I am not able to turn it back on. 

    I've read in linux community that connecting the GPIO 3 to GND will start up the Raspberry if previously was shutdown from software. Basically I listen on GPIO 3 for button press to shut it down (button is connected to GPIO 3 and GND)  and I wanted to turn it on when same button is pressed.

    When I tried, it didnt work.

    After reading a litlle bit more I found out followings:

    So my question is:

    What can I do to wake up the Raspberry PI 3 Model B running Windows 10 IoT Core version 10.0.16299.19 by shorting GPIO 3 to GND?

    and secondary for my general knowledge:

    What power state does BeginShutdown method puts the Raspberry Pi in?








    • Edited by Alex Iordan Monday, November 13, 2017 8:07 AM typo
    Sunday, November 12, 2017 4:51 PM

All replies

  • Hello Alex,

    For shut down or wake up via GPIO pin, you can submit a suggestion through IoT Dashboard->Settings->Send feedback.

    >>>What power state does BeginShutdown method puts the Raspberry Pi in?

    It is Restart or Shutdown. For more information you can reference BeginShutdown method and its parameter ShutdownKind.

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 13, 2017 8:37 AM
  • OK, I will send the feedback.

    But let me check if understood correctly. It's not working due to bootcode.bin being Windows specific and therefor different than the Linux one. Right?

    While for the other, as I have just noted it seems that Raspberry PI is not put into a real shutdown.

    Can you point me to a page from MSDN (there are several on the subject) with the state the Raspberry PI enters after issuing the BeginShutdown(ShutdownKind.Shutdown)?



    • Edited by Alex Iordan Monday, November 13, 2017 11:54 AM typo
    Monday, November 13, 2017 11:52 AM
  • Hello Alex,

    >>>But let me check if understood correctly. It's not working due to bootcode.bin being Windows specific and therefor different than the Linux one. Right?

    You are right. It is different due to it comes as part of Windows 10 IoT Core image for RaspberryPi.

    >>>While for the other, as I have just noted it seems that Raspberry PI is not put into a real shutdown.

    Do you mean the LEDs?

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 14, 2017 8:04 AM
  • Hi Rita,

    Thank you for replies that were all on the subject.

    I placed the suggestion via Feedback. How can I monitor my suggestion whether will be implemented or not?

    Regarding the shutdown I cite Mike's answer from this link: https://social.msdn.microsoft.com/Forums/en-US/36b32bf5-f17d-4b2b-a605-8a16e4d5f901/what-is-the-right-way-to-shutdown-windows-10-iot?forum=WindowsIoT

    "We have reopened an investigation to look into fixing shutdown on Raspberry Pi. 

    And at the risk of sounding defensive ...

    Our Windows IoT development team built a Windows BSP for Raspberry Pi pretty much from scratch a couple of years ago. It was the first device we supported with Windows IoT Core. We took some shortcuts, particularly in areas where we couldn't find documentation or something just didn't work. We do not completely shutdown the Raspberry Pi device as each of you reported. We had trouble accessing the power rail firmware and settled on putting the device in a sleep state. 

    With our work on subsequent BSPs (I wish that hardware companies would build BSPs for their boards instead of relying on our smallish team - but if wishes were horses ...) we have learned quite a bit about SoC power and uboot and based on your feedback will revisit this issue. 

    Thanks for your feedback and support! 

    Mike"

    This is why I wonder which sleep state actually is actually the Raspberry PI put in.


    • Edited by Alex Iordan Tuesday, November 14, 2017 10:32 AM
    Tuesday, November 14, 2017 10:24 AM
  • Hello Alex,

    >>>I placed the suggestion via Feedback. How can I monitor my suggestion whether will be implemented or not?

    You can check the status in My feedback of Dashboard.

    As for sleep state issue, we are trying to contact @Mike and I'll inform you ASAP if there is any update.

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 15, 2017 7:11 AM
  • As a supplementary info.

    I asked on Raspberry PI firmware GitHub and they said I was supposed to see 10 times blinking of the ACT LED upon Shutdown (as sudo halt), whilst I can only count 7 (by using Windows Shutdown) ...

    https://github.com/raspberrypi/firmware/issues/900


    • Edited by Alex Iordan Wednesday, November 15, 2017 11:39 AM
    Wednesday, November 15, 2017 11:38 AM
  • Hello Alex,

    I get count 7 too. You can check this thread.

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, November 16, 2017 3:09 AM
  • I have also noticed the meaning of the 7 blinks, but in my eyes is just another argument in favor of the info that Raspberry PI is not shut down by the book, or at last not the same way as linux does.

    If just is not posibile, as Mike says , then not much more can be done...

    1. Maybe Mike know if there are any improvements on this issue.

    2. If not I, can only relay that someday someone might take into consideration the suggestion I entered via feedback, right?


    • Edited by Alex Iordan Thursday, November 16, 2017 12:03 PM
    Thursday, November 16, 2017 6:26 AM
  • Regarding bootcode.bin.

    I just received an answer from firmware forum that says bootcode.bin is the same for all platforms:

    "There is only one sequence of firmware releases (containing one bootcode.bin and the four start.elf variants), so Windows 10 IoT has to use them."

    https://github.com/raspberrypi/firmware/issues/900#issuecomment-344900519

    So it gets clear in my mind that once the Raspberry PI will get to the shutdown state advertised with 10 blinks of the ACT led, from that point on it will be able to boot-up by shorting GPIO3 to GND.

    How can we find out whether any progress has been made to properly shutdown the Raspberry PI?


    • Edited by Alex Iordan Thursday, November 16, 2017 12:12 PM
    Thursday, November 16, 2017 12:11 PM
  • Another update from the firmware forum:

    "On raspbian sudo halt results in 63 being written to the reset controller register and a watchdog reset being triggered. When bootcode.bin launches it checks for 63 in reset controller and enters a low powered halt state (before LAN, PLLs, clocks and power domains are enabled on the chip).
    It will flash the ACT LED ten times at this point, it will go to sleep and only a GPIO event will allow it to continue (or a chip reset through RUN pin).

    If you are not seeing ten flashes on the ACT LED then we aren't entering this low powered halt state.
    Perhaps you should compare behaviour (and if it wakes up correctly) with raspbian.

    If Windows 10 IoT does not enter the low powered halt state then you will need to ask the question there - modifying the firmware won't help."

    https://github.com/raspberrypi/firmware/issues/900#issuecomment-344926584

    Thursday, November 16, 2017 1:59 PM
  • There are a number of battery/UPS solutions out for RPi that even have the ability to "wake" the RPi at periodic intervals. Using a periodic wake up and then shut down to low power is used for scientific data logging projects designed to operate on battery power for extended periods of time out in the wilderness.

    So it seems pretty clear that Windows 10 IoT shutdown is not leaving the RPi 3 in the correct lower power shutdown state and will still be consuming significant power. This means that any attempt to use a battery to power the RPi will produce unacceptable results as the battery will continue to drain at a high rate when the RPi should be in low power halt state after shutdown. Unless and until the shutdown can be confirmed to actually place the RPi in low power HALT state, using a battery for a power source will be a very poor use case for Windows 10 IoT Core.

    Thursday, November 16, 2017 8:19 PM
  • I put a ChargeDoctor USB voltage and current monitor on the USB power cable to check the RPi 3.

    Windows 10 IoT boot up power usage peaks at about 0.6A @ 5.1V. After booting the current drops to 0.3A. After issuing shutdown from IoT Dashboard, current increases to 0.5A and then drops down to 0.07A. ACT LED blinks 7 times, then pauses then repeats.

    I'm installing NOOBS and Raspbian next and will test that. I'll post my test results in a few minutes.


    • Edited by mjmeans Thursday, November 16, 2017 9:17 PM typo
    Thursday, November 16, 2017 9:04 PM
  • So I tested with Raspbian running NOOBS. When booting power peaks at 0.7A. After booting, power stabilizes at 0.3A. After issuing shutdown current peaks at 0.6A. When shut down, the current drops to 0.07A. Boot time for NOOBS to Raspbian was 30 seconds. It shuts down in 10 seconds. Just as the screen goes blank (about 5 seconds after issuing shutdown), the LED blinks 10 times with the final ON blink being longer. Then the ACT light shuts off and remains off.

    So it seems that even though Widows 10 IoT Core doesn't enter the HALT state in the same way, the power usage after shutdown is equivalent to the Raspbian produced low power state.

    I don't know how to install Raspbian without using NOOBS (and I don't want to know), so I won't test that. Perhaps someone else can.

    Thursday, November 16, 2017 9:49 PM
  • Hello mjmeans,

    I installed Raspbian without NOOBS. Simply download the image file and use a image writing tool to install on the SD card. You can reference this tutorial.

    I can test the current without a USB power meter.

    I want to describe what I see of the shut down process:

    1. The screen goes blank almost simultaneously when issuing shut down.
    2. Also almost simultaneously, the ACT LED blinks 10 times with the final ON blink being longer and then remains off.

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 17, 2017 6:41 AM
  • Hello Alex,

    Sorry for failing contact Mike.

    If you have submitted a feedback, you may need wait for update.

    Or you can open an issue on github.

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 17, 2017 7:26 AM
  • I opened an issue there: [Windows 10 IoT Core] Raspberry PI 3 Model B - OS Shutdown does not put device into right state

    But there doesn't seem to be so much activity....

    Monday, November 20, 2017 3:04 PM
  • Hello Alex,

    I saw the issue and thanks for your job. It may need a little more time.

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 21, 2017 7:17 AM
  • I too am looking for a solution for this so I can have a single power button for both shutdown and restart through GPIO.  Is this still being actively looked into?
    • Edited by pgrigs Thursday, June 28, 2018 10:45 PM
    Thursday, June 28, 2018 10:33 PM