Callisto4Bootloader: test/watchdog_test.h File Reference

Callisto4Bootloader

Functions
watchdog_test.h File Reference
`#include "c4_error_codes.h"`

Go to the source code of this file.

## Functions

exit_code_t | watchdog_test (void)
| Test function for watchdog 1. More...
exit_code_t | watchdog_if_test (c4_wdog_t wdog)
| Test Callisto 4 watchdog interfaces. More...

## Function Documentation

## ◆ watchdog_if_test()

exit_code_t watchdog_if_test | ( | c4_wdog_t | wdog | ) |

Test Callisto 4 watchdog interfaces.

Parameters

  [in] | wdog | Watch dog to exercise.

Returns
  Test status

Return values

  ERR_OK | All tests passed.

Definition at line 166 of file watchdog_test.c.

## ◆ watchdog_test()

exit_code_t watchdog_test | ( | void |  | ) |

Test function for watchdog 1.

Exercises detecting power-on reset (POR), software reset (SWR) and timeout reset (TOUT) through the WDOG1 registers. The test also shows a watchdog being constantly fed and also raising an interrupt prior to expiry.

Definition at line 56 of file watchdog_test.c.

References C4_WDOG1, _wdog_config::enableInterrupt, _wdog_config::interruptTimeValue, kWDOG_InterruptEnable, kWDOG_PowerOnResetFlag, kWDOG_SoftwareResetFlag, kWDOG_TimeoutResetFlag, NVIC_EnableIRQ, sWdogRegisters, _wdog_config::timeoutValue, WDOG1_IRQn, WDOG_EnableInterrupts(), WDOG_GetDefaultConfig(), WDOG_GetStatusFlags(), WDOG_Init(), WDOG_Refresh(), and WDOG_TriggerSystemSoftwareReset().