3 Replies Latest reply on Feb 2, 2016 1:11 PM by N.Scott.Pearson

    Watchdog Timer Guidance

    VladimirAkopyan

      This question has been asked a dozen times:

      1. How to use the watchdog timer on the NUC
      2. Application watchdog
      3. https://intel-openport-v7.hosted.jivesoftware.com/message/362684#362684

       

      Please give me a link to a guide

      I cannot find a guidance that explains how to use a Watchdog Timer, either in Windows or Linux. I am not interested in discussion of a particular NUC model. I want general guidance on how to use it. What drivers are needed, what functions does one use, libraries. What programming languages can be used.  Does Intel have any documentation on the subject?

      I really can't find anything.

        • 1. Re: Watchdog Timer Guidance
          N.Scott.Pearson

          Vlad,

           

          While I was still working for Intel, I wrote an app-note and sample code showing how to use a Watchdog Timer to reset the system if it hangs. Unfortunately, because I retired and was not there to support it, the team at Intel chose not to publish it. I have asked then to let me release it (and support it) myself. I will let you know when they respond to this request...

           

          ...Scott

          1 of 1 people found this helpful
          • 2. Re: Watchdog Timer Guidance
            VladimirAkopyan

            Thanks for response Scott. Could you explain the general Idea though? Which one of the two is correct:

             

            1. Form this https://msdn.microsoft.com/en-us/library/ms855419.aspx I got the impression that Windows uses watchdog timer internally to reset the whole OS if the OS gets stuck, and the watchdog timer needs a driver. The OS itself kicks the dog as necessary unless it ends up in some corrupt state. 
              So since the system is always up, if you write your code as a windows service, then windows will always restart your code if it crashes. So then you get OS restarting if needed, and the application restarting if needed.
            2. You control and reset watchdog timer from your own application code. If the application gets stuck / crashes, the whole system gets reset.
            • 3. Re: Watchdog Timer Guidance
              N.Scott.Pearson

              There are, in fact, a whole bunch of watchdog timers available in the NUCs. Which are present depends upon which processor SOC is being used in a particular NUC model. Some exist in the Core SOCs that do not exist in the Atom/Celeron/Pentium SOCs, for example. There is a special watchdog timer that is used by the BIOS (and tools like XTU) to recover from unsuccessful overclocking operations (including XMP memory profile application). There is a TCO watchdog timer in the PCH functionality. There is a watchdog timer in the Management Engine. All of these can be used to cause a reset of the system.


              Separate from these, there is a watchdog timer in the Super I/O (SIO) ICs that are used (this is the IC that also provides such features as Consumer I/R). The various NUC models don't use the same SIO IC - or indeed even stick with the same manufacturer - but all of the SIO ICs used offer the same capability in this watchdog timer, namely the ability to power cycle the system - which is a much better reset. The SDK I put together consequently utilizes the SIO Watchdog timer. It includes support for all of the SIO ICs used in the various NUC models (at least to date).


              The SDK is specific to Windows; I never got to the point of doing a Linux port. It provides example application, support library (DLL) and device driver in both source and binary form. If the application fails to periodically ping the timer, it will expire and reset (power cycle) the system. While the example application is usable in many basic situations, the idea is that you produce your own application that utilizes the library and driver and the reset occurs if your application hangs or terminates abnormally or the O/S goes into the weeds.


              Still waiting for answer from Intel on whether I can redistribute the SDK...

              ...S