Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

How do I hard reset a Raspberry Pi?

Obviously you can power cycle, but is there a more subtle way, like a reset pin? It would be very useful to connect a watchdog in case the Raspberry Pi crashes (mine crashed last night).

EDIT: The rev 2.0 board has a header you can connect a reset switch to.

share|improve this question
add comment

2 Answers 2

up vote 46 down vote accepted

You can use the BCM2708's hardware watchdog.

To use it begin by loading the module:

sudo modprobe bcm2708_wdog

Then edit the /etc/modules file:

sudo nano /etc/modules

and add the following line:

bcm2708_wdog

Next you will need to setup the watchdog daemon.

Install and confiigure it to start on bootup:

sudo apt-get install watchdog chkconfig
chkconfig watchdog on
sudo /etc/init.d/watchdog start

Next configure watchdog:

sudo nano /etc/watchdog.conf
# Uncomment the line watchdog-device = /dev/watchdog

The watchdog daemon will send /dev/watchdog a heartbeat every 10 seconds. If /dev/watchdog does not receive this signal it will restart your Raspberry Pi.

This can be useful if you are accessing your Pi remotely, and it dies or locks up. However, this is not the preferred method of restarting the system, but can be used to restart a locked system, where the only other option is to remove power from the device. Be warned that this can result in filesystem damage that could prevent the Pi from booting and operating correctly.

More info including a method to test this setup can be found in Gadgetoid's blog post Who watches the watcher?. Binerry's tumblr post Raspberry Pi Watchdog Timer should also be a must read.

share|improve this answer
3  
This is a wonderful answer! Not only does it explain how to hard reset the Raspberry Pi but it also answers how to setup a watchdog. –  Bryan Dunsmore Aug 2 '12 at 4:43
    
@Steve Excellent answer and I intend to follow these steps right now. Quick off topic question though, if you Pi does lockup for whatever reason what options are available to restart the Pi WITHOUT the risk of filesystem damage? –  Dan B Sep 10 '12 at 15:29
1  
@DanB I am not sure there are any, but you may want to post that as a question so the rest of the community has a chance to see it and respond. –  Steve Robillard Sep 10 '12 at 18:01
    
@DanB: The only way to restart Pi without the risk of file system damage is to be sure there are no write opened files before restart. One way of achieving this is to have most of the system run from RAM disk. Then watchdog restart is file system safe. Also, if your application is not hung, you can always "sudo reboot". –  avra Nov 22 '12 at 9:45
add comment

There is not a conventional reset pin. As in that there is no pin or button to push. Instead you can do the following as stated in this post on the Raspberry Pi forums.

Tap a 3K3 resistor between TP2 (ground) and the SoC end of R15. This works even in the new halt state. (The resistor is just to avoid shorting the 3V3 rail if you hit the wrong end. Anything from 1K to 33K will be fine.)

share|improve this answer
    
This is marked as the RUN pin on the schematic. I have seen people wondering whether it's function was RESET or some sort of suspend. –  John La Rooy Aug 2 '12 at 4:41
    
I haven't seen the schematics or have any experience in electronic boards so I can't say for sure whether this is the RUN pin. –  Bryan Dunsmore Aug 2 '12 at 4:44
    
schematic in all it's unsearchable glory is over here raspberrypi.org/wp-content/uploads/2012/04/… –  John La Rooy Aug 2 '12 at 5:29
    
The RUN pin is at F9 on the first sheet –  John La Rooy Aug 2 '12 at 5:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.