EFR32 Mighty Gecko 1 Software Documentation  efr32mg1-doc-5.1.2
em_wdog.h File Reference

Detailed Description

Watchdog (WDOG) peripheral API.

Version
5.1.2

License

Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no obligation to support this Software. Silicon Labs is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.

Silicon Labs will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.

Definition in file em_wdog.h.

#include "em_device.h"
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  WDOG_Init_TypeDef
 

Macros

#define DEFAULT_WDOG   WDOG0
 
#define WDOG_INIT_DEFAULT
 

Enumerations

enum  WDOG_ClkSel_TypeDef {
  wdogClkSelULFRCO = _WDOG_CTRL_CLKSEL_ULFRCO,
  wdogClkSelLFRCO = _WDOG_CTRL_CLKSEL_LFRCO,
  wdogClkSelLFXO = _WDOG_CTRL_CLKSEL_LFXO
}
 
enum  WDOG_PeriodSel_TypeDef {
  wdogPeriod_9 = 0x0,
  wdogPeriod_17 = 0x1,
  wdogPeriod_33 = 0x2,
  wdogPeriod_65 = 0x3,
  wdogPeriod_129 = 0x4,
  wdogPeriod_257 = 0x5,
  wdogPeriod_513 = 0x6,
  wdogPeriod_1k = 0x7,
  wdogPeriod_2k = 0x8,
  wdogPeriod_4k = 0x9,
  wdogPeriod_8k = 0xA,
  wdogPeriod_16k = 0xB,
  wdogPeriod_32k = 0xC,
  wdogPeriod_64k = 0xD,
  wdogPeriod_128k = 0xE,
  wdogPeriod_256k = 0xF
}
 
enum  WDOG_WarnSel_TypeDef {
  wdogWarnDisable = 0,
  wdogWarnTime25pct = 1,
  wdogWarnTime50pct = 2,
  wdogWarnTime75pct = 3
}
 
enum  WDOG_WinSel_TypeDef {
  wdogIllegalWindowDisable = 0,
  wdogIllegalWindowTime12_5pct = 1,
  wdogIllegalWindowTime25_0pct = 2,
  wdogIllegalWindowTime37_5pct = 3,
  wdogIllegalWindowTime50_0pct = 4,
  wdogIllegalWindowTime62_5pct = 5,
  wdogIllegalWindowTime75_0pct = 6,
  wdogIllegalWindowTime87_5pct = 7
}
 

Functions

__STATIC_INLINE void WDOG_Enable (bool enable)
 Enable/disable the watchdog timer. More...
 
__STATIC_INLINE void WDOG_Feed (void)
 Feed the watchdog. More...
 
__STATIC_INLINE void WDOG_Init (const WDOG_Init_TypeDef *init)
 Initialize watchdog (assuming the watchdog configuration has not been locked). More...
 
__STATIC_INLINE void WDOG_Lock (void)
 Lock the watchdog configuration. More...
 
void WDOGn_Enable (WDOG_TypeDef *wdog, bool enable)
 Enable/disable the watchdog timer. More...
 
void WDOGn_Feed (WDOG_TypeDef *wdog)
 Feed the watchdog. More...
 
void WDOGn_Init (WDOG_TypeDef *wdog, const WDOG_Init_TypeDef *init)
 Initialize watchdog (assuming the watchdog configuration has not been locked). More...
 
__STATIC_INLINE void WDOGn_IntClear (WDOG_TypeDef *wdog, uint32_t flags)
 Clear one or more pending WDOG interrupts. More...
 
__STATIC_INLINE void WDOGn_IntDisable (WDOG_TypeDef *wdog, uint32_t flags)
 Disable one or more WDOG interrupts. More...
 
__STATIC_INLINE void WDOGn_IntEnable (WDOG_TypeDef *wdog, uint32_t flags)
 Enable one or more WDOG interrupts. More...
 
__STATIC_INLINE uint32_t WDOGn_IntGet (WDOG_TypeDef *wdog)
 Get pending WDOG interrupt flags. More...
 
__STATIC_INLINE uint32_t WDOGn_IntGetEnabled (WDOG_TypeDef *wdog)
 Get enabled and pending WDOG interrupt flags. More...
 
__STATIC_INLINE void WDOGn_IntSet (WDOG_TypeDef *wdog, uint32_t flags)
 Set one or more pending WDOG interrupts from SW. More...
 
void WDOGn_Lock (WDOG_TypeDef *wdog)
 Lock the watchdog configuration. More...