Watchdog Example

This example only works if you have implemented the watchdog functions for your MCU. See Watchdog Support.

 

void task1(void)

    {

    while (1)

        {

        // uncomment to allow the null task to pet the watchdog

        // REXIS_TaskSleepMilliSecs(10);

        }

    }

 

On startup, REXIS creates a “null task” that is always runnable and calls the REXIS_UserPetWatchdog function whenever it is run in order to prevent the watchdog from resetting the system. In this example, as the task does not call any kernel API that makes it blocked or unrunnable, the null task will never be run, and the watchdog will reset the system after the prescribed period of time.