| M480 BSP V3.05.001 The Board Support Package for M480 Series

wdt.c
Go to the documentation of this file.
1 /**************************************************************************/
9 #include "NuMicro.h"
10
11
50 void WDT_Open(uint32_t u32TimeoutInterval,
51 uint32_t u32ResetDelay,
52 uint32_t u32EnableReset,
53 uint32_t u32EnableWakeup)
54 {
55 WDT->ALTCTL = u32ResetDelay;
56
57 WDT->CTL = u32TimeoutInterval | WDT_CTL_WDTEN_Msk |
58 (u32EnableReset << WDT_CTL_RSTEN_Pos) |
59 (u32EnableWakeup << WDT_CTL_WKEN_Pos);
60 return;
61 }
62 /* end of group WDT_EXPORTED_FUNCTIONS */
64 /* end of group WDT_Driver */
66 /* end of group Standard_Driver */
68
69 /*** (C) COPYRIGHT 2016 Nuvoton Technology Corp. ***/
WDT_CTL_WKEN_Pos
#define WDT_CTL_WKEN_Pos
Definition: wdt_reg.h:264
NuMicro.h
NuMicro peripheral access layer header file.
WDT_Open
void WDT_Open(uint32_t u32TimeoutInterval, uint32_t u32ResetDelay, uint32_t u32EnableReset, uint32_t u32EnableWakeup)
Initialize WDT and start counting.
Definition: wdt.c:50
WDT
#define WDT
Definition: M480.h:398
WDT_CTL_RSTEN_Pos
#define WDT_CTL_RSTEN_Pos
Definition: wdt_reg.h:255
WDT_CTL_WDTEN_Msk
#define WDT_CTL_WDTEN_Msk
Definition: wdt_reg.h:274