openMMC
Open Source Modular MMC for AMCs
Loading...
Searching...
No Matches
watchdog.h File Reference

Watchdog module definitions. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WATCHDOG_CLK_FREQ   8000000
 Watchdog module clock frequency (in Hz)
 
#define WATCHDOG_TIMEOUT   1000 /* in milisseconds */
 Watchdog timer timeout (in ms)
 
#define WATCHDOG_FEED_DELAY   (WATCHDOG_TIMEOUT/3)*2
 Watchdog timer feed delay.
 

Functions

void watchdog_init (void)
 Initializes and configures Watchdog timer.
 
void watchdog_reset_mcu (void)
 Schedules a Reset on the next run of the Watchdog task.
 
void WatchdogTask (void *Parameters)
 Periodically feed the Watchdog timer and checks if there's any Reset requests.
 

Detailed Description

Watchdog module definitions.

Author
Henrique Silva henri.nosp@m.que..nosp@m.silva.nosp@m.@lnl.nosp@m.s.br

Macro Definition Documentation

◆ WATCHDOG_CLK_FREQ

#define WATCHDOG_CLK_FREQ   8000000

Watchdog module clock frequency (in Hz)

◆ WATCHDOG_FEED_DELAY

#define WATCHDOG_FEED_DELAY   (WATCHDOG_TIMEOUT/3)*2

Watchdog timer feed delay.

We reload the watchdog timer at 2/3 of the max count

◆ WATCHDOG_TIMEOUT

#define WATCHDOG_TIMEOUT   1000 /* in milisseconds */

Watchdog timer timeout (in ms)

Function Documentation

◆ watchdog_init()

void watchdog_init ( void )

Initializes and configures Watchdog timer.

Returns
None

◆ watchdog_reset_mcu()

void watchdog_reset_mcu ( void )

Schedules a Reset on the next run of the Watchdog task.

Returns
None

◆ WatchdogTask()

void WatchdogTask ( void * Parameters)

Periodically feed the Watchdog timer and checks if there's any Reset requests.

Parameters
ParametersPointer to a buffer of parameters passed to the task upon initialization
Returns
None