Real reboot of RaspberryPI

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
mutex
Member
Member
Posts: 131
Joined: Sat Jul 07, 2007 7:49 pm

Real reboot of RaspberryPI

Post by mutex »

Hi,

I have been running my OS on RaspberryPI for some time... Though i have one problem;

Usb power port is almost worn out because of rebooting.. Need to manually unplug power and connect again to do a REAL reboot and not just a reset.

Is there any way to make the video core os perform a reboot trough the mailbox interface? (or something else). I want to restart the entire process like poweroff/on would do starting from ROM, then doing SD-card boot process..

regards
Thomas
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Real reboot of RaspberryPI

Post by Combuster »

1: cut usb cable
2: add switch
3: ...
4: profit
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
mutex
Member
Member
Posts: 131
Joined: Sat Jul 07, 2007 7:49 pm

Re: Real reboot of RaspberryPI

Post by mutex »

I was thinking something a little bit more fancy.. =D>
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Re: Real reboot of RaspberryPI

Post by jnc100 »

You can connect a switch across P6.

I didn't have one to hand so soldered a small patch cable in one of the holes, and briefly touch the other one with the other end of the cable to cause a reset.

Regards,
John.
User avatar
Velko
Member
Member
Posts: 153
Joined: Fri Oct 03, 2008 4:13 am
Location: Ogre, Latvia, EU

Re: Real reboot of RaspberryPI

Post by Velko »

You can utilize RasPi's Watchdog timer for that. Enable it and let it expire.

Watchdog was not documented in SOC datasheet, but there's an example on how to use it: Dwelch67's blinker06.
If something looks overcomplicated, most likely it is.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Real reboot of RaspberryPI

Post by bluemoon »

mutex wrote:Hi,

I have been running my OS on RaspberryPI for some time... Though i have one problem;

Usb power port is almost worn out because of rebooting.. Need to manually unplug power and connect again to do a REAL reboot and not just a reset.

Is there any way to make the video core os perform a reboot trough the mailbox interface? (or something else). I want to restart the entire process like poweroff/on would do starting from ROM, then doing SD-card boot process..

regards
Thomas
What is that "video core os"? If you meant the rpi supported OS, you can just run /sbin/reboot
If you're developing your own OS, just plug your usb cable into usb-transformer then into a wall socket with switch button.
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Real reboot of RaspberryPI

Post by iansjack »

A switch on the power supply works for me with my Pi. KISS.
User avatar
eino
Member
Member
Posts: 49
Joined: Fri Sep 16, 2011 10:00 am
Location: Finland

Re: Real reboot of RaspberryPI

Post by eino »

And if a power adapter with switch is not available I'm sure you can find an extension cord with a switch ;)
I'm Eino Tuominen from Finland, a web software dev learning low level stuff and reading / trying out kernel dev
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Re: Real reboot of RaspberryPI

Post by jnc100 »

The issue is that if you're debugging an OS on the Pi you probably have a USB to TTL cable connected to the board. If this is the case then the board draws its power directly from this rather than the USB port on the board, so if you need to repeatedly power cycle in this mode without constantly plugging/unplugging you need another means. I may have misunderstood the setup the OP was describing.

Regards,
John.
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Real reboot of RaspberryPI

Post by iansjack »

I think you have misunderstood the OP's issue
Usb power port is almost worn out because of rebooting.
Momentarily disconnecting the pin that carries power on a serial cable isn't going to damage the power port (or even the header it is connected to).
User avatar
mutex
Member
Member
Posts: 131
Joined: Sat Jul 07, 2007 7:49 pm

Re: Real reboot of RaspberryPI

Post by mutex »

The watchdog does only reset arm core. It does not invoke the video core bootloader which loads from SD etc.

I guess it would be no problem for Broadcom to implement the feature, but no documentation is availabe on it.

One option could be to preserve the second stage bootloader and the vector table etc. Then the reset trough watchdog could work. But if kernel crash and fucks up something in memory then it could potentially prevent the bootloader working.

I'll do some research on it.

Edit;

Actually looks like blinker6 is managing to reset it (vcore). Will give it a shot.

Regards
Thomas
Post Reply