A31L12x F/W Packages  1.4.0
ABOV Cortex-M0+ Core based MCUs Integrated Driver
A31L12x_hal_wdt.h
Go to the documentation of this file.
1 /***************************************************************************//****************************************************************************/
34 
35 #ifndef _WDT_H_
36 #define _WDT_H_
37 
38 #include "A31L12x.h"
39 #include "A31L12x_hal_aa_types.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 //******************************************************************************
46 // Constant
47 //******************************************************************************
48 
49 // WDT_CR interrupt enable bit
50 /* Deprecated
51 #define WDT_CR_UNFIEN ((uint32_t)(1 << 2)) // WDT Underflow Interrupt Enable bit
52 #define WDT_CR_WINMIEN ((uint32_t)(1 << 3)) // WDT Window Match Interrupt Enable bit
53 #define WDT_INTERRUPT_BITMASK 0x000c
54 */
55 
57 #define WDT_SR_UNFIFLAG ((uint32_t)(1 << 0)) // WDT Underflow Interrupt Flag bit
58 #define WDT_SR_WINMIFLAG ((uint32_t)(1 << 1)) // WDT Window Match Interrupt Flag bit
59 
60 #define WDT_STATUS_BITMASK 0x0003
61 
62 //******************************************************************************
63 // Type
64 //******************************************************************************
65 
66 //==============================================================================
67 // Enumeration
68 //==============================================================================
69 
70 enum
71 {
72  WDT_DIV_4 = 0,
76 };
77 
78 typedef enum
79 {
82 } WDT_INT_Type;
83 
84 //==============================================================================
85 // Structure
86 //==============================================================================
87 
88 typedef struct
89 {
90  uint8_t wdtResetEn;
91  uint16_t wdtClkDiv;
92  uint32_t wdtTmrConst;
93  uint32_t wdtWTmrConst;
94 } WDT_CFG_Type;
95 
96 //******************************************************************************
97 // Function
98 //******************************************************************************
99 
102 
106 HAL_Status_Type HAL_WDT_ClearStatus( uint32_t clrbit );
107 uint32_t HAL_WDT_GetStatus( void );
108 
109 uint32_t HAL_WDT_GetCurrentCount( void );
110 
111 #ifdef __cplusplus
112 }
113 #endif
114 
115 #endif /* _WDT_H_ */
116 
uint8_t wdtResetEn
WDT_INT_Type
Contains the ABOV typedefs for C standard types. It is intended to be used in ISO C conforming develo...
HAL_Status_Type HAL_WDT_Init(WDT_CFG_Type *WDT_Config)
Initialize the WDT peripheral with the specified parameters.
HAL_Status_Type HAL_WDT_ReloadTimeCounter(void)
Reload WDT counter.
HAL_Status_Type
uint16_t wdtClkDiv
HAL_Status_Type HAL_WDT_ClearStatus(uint32_t clrbit)
Clear the timer status register of WDT.
HAL_Status_Type HAL_WDT_ConfigInterrupt(WDT_INT_Type WDT_IntCfg, FunctionalState NewState)
Configure the peripheral interrupt.
FunctionalState
uint32_t HAL_WDT_GetStatus(void)
Get the timer status register of WDT.
uint32_t HAL_WDT_GetCurrentCount(void)
Get the current value of WDT.
HAL_Status_Type HAL_WDT_Start(FunctionalState ctrl)
Enable WDT activity.
HAL_Status_Type HAL_WDT_DeInit(void)
Deinitialize WDT.
uint32_t wdtTmrConst
uint32_t wdtWTmrConst