IRPyro messaging application
Communications program between IRPyro and IRPyro evaluation tool
Watchdog_Driver.h
Go to the documentation of this file.
1 /**
2  ******************************************************************************
3  * @file Watchdog_Driver.h
4  * @author Hugo Vargas Llanas, _KEMET Ltd.
5  * @date 21-April-2015
6  * @brief This file contains all the functions involving the watchdog Timer
7  ******************************************************************************
8  */
9 
10 #ifndef Watchdog_Driver
11 #define Watchdog_Driver
12 
13 /* Includes ------------------------------------------------------------------*/
14 #include "stm32f30x_iwdg.h"
15 
16 /* Defines -------------------------------------------------------------------*/
17 #define WATCHDOG_LONG_TIMEOUT_DEFAULT 0xC35 // 20 Seconds
18 #define WATCHDOG_SHORT_TIMEOUT_DEFAULT 0x1D5 // 3 Seconds
19 #define WATCHDOG_TIMEOUT_SETTING_DEFAULT Short_Timeout
20 #define WATCHDOG_ENABLE_DEFAULT 0
21 typedef enum
22 {
23  Short_Timeout, /*!< */
24  Long_Timeout, /*!< */
26 typedef struct
27 {
28  uint8_t Enabled;
29  uint16_t Short_Timeout;
30  uint16_t Long_Timeout;
33 
34 /* Functional Control Functions **************************/
35 void Watchdog_Init (Watchdog_Config_Type * External_Config);
36 void Reload_Counter (void);
37 void Timeout_Set(Timeout_Length_Type Timeout_Length_Types);
38 
39 #endif
40 /* ********** Copyright (c) 2018 _KEMET, Ltd. **********END OF FILE************/
41 
Watchdog_Config_Type::Long_Timeout
uint16_t Long_Timeout
Definition: Watchdog_Driver.h:30
Long_Timeout
@ Long_Timeout
Definition: Watchdog_Driver.h:24
Watchdog_Init
void Watchdog_Init(Watchdog_Config_Type *External_Config)
Initializes the Watchdog Timer used incase the MCU hangs up.
Definition: Watchdog_Driver.c:26
Timeout_Length_Type
Timeout_Length_Type
Definition: Watchdog_Driver.h:22
Watchdog_Config_Type::Short_Timeout
uint16_t Short_Timeout
Definition: Watchdog_Driver.h:29
Watchdog_Config_Type::Enabled
uint8_t Enabled
Definition: Watchdog_Driver.h:28
Short_Timeout
@ Short_Timeout
Definition: Watchdog_Driver.h:23
Timeout_Set
void Timeout_Set(Timeout_Length_Type Timeout_Length_Types)
Used to increase the timeout period. This is used when the device is going to be doing a very time co...
Definition: Watchdog_Driver.c:77
Watchdog_Config_Type
Definition: Watchdog_Driver.h:27
Watchdog_Config_Type::Timeout_Setting_Default
Timeout_Length_Type Timeout_Setting_Default
Definition: Watchdog_Driver.h:31
Reload_Counter
void Reload_Counter(void)
Reloads the counter for the watchdog to avoid resetting when the hardware has not hung up.
Definition: Watchdog_Driver.c:110