1 Reply Latest reply on May 13, 2013 5:00 PM by jasonrc
      • 1. Re: Does the WICED SDK provide support for a watchdog?
        The Wiced SDK provides the system monitor infrastructure as a watchdog of the entire system.


        It can be configured to watch individual threads or resources.



        The system monitor functionality is implemented as a high priority thread which has the sole


        responsibility of kicking the MCU watchdog at the appropriate time. Every time the system


        monitor thread runs it checks whether all the user registered system monitor objects are still


        valid before kicking the watchdog and preventing a reset.



        If the thread detects a problem with any of the system monitor objects it no longer kicks


        the watchdog which will eventually trigger a reset.



        The Wiced API provides a function called wiced_register_system_monitor() that can be used


        to register up to 5 unique system monitor objects where each object has details about the


        last time it was updated as well as the longest permitted delay before the next update.



        Note that the maximum number of registered system monitor objects is controlled by the


        DEFAULT_NUMBER_OF_SYSTEM_MONITORS constant which can be found in


        Wiced/internal/system_monitor.c (This will be changed in a future release to allow you


        to modify the constant from your application makefile).



        There is also an update function called wiced_update_system_monitor() which is the


        system monitor equivalent of patting/kicking the watchdog.



        The snip.thread_monitor example application demonstrates how to use a system monitor


        to watch the timing of an individual thread but a system monitor can also be used to


        watch almost any kind of resource in the system.



        Another important feature of the system monitor is that it permits system monitor


        objects to be disabled and enabled by the user as required unlike the IWDG which


        cannot be turned off once started.