SRD Standelone programmation box: watchdog.h File Reference

| SRD Standelone programmation box 2.0 (16/11/15 10:00:00) Documentation of the SRD standelone programmation box

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Enumerations Enumerator Macros Pages
Enumerations | Functions
watchdog.h File Reference

Headerfile for watchdog driver. More...

`#include "dsp.h"`
Include dependency graph for watchdog.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Enumerations

enum | tWatchdogSourceClock { WATCHDOG_SOURCE_CLOCK_LPO = 0, WATCHDOG_SOURCE_CLOCK_BUS_CLOCK = 1 }
| Define source clock used by Watchdog. More...
enum | tWatchdogPeriod { WATCHDOG_PERIOD_SHORT = 1, WATCHDOG_PERIOD_MIDDLE = 2, WATCHDOG_PERIOD_LONG = 3 }
| Define the watchdog period. More...

## Functions

void | WatchdogStart (tWatchdogSourceClock clockSource, tWatchdogPeriod period)
| start watchdog (can be call only ones and can't call after WatchdogStop()). More...
void | WatchdogStop (void)
| stop watchdog (can be call only ones and can't call after WatchdogStart()). More...
void | WatchdogKick (void)
| Kick the watchdog to avoid reset after the watchdog have started. More...

## Detailed Description

Headerfile for watchdog driver.

Author
  Thibaut LALUQUE 3D-Ouest

Date
  26/09/2014

Version
  1.0

All Rigth Reserved.

Definition in file watchdog.h.

## Enumeration Type Documentation

enum tWatchdogPeriod

Define the watchdog period.

Enumerator
WATCHDOG_PERIOD_SHORT | Define short watchdog period, 2^5 on LPO and 2^13 on bus clock
WATCHDOG_PERIOD_MIDDLE | Define middle watchdog period, 2^8 on LPO and 2^16 on bus clock
WATCHDOG_PERIOD_LONG | Define long watchdog period, 2^10 on LPO and 2^18 on bus clock

Definition at line 56 of file watchdog.h.

56 {
57 WATCHDOG_PERIOD_SHORT = 1, /*!< Define short watchdog period, 2^5 on LPO and 2^13 on bus clock */
58 WATCHDOG_PERIOD_MIDDLE = 2, /*!< Define middle watchdog period, 2^8 on LPO and 2^16 on bus clock */
59 WATCHDOG_PERIOD_LONG = 3 /*!< Define long watchdog period, 2^10 on LPO and 2^18 on bus clock */
60 }tWatchdogPeriod;
tWatchdogPeriod
tWatchdogPeriod
Define the watchdog period.
Definition: watchdog.h:56
WATCHDOG_PERIOD_SHORT
Definition: watchdog.h:57
WATCHDOG_PERIOD_MIDDLE
Definition: watchdog.h:58
WATCHDOG_PERIOD_LONG
Definition: watchdog.h:59

enum tWatchdogSourceClock

Define source clock used by Watchdog.

Enumerator
WATCHDOG_SOURCE_CLOCK_LPO | Use Low Power Oscillator clock
WATCHDOG_SOURCE_CLOCK_BUS_CLOCK | Use bus clock

Definition at line 45 of file watchdog.h.

45 {
46 WATCHDOG_SOURCE_CLOCK_LPO = 0, /*!< Use Low Power Oscillator clock */
47 WATCHDOG_SOURCE_CLOCK_BUS_CLOCK = 1 /*!< Use bus clock */
48 }tWatchdogSourceClock;
tWatchdogSourceClock
tWatchdogSourceClock
Define source clock used by Watchdog.
Definition: watchdog.h:45
WATCHDOG_SOURCE_CLOCK_LPO
Definition: watchdog.h:46
WATCHDOG_SOURCE_CLOCK_BUS_CLOCK
Definition: watchdog.h:47

## Function Documentation

void WatchdogKick | ( | void |  | ) |

inline

Kick the watchdog to avoid reset after the watchdog have started.

Definition at line 86 of file watchdog.c.

Referenced by CR95UartInit(), CriticalInit(), FM25V20MemTest_Clear(), FM25V20MemTest_HighFreqDown(), FM25V20MemTest_HighFreqUp(), FM25V20MemTest_PulseN(), FM25V20MemTest_PulseP(), FM25V20MemTest_Set(), main(), MemoryManagerClearLog(), MemoryManagerComputeNbrLog(), MemoryManagerInit(), MemoryManagerReadDiving(), MemoryManagerReadLog(), MemoryManagerReadSerial(), MemoryManagerWriteDiving(), MemoryManagerWriteLog(), MemoryManagerWriteSerial(), PowerManagerEnterLPM(), PowerManagerExitLPM(), and Setup().

86 {
87 SIM->SRVCOP = 0x55;
88 SIM->SRVCOP = 0xAA;
89 }

Here is the caller graph for this function:

void WatchdogStart | ( | tWatchdogSourceClock | clockSource,
|  | tWatchdogPeriod | period
| ) |  |

start watchdog (can be call only ones and can't call after WatchdogStop()).

Parameters

  [in] | clockSource | (tWatchdogSourceClock) : select the clock for the watchdog.
  [in] | period | (tWatchdogPeriod) : Select the period for the watchdog.

Definition at line 78 of file watchdog.c.

Referenced by CriticalInit().

78 {
79 SIM_COPC = (clockSource << 1) | (period << 2); //Save watchdog cfg
80 }

Here is the caller graph for this function:

void WatchdogStop | ( | void |  | ) |

inline

stop watchdog (can be call only ones and can't call after WatchdogStart()).

Definition at line 82 of file watchdog.c.

82 {
83 SIM_COPC = SIM_COPC_COPT(0x00);
84 }