Valkyrie-MT
Posts: 3
Joined: Tue Aug 18, 2015 2:32 am

Hardware Watchdog timer from C# ?

Tue Aug 18, 2015 2:38 am

The Broadcom CPU has an integrated watchdog timer to automatically reboot the device if it hangs for any reason. Support for this is a "must" IMO for long term reliability. Does anyone know what the status of this is for Windows IoT ? I know it's available on the Linux side...

Thanks,
-Valkyrie-MT

fruitoftheloom
Posts: 18863
Joined: Tue Mar 25, 2014 12:40 pm

Re: Hardware Watchdog timer from C# ?

Tue Aug 18, 2015 6:15 pm

Valkyrie-MT wrote:The Broadcom CPU has an integrated watchdog timer to automatically reboot the device if it hangs for any reason. Support for this is a "must" IMO for long term reliability. Does anyone know what the status of this is for Windows IoT ? I know it's available on the Linux side...

Thanks,
-Valkyrie-MT
Maybe the MSDN Forums would be an alternative place to post your questions, after all Windows 10 IoT is MS Developed......

https://social.msdn.microsoft.com/forum ... WindowsIoT
adieu

My other Computer is an Asus CS10 ChromeBit
https://www.asus.com/uk/Mini-PCs/Chromebit-CS10

UndergroundFun
Posts: 44
Joined: Wed Jun 17, 2015 12:57 pm

Re: Hardware Watchdog timer from C# ?

Wed Aug 19, 2015 3:49 pm

It will reboot automatically on an error, I'm not sure if that's coming from the CPU or the OS.

The problem with that is that when you have a default start application, and it throws an unhandled error, it can cause it to reboot several times then hang. I've had it get into a state where I had to re-flash the microSD because it had an error on application load.

This is why while I'm testing now I leave the default app set to the default IoT application. That way if it throws an error it just drops back to that and I can debug or modify the application and redeploy.

rghubert
Posts: 11
Joined: Thu Sep 10, 2015 5:23 am

Re: Hardware Watchdog timer from C# ?

Sun Oct 25, 2015 2:22 pm

Do you know how to spin up your app/process automatically on boot without it being the default startup process or starting from VStudio? In fact, I'd like to spin up two additional procs upon reboot: my app and a watchdog for my app. Any tips appreciated!
Last edited by rghubert on Sun Oct 25, 2015 3:05 pm, edited 1 time in total.

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Hardware Watchdog timer from C# ?

Sun Oct 25, 2015 2:36 pm

See under IotStartup for adding Background apps on startup

https://ms-iot.github.io/content/en-US/ ... eUtils.htm
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Hardware Watchdog timer from C# ?

Sun Oct 25, 2015 2:39 pm

UndergroundFun wrote:The problem with that is that when you have a default start application, and it throws an unhandled error, it can cause it to reboot several times then hang. I've had it get into a state where I had to re-flash the microSD because it had an error on application load.

This is why while I'm testing now I leave the default app set to the default IoT application. That way if it throws an error it just drops back to that and I can debug or modify the application and redeploy.
Probably a very bad idea to develop against the Startup app. As you say, errors can be unrecoverable. Treat the Startup app as only for a v1.0 Release version and do your developing against something else as you say.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

rghubert
Posts: 11
Joined: Thu Sep 10, 2015 5:23 am

Re: Hardware Watchdog timer from C# ?

Sun Oct 25, 2015 8:38 pm

@ricl: Thanks, I see the diverse IotStartup commands and I tested several of them. I still don't see how to set up my headed (.exe) to run automatically at reboot without replacing the default startup program IoTCoreDefault. This IoTCoreDefault should remain the default startup app, if I have understood correctly, and my app should start as well, but how? Should I be defining it as a service and starting the service?

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Hardware Watchdog timer from C# ?

Sun Oct 25, 2015 9:49 pm

No. You can only replace the one headed startup application there is with your own.

Best not to do it with a development app, only a Release v.1.0. though :-)

You can start other things from the web interface though so all hope is not lost but that wont help you probably.

From the Web management portal
Apps
Provides install/uninstall functionality for AppX packages and bundles on your device.
Note that Windows 10 IoT Core only allows you to have one app running in the foreground at a time.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

Wojciechczyz
Posts: 1
Joined: Thu Jan 10, 2019 8:45 am

Re: Hardware Watchdog timer from C# ?

Thu Jan 10, 2019 9:10 am

Happy New Year!

I would like very much to be able to use hardware watchdog as well. The suggested software watchdog is good for many cases but not for mine. Here is why I need it:

I get several working Windows 10 Iot Core test machines that are rebooting daily at 7:00 AM. My Startup App is asking Windows nicely to do this. Now once in 1-2 months one of them does not boot up well. I have:

1. Perfect dedicated power supply of 3A 5V,
2. Perfect recommended Sandisk 16GB memory card,
3. Auto update Windows service disabled and stopped, as recommended in UWF documentation.
4. Universal Write Filter (UWF) enabled, so there are no writes to SD cards - except logs, as recommended in UWF documentation.

If I reboot such stuck machine I see that for some reason it still wanted to do something update related and failed. It seems like some Windows related bug.

So I want to prevent it with hardware watchdog. Ideally I would set it before reboot to lets say 15 minutes and upon my My Startup App running I would stop hardware watchdog. That way I could be sure all my boards will start and reboot if not ready in 15 minute bootup.

Again, I can reboot safely as there is no writes to SD, no updates etc.

Return to “Windows 10 for IoT”