ESOS32
ESOSOn32-bitProcessors
Functions | Variables
ESOS_Watchdog_Service

Functions

void _esos_wdog_initWatchdog (uint32_t u32_msBetweenWatchdogResets)
 
void esos_wdog_feedWatchdog (void)
 
uint32_t esos_wdog_getWatchdogFedTicks (void)
 
uint32_t esos_wdog_getTicksSinceWatchdogFed (void)
 
uint32_t esos_wdog_getTicksUntilWatchdogReset (void)
 
uint32_t esos_wdog_getTicksWatchdogPeriod (void)
 
void _esos_hw_wdog_initWatchdog (uint32_t u32_ticksBetweenWatchdogResets)
 
void _esos_hw_wdog_feedWatchdog (void)
 

Variables

volatile uint32_t __esos_wdog_ticksWatchdogPeriod
 
volatile uint32_t __esos_wdog_ticksWatchdogLastFed
 
volatile uint32_t __esos_wdog_ticksWatchdogLastFed
 

Detailed Description

Function Documentation

◆ _esos_hw_wdog_feedWatchdog()

void _esos_hw_wdog_feedWatchdog ( void  )

"Feeds" the hardware watchdog

Note
This function ASSUMES that the hardware watchdog has been configured properly
See also
_esos_hw_wdog_initWatchdog()
esos_wdog_feedWatchdog()

◆ _esos_hw_wdog_initWatchdog()

void _esos_hw_wdog_initWatchdog ( uint32_t  u32_ticksBetweenWatchdogResets)

Initialize the hardware watchdog timers

Parameters
u32_ticksBetweenWatchdogResetsdesired number of milliseconds betweeen watchdog resets
See also
_esos_wdog_initWatchdog()
_esos_hw_wdog_feedWatchdog()

◆ _esos_wdog_initWatchdog()

void _esos_wdog_initWatchdog ( uint32_t  u32_msBetweenWatchdogResets)

Initializes ESOS watchdog timer

Parameters
numberof milliseconds between watchdog resets
Note
This function will call _esos_hw_wdog_initWatchdog() routine so that the hardware-specific code is execute to setup and enable the watchdog timer. Each hardware port of ESOS32 should provide such a function
See also
__esos_hw_wdog_initWatchdog()
ESOS_USES_WATCHDOG

Definition at line 66 of file esos_wdog.c.

◆ esos_wdog_feedWatchdog()

void esos_wdog_feedWatchdog ( void  )

ESOS hardware-indepednet call to "feed" the watchdog timer

Note
This function will call _esos_hw_feedWatchdog() routine so that the hardware-specific code is execute to "feed" (reset) the watchdog timer. Each hardware port of ESOS32 should provide such a function
See also
__esos_hw_wdog_feedWatchdog()
ESOS_USES_WATCHDOG

Definition at line 87 of file esos_wdog.c.

◆ esos_wdog_getTicksSinceWatchdogFed()

uint32_t esos_wdog_getTicksSinceWatchdogFed ( void  )
inline

Get the number of system ticks since the watchdog was last fed (reset)

Return values
Theuint32_t value of the number of ESOS system ticks value since the watchdog was last "fed" (reset)
See also
esos_wdog_feedWatchdog()
esos_wdog_getWatchdogFedTicks()
ESOS_USES_WATCHDOG

Definition at line 120 of file esos_wdog.c.

◆ esos_wdog_getTicksUntilWatchdogReset()

uint32_t esos_wdog_getTicksUntilWatchdogReset ( void  )
inline

Get the number of system ticks until next watchdog reset

Return values
Theuint32_t value of the number of ESOS system ticks until the watchdog will reset the system
Note
This value will only be approximately correct as the variance of execution times through the ESOS scheduler loop and watchdog watchdog hardware is often driven by a less-than-accurate timer.
See also
esos_wdog_feedWatchdog()
esos_wdog_getWatchdogFedTicks()
ESOS_USES_WATCHDOG

Definition at line 139 of file esos_wdog.c.

◆ esos_wdog_getTicksWatchdogPeriod()

uint32_t esos_wdog_getTicksWatchdogPeriod ( void  )
inline

Get the programmed watchdog period in ESOS system ticks

Return values
Theuint32_t value of the number of ESOS system ticks that is the full watchdog timeout period
Note
ESOS user applications should strive to maximize time between watchdog "feedings", but do not push all the way to the limit in case some user tasks is slow to wait/yield control to the scheduler, or the user app has many tasks.
See also
esos_wdog_feedWatchdog()
esos_wdog_getWatchdogFedTicks()
ESOS_USES_WATCHDOG

Definition at line 159 of file esos_wdog.c.

◆ esos_wdog_getWatchdogFedTicks()

uint32_t esos_wdog_getWatchdogFedTicks ( void  )
inline

Get the ESOS systems ticks value of when the watchdog was last fed (reset)

Return values
Theuint32_t value ESOS system ticks value of when the watchdog was last "fed" (reset)
See also
esos_wdog_feedWatchdog()
esos_wdog_getTicksSinceWatchdogFed()
ESOS_USES_WATCHDOG

Definition at line 105 of file esos_wdog.c.