Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
TARGET_EFM32ZG_STK3200/efm32zg_wdog.h@113:f141b2784e32, 2016-02-02 (annotated)
- Committer:
- Kojto
- Date:
- Tue Feb 02 14:43:35 2016 +0000
- Revision:
- 113:f141b2784e32
- Parent:
- 98:8ab26030e058
Release 113 of the mbed library
Changes:
- new targets - Silabs Perl Gecko, TY51822
- Silabs - emlib update to 4.1.0, various bugfixes as result
- STM B96B_F446VE - add async serial support
- Freescale KLXX - rtc lock fix
- LPC11U68 and LPC1549 - pwm bugfixes - duty cycle
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 98:8ab26030e058 | 1 | /**************************************************************************//** |
Kojto | 98:8ab26030e058 | 2 | * @file efm32zg_wdog.h |
Kojto | 98:8ab26030e058 | 3 | * @brief EFM32ZG_WDOG register and bit field definitions |
Kojto | 113:f141b2784e32 | 4 | * @version 4.2.0 |
Kojto | 98:8ab26030e058 | 5 | ****************************************************************************** |
Kojto | 98:8ab26030e058 | 6 | * @section License |
Kojto | 113:f141b2784e32 | 7 | * <b>Copyright 2015 Silicon Laboratories, Inc. http://www.silabs.com</b> |
Kojto | 98:8ab26030e058 | 8 | ****************************************************************************** |
Kojto | 98:8ab26030e058 | 9 | * |
Kojto | 98:8ab26030e058 | 10 | * Permission is granted to anyone to use this software for any purpose, |
Kojto | 98:8ab26030e058 | 11 | * including commercial applications, and to alter it and redistribute it |
Kojto | 98:8ab26030e058 | 12 | * freely, subject to the following restrictions: |
Kojto | 98:8ab26030e058 | 13 | * |
Kojto | 98:8ab26030e058 | 14 | * 1. The origin of this software must not be misrepresented; you must not |
Kojto | 98:8ab26030e058 | 15 | * claim that you wrote the original software.@n |
Kojto | 98:8ab26030e058 | 16 | * 2. Altered source versions must be plainly marked as such, and must not be |
Kojto | 98:8ab26030e058 | 17 | * misrepresented as being the original software.@n |
Kojto | 98:8ab26030e058 | 18 | * 3. This notice may not be removed or altered from any source distribution. |
Kojto | 98:8ab26030e058 | 19 | * |
Kojto | 98:8ab26030e058 | 20 | * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Laboratories, Inc. |
Kojto | 98:8ab26030e058 | 21 | * has no obligation to support this Software. Silicon Laboratories, Inc. is |
Kojto | 98:8ab26030e058 | 22 | * providing the Software "AS IS", with no express or implied warranties of any |
Kojto | 98:8ab26030e058 | 23 | * kind, including, but not limited to, any implied warranties of |
Kojto | 98:8ab26030e058 | 24 | * merchantability or fitness for any particular purpose or warranties against |
Kojto | 98:8ab26030e058 | 25 | * infringement of any proprietary rights of a third party. |
Kojto | 98:8ab26030e058 | 26 | * |
Kojto | 98:8ab26030e058 | 27 | * Silicon Laboratories, Inc. will not be liable for any consequential, |
Kojto | 98:8ab26030e058 | 28 | * incidental, or special damages, or any other relief, or for any claim by |
Kojto | 98:8ab26030e058 | 29 | * any third party, arising from your use of this Software. |
Kojto | 98:8ab26030e058 | 30 | * |
Kojto | 98:8ab26030e058 | 31 | *****************************************************************************/ |
Kojto | 98:8ab26030e058 | 32 | /**************************************************************************//** |
Kojto | 113:f141b2784e32 | 33 | * @addtogroup Parts |
Kojto | 113:f141b2784e32 | 34 | * @{ |
Kojto | 113:f141b2784e32 | 35 | ******************************************************************************/ |
Kojto | 113:f141b2784e32 | 36 | /**************************************************************************//** |
Kojto | 98:8ab26030e058 | 37 | * @defgroup EFM32ZG_WDOG |
Kojto | 98:8ab26030e058 | 38 | * @{ |
Kojto | 98:8ab26030e058 | 39 | * @brief EFM32ZG_WDOG Register Declaration |
Kojto | 98:8ab26030e058 | 40 | *****************************************************************************/ |
Kojto | 98:8ab26030e058 | 41 | typedef struct |
Kojto | 98:8ab26030e058 | 42 | { |
Kojto | 98:8ab26030e058 | 43 | __IO uint32_t CTRL; /**< Control Register */ |
Kojto | 98:8ab26030e058 | 44 | __IO uint32_t CMD; /**< Command Register */ |
Kojto | 98:8ab26030e058 | 45 | |
Kojto | 98:8ab26030e058 | 46 | __I uint32_t SYNCBUSY; /**< Synchronization Busy Register */ |
Kojto | 98:8ab26030e058 | 47 | } WDOG_TypeDef; /** @} */ |
Kojto | 98:8ab26030e058 | 48 | |
Kojto | 98:8ab26030e058 | 49 | /**************************************************************************//** |
Kojto | 98:8ab26030e058 | 50 | * @defgroup EFM32ZG_WDOG_BitFields |
Kojto | 98:8ab26030e058 | 51 | * @{ |
Kojto | 98:8ab26030e058 | 52 | *****************************************************************************/ |
Kojto | 98:8ab26030e058 | 53 | |
Kojto | 98:8ab26030e058 | 54 | /* Bit fields for WDOG CTRL */ |
Kojto | 98:8ab26030e058 | 55 | #define _WDOG_CTRL_RESETVALUE 0x00000F00UL /**< Default value for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 56 | #define _WDOG_CTRL_MASK 0x00003F7FUL /**< Mask for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 57 | #define WDOG_CTRL_EN (0x1UL << 0) /**< Watchdog Timer Enable */ |
Kojto | 98:8ab26030e058 | 58 | #define _WDOG_CTRL_EN_SHIFT 0 /**< Shift value for WDOG_EN */ |
Kojto | 98:8ab26030e058 | 59 | #define _WDOG_CTRL_EN_MASK 0x1UL /**< Bit mask for WDOG_EN */ |
Kojto | 98:8ab26030e058 | 60 | #define _WDOG_CTRL_EN_DEFAULT 0x00000000UL /**< Mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 61 | #define WDOG_CTRL_EN_DEFAULT (_WDOG_CTRL_EN_DEFAULT << 0) /**< Shifted mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 62 | #define WDOG_CTRL_DEBUGRUN (0x1UL << 1) /**< Debug Mode Run Enable */ |
Kojto | 98:8ab26030e058 | 63 | #define _WDOG_CTRL_DEBUGRUN_SHIFT 1 /**< Shift value for WDOG_DEBUGRUN */ |
Kojto | 98:8ab26030e058 | 64 | #define _WDOG_CTRL_DEBUGRUN_MASK 0x2UL /**< Bit mask for WDOG_DEBUGRUN */ |
Kojto | 98:8ab26030e058 | 65 | #define _WDOG_CTRL_DEBUGRUN_DEFAULT 0x00000000UL /**< Mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 66 | #define WDOG_CTRL_DEBUGRUN_DEFAULT (_WDOG_CTRL_DEBUGRUN_DEFAULT << 1) /**< Shifted mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 67 | #define WDOG_CTRL_EM2RUN (0x1UL << 2) /**< Energy Mode 2 Run Enable */ |
Kojto | 98:8ab26030e058 | 68 | #define _WDOG_CTRL_EM2RUN_SHIFT 2 /**< Shift value for WDOG_EM2RUN */ |
Kojto | 98:8ab26030e058 | 69 | #define _WDOG_CTRL_EM2RUN_MASK 0x4UL /**< Bit mask for WDOG_EM2RUN */ |
Kojto | 98:8ab26030e058 | 70 | #define _WDOG_CTRL_EM2RUN_DEFAULT 0x00000000UL /**< Mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 71 | #define WDOG_CTRL_EM2RUN_DEFAULT (_WDOG_CTRL_EM2RUN_DEFAULT << 2) /**< Shifted mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 72 | #define WDOG_CTRL_EM3RUN (0x1UL << 3) /**< Energy Mode 3 Run Enable */ |
Kojto | 98:8ab26030e058 | 73 | #define _WDOG_CTRL_EM3RUN_SHIFT 3 /**< Shift value for WDOG_EM3RUN */ |
Kojto | 98:8ab26030e058 | 74 | #define _WDOG_CTRL_EM3RUN_MASK 0x8UL /**< Bit mask for WDOG_EM3RUN */ |
Kojto | 98:8ab26030e058 | 75 | #define _WDOG_CTRL_EM3RUN_DEFAULT 0x00000000UL /**< Mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 76 | #define WDOG_CTRL_EM3RUN_DEFAULT (_WDOG_CTRL_EM3RUN_DEFAULT << 3) /**< Shifted mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 77 | #define WDOG_CTRL_LOCK (0x1UL << 4) /**< Configuration lock */ |
Kojto | 98:8ab26030e058 | 78 | #define _WDOG_CTRL_LOCK_SHIFT 4 /**< Shift value for WDOG_LOCK */ |
Kojto | 98:8ab26030e058 | 79 | #define _WDOG_CTRL_LOCK_MASK 0x10UL /**< Bit mask for WDOG_LOCK */ |
Kojto | 98:8ab26030e058 | 80 | #define _WDOG_CTRL_LOCK_DEFAULT 0x00000000UL /**< Mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 81 | #define WDOG_CTRL_LOCK_DEFAULT (_WDOG_CTRL_LOCK_DEFAULT << 4) /**< Shifted mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 82 | #define WDOG_CTRL_EM4BLOCK (0x1UL << 5) /**< Energy Mode 4 Block */ |
Kojto | 98:8ab26030e058 | 83 | #define _WDOG_CTRL_EM4BLOCK_SHIFT 5 /**< Shift value for WDOG_EM4BLOCK */ |
Kojto | 98:8ab26030e058 | 84 | #define _WDOG_CTRL_EM4BLOCK_MASK 0x20UL /**< Bit mask for WDOG_EM4BLOCK */ |
Kojto | 98:8ab26030e058 | 85 | #define _WDOG_CTRL_EM4BLOCK_DEFAULT 0x00000000UL /**< Mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 86 | #define WDOG_CTRL_EM4BLOCK_DEFAULT (_WDOG_CTRL_EM4BLOCK_DEFAULT << 5) /**< Shifted mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 87 | #define WDOG_CTRL_SWOSCBLOCK (0x1UL << 6) /**< Software Oscillator Disable Block */ |
Kojto | 98:8ab26030e058 | 88 | #define _WDOG_CTRL_SWOSCBLOCK_SHIFT 6 /**< Shift value for WDOG_SWOSCBLOCK */ |
Kojto | 98:8ab26030e058 | 89 | #define _WDOG_CTRL_SWOSCBLOCK_MASK 0x40UL /**< Bit mask for WDOG_SWOSCBLOCK */ |
Kojto | 98:8ab26030e058 | 90 | #define _WDOG_CTRL_SWOSCBLOCK_DEFAULT 0x00000000UL /**< Mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 91 | #define WDOG_CTRL_SWOSCBLOCK_DEFAULT (_WDOG_CTRL_SWOSCBLOCK_DEFAULT << 6) /**< Shifted mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 92 | #define _WDOG_CTRL_PERSEL_SHIFT 8 /**< Shift value for WDOG_PERSEL */ |
Kojto | 98:8ab26030e058 | 93 | #define _WDOG_CTRL_PERSEL_MASK 0xF00UL /**< Bit mask for WDOG_PERSEL */ |
Kojto | 98:8ab26030e058 | 94 | #define _WDOG_CTRL_PERSEL_DEFAULT 0x0000000FUL /**< Mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 95 | #define WDOG_CTRL_PERSEL_DEFAULT (_WDOG_CTRL_PERSEL_DEFAULT << 8) /**< Shifted mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 96 | #define _WDOG_CTRL_CLKSEL_SHIFT 12 /**< Shift value for WDOG_CLKSEL */ |
Kojto | 98:8ab26030e058 | 97 | #define _WDOG_CTRL_CLKSEL_MASK 0x3000UL /**< Bit mask for WDOG_CLKSEL */ |
Kojto | 98:8ab26030e058 | 98 | #define _WDOG_CTRL_CLKSEL_DEFAULT 0x00000000UL /**< Mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 99 | #define _WDOG_CTRL_CLKSEL_ULFRCO 0x00000000UL /**< Mode ULFRCO for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 100 | #define _WDOG_CTRL_CLKSEL_LFRCO 0x00000001UL /**< Mode LFRCO for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 101 | #define _WDOG_CTRL_CLKSEL_LFXO 0x00000002UL /**< Mode LFXO for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 102 | #define WDOG_CTRL_CLKSEL_DEFAULT (_WDOG_CTRL_CLKSEL_DEFAULT << 12) /**< Shifted mode DEFAULT for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 103 | #define WDOG_CTRL_CLKSEL_ULFRCO (_WDOG_CTRL_CLKSEL_ULFRCO << 12) /**< Shifted mode ULFRCO for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 104 | #define WDOG_CTRL_CLKSEL_LFRCO (_WDOG_CTRL_CLKSEL_LFRCO << 12) /**< Shifted mode LFRCO for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 105 | #define WDOG_CTRL_CLKSEL_LFXO (_WDOG_CTRL_CLKSEL_LFXO << 12) /**< Shifted mode LFXO for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 106 | |
Kojto | 98:8ab26030e058 | 107 | /* Bit fields for WDOG CMD */ |
Kojto | 98:8ab26030e058 | 108 | #define _WDOG_CMD_RESETVALUE 0x00000000UL /**< Default value for WDOG_CMD */ |
Kojto | 98:8ab26030e058 | 109 | #define _WDOG_CMD_MASK 0x00000001UL /**< Mask for WDOG_CMD */ |
Kojto | 98:8ab26030e058 | 110 | #define WDOG_CMD_CLEAR (0x1UL << 0) /**< Watchdog Timer Clear */ |
Kojto | 98:8ab26030e058 | 111 | #define _WDOG_CMD_CLEAR_SHIFT 0 /**< Shift value for WDOG_CLEAR */ |
Kojto | 98:8ab26030e058 | 112 | #define _WDOG_CMD_CLEAR_MASK 0x1UL /**< Bit mask for WDOG_CLEAR */ |
Kojto | 98:8ab26030e058 | 113 | #define _WDOG_CMD_CLEAR_DEFAULT 0x00000000UL /**< Mode DEFAULT for WDOG_CMD */ |
Kojto | 98:8ab26030e058 | 114 | #define _WDOG_CMD_CLEAR_UNCHANGED 0x00000000UL /**< Mode UNCHANGED for WDOG_CMD */ |
Kojto | 98:8ab26030e058 | 115 | #define _WDOG_CMD_CLEAR_CLEARED 0x00000001UL /**< Mode CLEARED for WDOG_CMD */ |
Kojto | 98:8ab26030e058 | 116 | #define WDOG_CMD_CLEAR_DEFAULT (_WDOG_CMD_CLEAR_DEFAULT << 0) /**< Shifted mode DEFAULT for WDOG_CMD */ |
Kojto | 98:8ab26030e058 | 117 | #define WDOG_CMD_CLEAR_UNCHANGED (_WDOG_CMD_CLEAR_UNCHANGED << 0) /**< Shifted mode UNCHANGED for WDOG_CMD */ |
Kojto | 98:8ab26030e058 | 118 | #define WDOG_CMD_CLEAR_CLEARED (_WDOG_CMD_CLEAR_CLEARED << 0) /**< Shifted mode CLEARED for WDOG_CMD */ |
Kojto | 98:8ab26030e058 | 119 | |
Kojto | 98:8ab26030e058 | 120 | /* Bit fields for WDOG SYNCBUSY */ |
Kojto | 98:8ab26030e058 | 121 | #define _WDOG_SYNCBUSY_RESETVALUE 0x00000000UL /**< Default value for WDOG_SYNCBUSY */ |
Kojto | 98:8ab26030e058 | 122 | #define _WDOG_SYNCBUSY_MASK 0x00000003UL /**< Mask for WDOG_SYNCBUSY */ |
Kojto | 98:8ab26030e058 | 123 | #define WDOG_SYNCBUSY_CTRL (0x1UL << 0) /**< CTRL Register Busy */ |
Kojto | 98:8ab26030e058 | 124 | #define _WDOG_SYNCBUSY_CTRL_SHIFT 0 /**< Shift value for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 125 | #define _WDOG_SYNCBUSY_CTRL_MASK 0x1UL /**< Bit mask for WDOG_CTRL */ |
Kojto | 98:8ab26030e058 | 126 | #define _WDOG_SYNCBUSY_CTRL_DEFAULT 0x00000000UL /**< Mode DEFAULT for WDOG_SYNCBUSY */ |
Kojto | 98:8ab26030e058 | 127 | #define WDOG_SYNCBUSY_CTRL_DEFAULT (_WDOG_SYNCBUSY_CTRL_DEFAULT << 0) /**< Shifted mode DEFAULT for WDOG_SYNCBUSY */ |
Kojto | 98:8ab26030e058 | 128 | #define WDOG_SYNCBUSY_CMD (0x1UL << 1) /**< CMD Register Busy */ |
Kojto | 98:8ab26030e058 | 129 | #define _WDOG_SYNCBUSY_CMD_SHIFT 1 /**< Shift value for WDOG_CMD */ |
Kojto | 98:8ab26030e058 | 130 | #define _WDOG_SYNCBUSY_CMD_MASK 0x2UL /**< Bit mask for WDOG_CMD */ |
Kojto | 98:8ab26030e058 | 131 | #define _WDOG_SYNCBUSY_CMD_DEFAULT 0x00000000UL /**< Mode DEFAULT for WDOG_SYNCBUSY */ |
Kojto | 98:8ab26030e058 | 132 | #define WDOG_SYNCBUSY_CMD_DEFAULT (_WDOG_SYNCBUSY_CMD_DEFAULT << 1) /**< Shifted mode DEFAULT for WDOG_SYNCBUSY */ |
Kojto | 98:8ab26030e058 | 133 | |
Kojto | 98:8ab26030e058 | 134 | /** @} End of group EFM32ZG_WDOG */ |
Kojto | 113:f141b2784e32 | 135 | /** @} End of group Parts */ |
Kojto | 98:8ab26030e058 | 136 |