NUC472_NUC442_BSP V3.03.005
The Board Support Package for NUC472/NUC442
wwdt.h
Go to the documentation of this file.
1/**************************************************************************/
12#ifndef __WWDT_H__
13#define __WWDT_H__
14
15#ifdef __cplusplus
16extern "C"
17{
18#endif
19
20
32#define WWDT_PRESCALER_1 (0UL << WWDT_CTL_PSCSEL_Pos)
33#define WWDT_PRESCALER_2 (1UL << WWDT_CTL_PSCSEL_Pos)
34#define WWDT_PRESCALER_4 (2UL << WWDT_CTL_PSCSEL_Pos)
35#define WWDT_PRESCALER_8 (3UL << WWDT_CTL_PSCSEL_Pos)
36#define WWDT_PRESCALER_16 (4UL << WWDT_CTL_PSCSEL_Pos)
37#define WWDT_PRESCALER_32 (5UL << WWDT_CTL_PSCSEL_Pos)
38#define WWDT_PRESCALER_64 (6UL << WWDT_CTL_PSCSEL_Pos)
39#define WWDT_PRESCALER_128 (7UL << WWDT_CTL_PSCSEL_Pos)
40#define WWDT_PRESCALER_192 (8UL << WWDT_CTL_PSCSEL_Pos)
41#define WWDT_PRESCALER_256 (9UL << WWDT_CTL_PSCSEL_Pos)
42#define WWDT_PRESCALER_384 (0xAUL << WWDT_CTL_PSCSEL_Pos)
43#define WWDT_PRESCALER_512 (0xBUL << WWDT_CTL_PSCSEL_Pos)
44#define WWDT_PRESCALER_768 (0xCUL << WWDT_CTL_PSCSEL_Pos)
45#define WWDT_PRESCALER_1024 (0xDUL << WWDT_CTL_PSCSEL_Pos)
46#define WWDT_PRESCALER_1536 (0xEUL << WWDT_CTL_PSCSEL_Pos)
47#define WWDT_PRESCALER_2048 (0xFUL << WWDT_CTL_PSCSEL_Pos)
48
49#define WWDT_RELOAD_WORD (0x00005AA5) /* end of group NUC472_442_WWDT_EXPORTED_CONSTANTS */
51
52
63#define WWDT_CLEAR_RESET_FLAG() (WWDT->STATUS = WWDT_STATUS_WWDTRF_Msk)
64
71#define WWDT_CLEAR_INT_FLAG() (WWDT->STATUS = WWDT_STATUS_WWDTIF_Msk)
72
80#define WWDT_GET_RESET_FLAG() (WWDT->STATUS & WWDT_STATUS_WWDTRF_Msk ? 1 : 0)
81
89#define WWDT_GET_INT_FLAG() (WWDT->STATUS & WWDT_STATUS_WWDTIF_Msk ? 1 : 0)
90
97#define WWDT_GET_COUNTER() (WWDT->CNT)
98
108#define WWDT_RELOAD_COUNTER() (WWDT->RLDCNT = WWDT_RELOAD_WORD)
109
110
111void WWDT_Open(uint32_t u32PreScale, uint32_t u32CmpValue, uint32_t u32EnableInt);
112
113 /* end of group NUC472_442_WWDT_EXPORTED_FUNCTIONS */
115 /* end of group NUC472_442_WWDT_Driver */
117 /* end of group NUC472_442_Device_Driver */
119
120#ifdef __cplusplus
121}
122#endif
123
124#endif //__WWDT_H__
125
126/*** (C) COPYRIGHT 2013 Nuvoton Technology Corp. ***/
void WWDT_Open(uint32_t u32PreScale, uint32_t u32CmpValue, uint32_t u32EnableInt)
This function make WWDT module start counting with different counter period and compared window value...
Definition: wwdt.c:51