M4521_BSP
V3.02.000
The Board Support Package for M4521
StdDriver
inc
wwdt.h
Go to the documentation of this file.
1
/**************************************************************************/
12
#ifndef __WWDT_H__
13
#define __WWDT_H__
14
15
#ifdef __cplusplus
16
extern
"C"
17
{
18
#endif
19
20
32
/*---------------------------------------------------------------------------------------------------------*/
33
/* WWDT Prescale Period Constant Definitions */
34
/*---------------------------------------------------------------------------------------------------------*/
35
#define WWDT_PRESCALER_1 (0 << WWDT_CTL_PSCSEL_Pos)
36
#define WWDT_PRESCALER_2 (1 << WWDT_CTL_PSCSEL_Pos)
37
#define WWDT_PRESCALER_4 (2 << WWDT_CTL_PSCSEL_Pos)
38
#define WWDT_PRESCALER_8 (3 << WWDT_CTL_PSCSEL_Pos)
39
#define WWDT_PRESCALER_16 (4 << WWDT_CTL_PSCSEL_Pos)
40
#define WWDT_PRESCALER_32 (5 << WWDT_CTL_PSCSEL_Pos)
41
#define WWDT_PRESCALER_64 (6 << WWDT_CTL_PSCSEL_Pos)
42
#define WWDT_PRESCALER_128 (7 << WWDT_CTL_PSCSEL_Pos)
43
#define WWDT_PRESCALER_192 (8 << WWDT_CTL_PSCSEL_Pos)
44
#define WWDT_PRESCALER_256 (9 << WWDT_CTL_PSCSEL_Pos)
45
#define WWDT_PRESCALER_384 (10 << WWDT_CTL_PSCSEL_Pos)
46
#define WWDT_PRESCALER_512 (11 << WWDT_CTL_PSCSEL_Pos)
47
#define WWDT_PRESCALER_768 (12 << WWDT_CTL_PSCSEL_Pos)
48
#define WWDT_PRESCALER_1024 (13 << WWDT_CTL_PSCSEL_Pos)
49
#define WWDT_PRESCALER_1536 (14 << WWDT_CTL_PSCSEL_Pos)
50
#define WWDT_PRESCALER_2048 (15 << WWDT_CTL_PSCSEL_Pos)
52
/*---------------------------------------------------------------------------------------------------------*/
53
/* WWDT Reload Counter Keyword Constant Definitions */
54
/*---------------------------------------------------------------------------------------------------------*/
55
#define WWDT_RELOAD_WORD (0x00005AA5)
/* end of group WWDT_EXPORTED_CONSTANTS */
58
59
73
#define WWDT_CLEAR_RESET_FLAG() (WWDT->STATUS = (WWDT->STATUS & ~WWDT_STATUS_WWDTIF_Msk) | WWDT_STATUS_WWDTRF_Msk)
74
84
#define WWDT_CLEAR_INT_FLAG() (WWDT->STATUS = (WWDT->STATUS & ~WWDT_STATUS_WWDTRF_Msk) | WWDT_STATUS_WWDTIF_Msk)
85
96
#define WWDT_GET_RESET_FLAG() ((WWDT->STATUS & WWDT_STATUS_WWDTRF_Msk)? 1 : 0)
97
108
#define WWDT_GET_INT_FLAG() ((WWDT->STATUS & WWDT_STATUS_WWDTIF_Msk)? 1 : 0)
109
119
#define WWDT_GET_COUNTER() (WWDT->CNT)
120
133
#define WWDT_RELOAD_COUNTER() (WWDT->RLDCNT = WWDT_RELOAD_WORD)
134
135
void
WWDT_Open
(uint32_t u32PreScale, uint32_t u32CmpValue, uint32_t u32EnableInt);
136
/* end of group WWDT_EXPORTED_FUNCTIONS */
138
/* end of group WWDT_Driver */
140
/* end of group Standard_Driver */
142
143
#ifdef __cplusplus
144
}
145
#endif
146
147
#endif
//__WWDT_H__
148
WWDT_Open
void WWDT_Open(uint32_t u32PreScale, uint32_t u32CmpValue, uint32_t u32EnableInt)
Open WWDT and start counting.
Definition:
wwdt.c:55
Generated on Thu Oct 17 2024 09:13:38 for M4521_BSP by
1.9.3