Main Site Documentation

Restart Fez via C#


#1

Just a quick question.

Can I restart the Fez via software? For example, after finishing a loop, the program will restart the Fez and reload again the program.


#2

Yes you can reset using software but this is not the right way to solve your problem. You need to dispose pins when you are done using them or look more to find the error source


#3

Just found the problem.
LED = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.LED, true);

But can you still tell me how can I restart it remotely? :slight_smile:

I might really need it because their might be bugs when I release my project so an emergency remote restart will really be helpful. :smiley:


#4

interesting question, I am interested to know if there’s a “watchdog timer” concept since my Domino is going to be shoved under the stairs in a hard to get place!


#5

Walking trough the (less informative help files) i found some info about the watchdog :wink:

Not sure how it works.


#6

Hi Niels

the Reboot feature is in the Microsoft assembly. I don’t know if it’s work , but you have to check always both documentation or ask Mr. Google :smiley:

take a look here

http://msdn.microsoft.com/en-us/library/ee435764.aspx


#7

Hello everybody

What you are looking for is the WatchDog Timer , it’s used to restart the system in error cases. But I don’t know if Fez Domino use a WatchDog Timer in the GHI Software, I saw the lpc23xx user manual and I think it’s possble to make the WatchDog Timer by affecting Memory registers directly

I used to program Embedded Master of GHI like this:

//
// Watch Dog Timer Init
/
/

Register WDMOD = new Register(0xE0000000);
Register WDTC = new Register(0xE0000004);
Register WFEED = new Register(0xE0000008) ;
Register WDCLKSEL = new Register(0xE0000010) ;
Register PCLKSEL0 = new Register(0xE01FC1A8) ;
WDMOD.SetBits(0x03);
PCLKSEL0.SetBits(0x00000002);
WDCLKSEL.SetBits(0x00000001);
WDTC.Write(0x000000FF) ;
/***********************************************/

After that I use the commands:

WFEED.Write(0xAA);
WFEED.Write(0x55);

…in a part of the program to restart the system, I know that it works in the Embedded Master because I did it. But I haven’t use it in Fez Domino. A priori it has to work because it comes from the same microcontroller’s familly of the Embedded Master


#8

Please do NOT use register access to enable watchdog. We already support it in software so use the standard class