mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Wed Jul 01 09:45:11 2015 +0100
Revision:
579:53297373a894
Child:
592:a274ee790e56
Synchronized with git revision d5b4d2ab9c47edb4dc5776e7177b0c2263459081

Full URL: https://github.com/mbedmicro/mbed/commit/d5b4d2ab9c47edb4dc5776e7177b0c2263459081/

Initial version of drivers for SAMR21

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 579:53297373a894 1 /**
mbed_official 579:53297373a894 2 * \file
mbed_official 579:53297373a894 3 *
mbed_official 579:53297373a894 4 * \brief Component description for TCC
mbed_official 579:53297373a894 5 *
mbed_official 579:53297373a894 6 * Copyright (c) 2014 Atmel Corporation. All rights reserved.
mbed_official 579:53297373a894 7 *
mbed_official 579:53297373a894 8 * \asf_license_start
mbed_official 579:53297373a894 9 *
mbed_official 579:53297373a894 10 * \page License
mbed_official 579:53297373a894 11 *
mbed_official 579:53297373a894 12 * Redistribution and use in source and binary forms, with or without
mbed_official 579:53297373a894 13 * modification, are permitted provided that the following conditions are met:
mbed_official 579:53297373a894 14 *
mbed_official 579:53297373a894 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 579:53297373a894 16 * this list of conditions and the following disclaimer.
mbed_official 579:53297373a894 17 *
mbed_official 579:53297373a894 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 579:53297373a894 19 * this list of conditions and the following disclaimer in the documentation
mbed_official 579:53297373a894 20 * and/or other materials provided with the distribution.
mbed_official 579:53297373a894 21 *
mbed_official 579:53297373a894 22 * 3. The name of Atmel may not be used to endorse or promote products derived
mbed_official 579:53297373a894 23 * from this software without specific prior written permission.
mbed_official 579:53297373a894 24 *
mbed_official 579:53297373a894 25 * 4. This software may only be redistributed and used in connection with an
mbed_official 579:53297373a894 26 * Atmel microcontroller product.
mbed_official 579:53297373a894 27 *
mbed_official 579:53297373a894 28 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
mbed_official 579:53297373a894 29 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
mbed_official 579:53297373a894 30 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
mbed_official 579:53297373a894 31 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
mbed_official 579:53297373a894 32 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 579:53297373a894 33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
mbed_official 579:53297373a894 34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
mbed_official 579:53297373a894 35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
mbed_official 579:53297373a894 36 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
mbed_official 579:53297373a894 37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
mbed_official 579:53297373a894 38 * POSSIBILITY OF SUCH DAMAGE.
mbed_official 579:53297373a894 39 *
mbed_official 579:53297373a894 40 * \asf_license_stop
mbed_official 579:53297373a894 41 *
mbed_official 579:53297373a894 42 */
mbed_official 579:53297373a894 43 /**
mbed_official 579:53297373a894 44 * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
mbed_official 579:53297373a894 45 */
mbed_official 579:53297373a894 46
mbed_official 579:53297373a894 47 #ifndef _SAMD21_TCC_COMPONENT_
mbed_official 579:53297373a894 48 #define _SAMD21_TCC_COMPONENT_
mbed_official 579:53297373a894 49
mbed_official 579:53297373a894 50 /* ========================================================================== */
mbed_official 579:53297373a894 51 /** SOFTWARE API DEFINITION FOR TCC */
mbed_official 579:53297373a894 52 /* ========================================================================== */
mbed_official 579:53297373a894 53 /** \addtogroup SAMD21_TCC Timer Counter Control */
mbed_official 579:53297373a894 54 /*@{*/
mbed_official 579:53297373a894 55
mbed_official 579:53297373a894 56 #define TCC_U2213
mbed_official 579:53297373a894 57 #define REV_TCC 0x101
mbed_official 579:53297373a894 58
mbed_official 579:53297373a894 59 /* -------- TCC_CTRLA : (TCC Offset: 0x00) (R/W 32) Control A -------- */
mbed_official 579:53297373a894 60 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 61 typedef union {
mbed_official 579:53297373a894 62 struct {
mbed_official 579:53297373a894 63 uint32_t SWRST:1; /*!< bit: 0 Software Reset */
mbed_official 579:53297373a894 64 uint32_t ENABLE:1; /*!< bit: 1 Enable */
mbed_official 579:53297373a894 65 uint32_t :3; /*!< bit: 2.. 4 Reserved */
mbed_official 579:53297373a894 66 uint32_t RESOLUTION:2; /*!< bit: 5.. 6 Enhanced Resolution */
mbed_official 579:53297373a894 67 uint32_t :1; /*!< bit: 7 Reserved */
mbed_official 579:53297373a894 68 uint32_t PRESCALER:3; /*!< bit: 8..10 Prescaler */
mbed_official 579:53297373a894 69 uint32_t RUNSTDBY:1; /*!< bit: 11 Run in Standby */
mbed_official 579:53297373a894 70 uint32_t PRESCSYNC:2; /*!< bit: 12..13 Prescaler and Counter Synchronization Selection */
mbed_official 579:53297373a894 71 uint32_t ALOCK:1; /*!< bit: 14 Auto Lock */
mbed_official 579:53297373a894 72 uint32_t :9; /*!< bit: 15..23 Reserved */
mbed_official 579:53297373a894 73 uint32_t CPTEN0:1; /*!< bit: 24 Capture Channel 0 Enable */
mbed_official 579:53297373a894 74 uint32_t CPTEN1:1; /*!< bit: 25 Capture Channel 1 Enable */
mbed_official 579:53297373a894 75 uint32_t CPTEN2:1; /*!< bit: 26 Capture Channel 2 Enable */
mbed_official 579:53297373a894 76 uint32_t CPTEN3:1; /*!< bit: 27 Capture Channel 3 Enable */
mbed_official 579:53297373a894 77 uint32_t :4; /*!< bit: 28..31 Reserved */
mbed_official 579:53297373a894 78 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 79 struct {
mbed_official 579:53297373a894 80 uint32_t :24; /*!< bit: 0..23 Reserved */
mbed_official 579:53297373a894 81 uint32_t CPTEN:4; /*!< bit: 24..27 Capture Channel x Enable */
mbed_official 579:53297373a894 82 uint32_t :4; /*!< bit: 28..31 Reserved */
mbed_official 579:53297373a894 83 } vec; /*!< Structure used for vec access */
mbed_official 579:53297373a894 84 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 85 } TCC_CTRLA_Type;
mbed_official 579:53297373a894 86 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 87
mbed_official 579:53297373a894 88 #define TCC_CTRLA_OFFSET 0x00 /**< \brief (TCC_CTRLA offset) Control A */
mbed_official 579:53297373a894 89 #define TCC_CTRLA_RESETVALUE 0x00000000ul /**< \brief (TCC_CTRLA reset_value) Control A */
mbed_official 579:53297373a894 90
mbed_official 579:53297373a894 91 #define TCC_CTRLA_SWRST_Pos 0 /**< \brief (TCC_CTRLA) Software Reset */
mbed_official 579:53297373a894 92 #define TCC_CTRLA_SWRST (0x1ul << TCC_CTRLA_SWRST_Pos)
mbed_official 579:53297373a894 93 #define TCC_CTRLA_ENABLE_Pos 1 /**< \brief (TCC_CTRLA) Enable */
mbed_official 579:53297373a894 94 #define TCC_CTRLA_ENABLE (0x1ul << TCC_CTRLA_ENABLE_Pos)
mbed_official 579:53297373a894 95 #define TCC_CTRLA_RESOLUTION_Pos 5 /**< \brief (TCC_CTRLA) Enhanced Resolution */
mbed_official 579:53297373a894 96 #define TCC_CTRLA_RESOLUTION_Msk (0x3ul << TCC_CTRLA_RESOLUTION_Pos)
mbed_official 579:53297373a894 97 #define TCC_CTRLA_RESOLUTION(value) ((TCC_CTRLA_RESOLUTION_Msk & ((value) << TCC_CTRLA_RESOLUTION_Pos)))
mbed_official 579:53297373a894 98 #define TCC_CTRLA_RESOLUTION_NONE_Val 0x0ul /**< \brief (TCC_CTRLA) Dithering is disabled */
mbed_official 579:53297373a894 99 #define TCC_CTRLA_RESOLUTION_DITH4_Val 0x1ul /**< \brief (TCC_CTRLA) Dithering is done every 16 PWM frames */
mbed_official 579:53297373a894 100 #define TCC_CTRLA_RESOLUTION_DITH5_Val 0x2ul /**< \brief (TCC_CTRLA) Dithering is done every 32 PWM frames */
mbed_official 579:53297373a894 101 #define TCC_CTRLA_RESOLUTION_DITH6_Val 0x3ul /**< \brief (TCC_CTRLA) Dithering is done every 64 PWM frames */
mbed_official 579:53297373a894 102 #define TCC_CTRLA_RESOLUTION_NONE (TCC_CTRLA_RESOLUTION_NONE_Val << TCC_CTRLA_RESOLUTION_Pos)
mbed_official 579:53297373a894 103 #define TCC_CTRLA_RESOLUTION_DITH4 (TCC_CTRLA_RESOLUTION_DITH4_Val << TCC_CTRLA_RESOLUTION_Pos)
mbed_official 579:53297373a894 104 #define TCC_CTRLA_RESOLUTION_DITH5 (TCC_CTRLA_RESOLUTION_DITH5_Val << TCC_CTRLA_RESOLUTION_Pos)
mbed_official 579:53297373a894 105 #define TCC_CTRLA_RESOLUTION_DITH6 (TCC_CTRLA_RESOLUTION_DITH6_Val << TCC_CTRLA_RESOLUTION_Pos)
mbed_official 579:53297373a894 106 #define TCC_CTRLA_PRESCALER_Pos 8 /**< \brief (TCC_CTRLA) Prescaler */
mbed_official 579:53297373a894 107 #define TCC_CTRLA_PRESCALER_Msk (0x7ul << TCC_CTRLA_PRESCALER_Pos)
mbed_official 579:53297373a894 108 #define TCC_CTRLA_PRESCALER(value) ((TCC_CTRLA_PRESCALER_Msk & ((value) << TCC_CTRLA_PRESCALER_Pos)))
mbed_official 579:53297373a894 109 #define TCC_CTRLA_PRESCALER_DIV1_Val 0x0ul /**< \brief (TCC_CTRLA) No division */
mbed_official 579:53297373a894 110 #define TCC_CTRLA_PRESCALER_DIV2_Val 0x1ul /**< \brief (TCC_CTRLA) Divide by 2 */
mbed_official 579:53297373a894 111 #define TCC_CTRLA_PRESCALER_DIV4_Val 0x2ul /**< \brief (TCC_CTRLA) Divide by 4 */
mbed_official 579:53297373a894 112 #define TCC_CTRLA_PRESCALER_DIV8_Val 0x3ul /**< \brief (TCC_CTRLA) Divide by 8 */
mbed_official 579:53297373a894 113 #define TCC_CTRLA_PRESCALER_DIV16_Val 0x4ul /**< \brief (TCC_CTRLA) Divide by 16 */
mbed_official 579:53297373a894 114 #define TCC_CTRLA_PRESCALER_DIV64_Val 0x5ul /**< \brief (TCC_CTRLA) Divide by 64 */
mbed_official 579:53297373a894 115 #define TCC_CTRLA_PRESCALER_DIV256_Val 0x6ul /**< \brief (TCC_CTRLA) Divide by 256 */
mbed_official 579:53297373a894 116 #define TCC_CTRLA_PRESCALER_DIV1024_Val 0x7ul /**< \brief (TCC_CTRLA) Divide by 1024 */
mbed_official 579:53297373a894 117 #define TCC_CTRLA_PRESCALER_DIV1 (TCC_CTRLA_PRESCALER_DIV1_Val << TCC_CTRLA_PRESCALER_Pos)
mbed_official 579:53297373a894 118 #define TCC_CTRLA_PRESCALER_DIV2 (TCC_CTRLA_PRESCALER_DIV2_Val << TCC_CTRLA_PRESCALER_Pos)
mbed_official 579:53297373a894 119 #define TCC_CTRLA_PRESCALER_DIV4 (TCC_CTRLA_PRESCALER_DIV4_Val << TCC_CTRLA_PRESCALER_Pos)
mbed_official 579:53297373a894 120 #define TCC_CTRLA_PRESCALER_DIV8 (TCC_CTRLA_PRESCALER_DIV8_Val << TCC_CTRLA_PRESCALER_Pos)
mbed_official 579:53297373a894 121 #define TCC_CTRLA_PRESCALER_DIV16 (TCC_CTRLA_PRESCALER_DIV16_Val << TCC_CTRLA_PRESCALER_Pos)
mbed_official 579:53297373a894 122 #define TCC_CTRLA_PRESCALER_DIV64 (TCC_CTRLA_PRESCALER_DIV64_Val << TCC_CTRLA_PRESCALER_Pos)
mbed_official 579:53297373a894 123 #define TCC_CTRLA_PRESCALER_DIV256 (TCC_CTRLA_PRESCALER_DIV256_Val << TCC_CTRLA_PRESCALER_Pos)
mbed_official 579:53297373a894 124 #define TCC_CTRLA_PRESCALER_DIV1024 (TCC_CTRLA_PRESCALER_DIV1024_Val << TCC_CTRLA_PRESCALER_Pos)
mbed_official 579:53297373a894 125 #define TCC_CTRLA_RUNSTDBY_Pos 11 /**< \brief (TCC_CTRLA) Run in Standby */
mbed_official 579:53297373a894 126 #define TCC_CTRLA_RUNSTDBY (0x1ul << TCC_CTRLA_RUNSTDBY_Pos)
mbed_official 579:53297373a894 127 #define TCC_CTRLA_PRESCSYNC_Pos 12 /**< \brief (TCC_CTRLA) Prescaler and Counter Synchronization Selection */
mbed_official 579:53297373a894 128 #define TCC_CTRLA_PRESCSYNC_Msk (0x3ul << TCC_CTRLA_PRESCSYNC_Pos)
mbed_official 579:53297373a894 129 #define TCC_CTRLA_PRESCSYNC(value) ((TCC_CTRLA_PRESCSYNC_Msk & ((value) << TCC_CTRLA_PRESCSYNC_Pos)))
mbed_official 579:53297373a894 130 #define TCC_CTRLA_PRESCSYNC_GCLK_Val 0x0ul /**< \brief (TCC_CTRLA) Reload or reset counter on next GCLK */
mbed_official 579:53297373a894 131 #define TCC_CTRLA_PRESCSYNC_PRESC_Val 0x1ul /**< \brief (TCC_CTRLA) Reload or reset counter on next prescaler clock */
mbed_official 579:53297373a894 132 #define TCC_CTRLA_PRESCSYNC_RESYNC_Val 0x2ul /**< \brief (TCC_CTRLA) Reload or reset counter on next GCLK and reset prescaler counter */
mbed_official 579:53297373a894 133 #define TCC_CTRLA_PRESCSYNC_GCLK (TCC_CTRLA_PRESCSYNC_GCLK_Val << TCC_CTRLA_PRESCSYNC_Pos)
mbed_official 579:53297373a894 134 #define TCC_CTRLA_PRESCSYNC_PRESC (TCC_CTRLA_PRESCSYNC_PRESC_Val << TCC_CTRLA_PRESCSYNC_Pos)
mbed_official 579:53297373a894 135 #define TCC_CTRLA_PRESCSYNC_RESYNC (TCC_CTRLA_PRESCSYNC_RESYNC_Val << TCC_CTRLA_PRESCSYNC_Pos)
mbed_official 579:53297373a894 136 #define TCC_CTRLA_ALOCK_Pos 14 /**< \brief (TCC_CTRLA) Auto Lock */
mbed_official 579:53297373a894 137 #define TCC_CTRLA_ALOCK (0x1ul << TCC_CTRLA_ALOCK_Pos)
mbed_official 579:53297373a894 138 #define TCC_CTRLA_CPTEN0_Pos 24 /**< \brief (TCC_CTRLA) Capture Channel 0 Enable */
mbed_official 579:53297373a894 139 #define TCC_CTRLA_CPTEN0 (1 << TCC_CTRLA_CPTEN0_Pos)
mbed_official 579:53297373a894 140 #define TCC_CTRLA_CPTEN1_Pos 25 /**< \brief (TCC_CTRLA) Capture Channel 1 Enable */
mbed_official 579:53297373a894 141 #define TCC_CTRLA_CPTEN1 (1 << TCC_CTRLA_CPTEN1_Pos)
mbed_official 579:53297373a894 142 #define TCC_CTRLA_CPTEN2_Pos 26 /**< \brief (TCC_CTRLA) Capture Channel 2 Enable */
mbed_official 579:53297373a894 143 #define TCC_CTRLA_CPTEN2 (1 << TCC_CTRLA_CPTEN2_Pos)
mbed_official 579:53297373a894 144 #define TCC_CTRLA_CPTEN3_Pos 27 /**< \brief (TCC_CTRLA) Capture Channel 3 Enable */
mbed_official 579:53297373a894 145 #define TCC_CTRLA_CPTEN3 (1 << TCC_CTRLA_CPTEN3_Pos)
mbed_official 579:53297373a894 146 #define TCC_CTRLA_CPTEN_Pos 24 /**< \brief (TCC_CTRLA) Capture Channel x Enable */
mbed_official 579:53297373a894 147 #define TCC_CTRLA_CPTEN_Msk (0xFul << TCC_CTRLA_CPTEN_Pos)
mbed_official 579:53297373a894 148 #define TCC_CTRLA_CPTEN(value) ((TCC_CTRLA_CPTEN_Msk & ((value) << TCC_CTRLA_CPTEN_Pos)))
mbed_official 579:53297373a894 149 #define TCC_CTRLA_MASK 0x0F007F63ul /**< \brief (TCC_CTRLA) MASK Register */
mbed_official 579:53297373a894 150
mbed_official 579:53297373a894 151 /* -------- TCC_CTRLBCLR : (TCC Offset: 0x04) (R/W 8) Control B Clear -------- */
mbed_official 579:53297373a894 152 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 153 typedef union {
mbed_official 579:53297373a894 154 struct {
mbed_official 579:53297373a894 155 uint8_t DIR:1; /*!< bit: 0 Counter Direction */
mbed_official 579:53297373a894 156 uint8_t LUPD:1; /*!< bit: 1 Lock Update */
mbed_official 579:53297373a894 157 uint8_t ONESHOT:1; /*!< bit: 2 One-Shot */
mbed_official 579:53297373a894 158 uint8_t IDXCMD:2; /*!< bit: 3.. 4 Ramp Index Command */
mbed_official 579:53297373a894 159 uint8_t CMD:3; /*!< bit: 5.. 7 TCC Command */
mbed_official 579:53297373a894 160 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 161 uint8_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 162 } TCC_CTRLBCLR_Type;
mbed_official 579:53297373a894 163 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 164
mbed_official 579:53297373a894 165 #define TCC_CTRLBCLR_OFFSET 0x04 /**< \brief (TCC_CTRLBCLR offset) Control B Clear */
mbed_official 579:53297373a894 166 #define TCC_CTRLBCLR_RESETVALUE 0x00ul /**< \brief (TCC_CTRLBCLR reset_value) Control B Clear */
mbed_official 579:53297373a894 167
mbed_official 579:53297373a894 168 #define TCC_CTRLBCLR_DIR_Pos 0 /**< \brief (TCC_CTRLBCLR) Counter Direction */
mbed_official 579:53297373a894 169 #define TCC_CTRLBCLR_DIR (0x1ul << TCC_CTRLBCLR_DIR_Pos)
mbed_official 579:53297373a894 170 #define TCC_CTRLBCLR_LUPD_Pos 1 /**< \brief (TCC_CTRLBCLR) Lock Update */
mbed_official 579:53297373a894 171 #define TCC_CTRLBCLR_LUPD (0x1ul << TCC_CTRLBCLR_LUPD_Pos)
mbed_official 579:53297373a894 172 #define TCC_CTRLBCLR_ONESHOT_Pos 2 /**< \brief (TCC_CTRLBCLR) One-Shot */
mbed_official 579:53297373a894 173 #define TCC_CTRLBCLR_ONESHOT (0x1ul << TCC_CTRLBCLR_ONESHOT_Pos)
mbed_official 579:53297373a894 174 #define TCC_CTRLBCLR_IDXCMD_Pos 3 /**< \brief (TCC_CTRLBCLR) Ramp Index Command */
mbed_official 579:53297373a894 175 #define TCC_CTRLBCLR_IDXCMD_Msk (0x3ul << TCC_CTRLBCLR_IDXCMD_Pos)
mbed_official 579:53297373a894 176 #define TCC_CTRLBCLR_IDXCMD(value) ((TCC_CTRLBCLR_IDXCMD_Msk & ((value) << TCC_CTRLBCLR_IDXCMD_Pos)))
mbed_official 579:53297373a894 177 #define TCC_CTRLBCLR_IDXCMD_DISABLE_Val 0x0ul /**< \brief (TCC_CTRLBCLR) Command disabled: Index toggles between cycles A and B */
mbed_official 579:53297373a894 178 #define TCC_CTRLBCLR_IDXCMD_SET_Val 0x1ul /**< \brief (TCC_CTRLBCLR) Set index: cycle B will be forced in the next cycle */
mbed_official 579:53297373a894 179 #define TCC_CTRLBCLR_IDXCMD_CLEAR_Val 0x2ul /**< \brief (TCC_CTRLBCLR) Clear index: cycle A will be forced in the next cycle */
mbed_official 579:53297373a894 180 #define TCC_CTRLBCLR_IDXCMD_HOLD_Val 0x3ul /**< \brief (TCC_CTRLBCLR) Hold index: the next cycle will be the same as the current cycle */
mbed_official 579:53297373a894 181 #define TCC_CTRLBCLR_IDXCMD_DISABLE (TCC_CTRLBCLR_IDXCMD_DISABLE_Val << TCC_CTRLBCLR_IDXCMD_Pos)
mbed_official 579:53297373a894 182 #define TCC_CTRLBCLR_IDXCMD_SET (TCC_CTRLBCLR_IDXCMD_SET_Val << TCC_CTRLBCLR_IDXCMD_Pos)
mbed_official 579:53297373a894 183 #define TCC_CTRLBCLR_IDXCMD_CLEAR (TCC_CTRLBCLR_IDXCMD_CLEAR_Val << TCC_CTRLBCLR_IDXCMD_Pos)
mbed_official 579:53297373a894 184 #define TCC_CTRLBCLR_IDXCMD_HOLD (TCC_CTRLBCLR_IDXCMD_HOLD_Val << TCC_CTRLBCLR_IDXCMD_Pos)
mbed_official 579:53297373a894 185 #define TCC_CTRLBCLR_CMD_Pos 5 /**< \brief (TCC_CTRLBCLR) TCC Command */
mbed_official 579:53297373a894 186 #define TCC_CTRLBCLR_CMD_Msk (0x7ul << TCC_CTRLBCLR_CMD_Pos)
mbed_official 579:53297373a894 187 #define TCC_CTRLBCLR_CMD(value) ((TCC_CTRLBCLR_CMD_Msk & ((value) << TCC_CTRLBCLR_CMD_Pos)))
mbed_official 579:53297373a894 188 #define TCC_CTRLBCLR_CMD_NONE_Val 0x0ul /**< \brief (TCC_CTRLBCLR) No action */
mbed_official 579:53297373a894 189 #define TCC_CTRLBCLR_CMD_RETRIGGER_Val 0x1ul /**< \brief (TCC_CTRLBCLR) Clear start, restart or retrigger */
mbed_official 579:53297373a894 190 #define TCC_CTRLBCLR_CMD_STOP_Val 0x2ul /**< \brief (TCC_CTRLBCLR) Force stop */
mbed_official 579:53297373a894 191 #define TCC_CTRLBCLR_CMD_UPDATE_Val 0x3ul /**< \brief (TCC_CTRLBCLR) Force update of double buffered registers */
mbed_official 579:53297373a894 192 #define TCC_CTRLBCLR_CMD_READSYNC_Val 0x4ul /**< \brief (TCC_CTRLBCLR) Force COUNT read synchronization */
mbed_official 579:53297373a894 193 #define TCC_CTRLBCLR_CMD_NONE (TCC_CTRLBCLR_CMD_NONE_Val << TCC_CTRLBCLR_CMD_Pos)
mbed_official 579:53297373a894 194 #define TCC_CTRLBCLR_CMD_RETRIGGER (TCC_CTRLBCLR_CMD_RETRIGGER_Val << TCC_CTRLBCLR_CMD_Pos)
mbed_official 579:53297373a894 195 #define TCC_CTRLBCLR_CMD_STOP (TCC_CTRLBCLR_CMD_STOP_Val << TCC_CTRLBCLR_CMD_Pos)
mbed_official 579:53297373a894 196 #define TCC_CTRLBCLR_CMD_UPDATE (TCC_CTRLBCLR_CMD_UPDATE_Val << TCC_CTRLBCLR_CMD_Pos)
mbed_official 579:53297373a894 197 #define TCC_CTRLBCLR_CMD_READSYNC (TCC_CTRLBCLR_CMD_READSYNC_Val << TCC_CTRLBCLR_CMD_Pos)
mbed_official 579:53297373a894 198 #define TCC_CTRLBCLR_MASK 0xFFul /**< \brief (TCC_CTRLBCLR) MASK Register */
mbed_official 579:53297373a894 199
mbed_official 579:53297373a894 200 /* -------- TCC_CTRLBSET : (TCC Offset: 0x05) (R/W 8) Control B Set -------- */
mbed_official 579:53297373a894 201 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 202 typedef union {
mbed_official 579:53297373a894 203 struct {
mbed_official 579:53297373a894 204 uint8_t DIR:1; /*!< bit: 0 Counter Direction */
mbed_official 579:53297373a894 205 uint8_t LUPD:1; /*!< bit: 1 Lock Update */
mbed_official 579:53297373a894 206 uint8_t ONESHOT:1; /*!< bit: 2 One-Shot */
mbed_official 579:53297373a894 207 uint8_t IDXCMD:2; /*!< bit: 3.. 4 Ramp Index Command */
mbed_official 579:53297373a894 208 uint8_t CMD:3; /*!< bit: 5.. 7 TCC Command */
mbed_official 579:53297373a894 209 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 210 uint8_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 211 } TCC_CTRLBSET_Type;
mbed_official 579:53297373a894 212 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 213
mbed_official 579:53297373a894 214 #define TCC_CTRLBSET_OFFSET 0x05 /**< \brief (TCC_CTRLBSET offset) Control B Set */
mbed_official 579:53297373a894 215 #define TCC_CTRLBSET_RESETVALUE 0x00ul /**< \brief (TCC_CTRLBSET reset_value) Control B Set */
mbed_official 579:53297373a894 216
mbed_official 579:53297373a894 217 #define TCC_CTRLBSET_DIR_Pos 0 /**< \brief (TCC_CTRLBSET) Counter Direction */
mbed_official 579:53297373a894 218 #define TCC_CTRLBSET_DIR (0x1ul << TCC_CTRLBSET_DIR_Pos)
mbed_official 579:53297373a894 219 #define TCC_CTRLBSET_LUPD_Pos 1 /**< \brief (TCC_CTRLBSET) Lock Update */
mbed_official 579:53297373a894 220 #define TCC_CTRLBSET_LUPD (0x1ul << TCC_CTRLBSET_LUPD_Pos)
mbed_official 579:53297373a894 221 #define TCC_CTRLBSET_ONESHOT_Pos 2 /**< \brief (TCC_CTRLBSET) One-Shot */
mbed_official 579:53297373a894 222 #define TCC_CTRLBSET_ONESHOT (0x1ul << TCC_CTRLBSET_ONESHOT_Pos)
mbed_official 579:53297373a894 223 #define TCC_CTRLBSET_IDXCMD_Pos 3 /**< \brief (TCC_CTRLBSET) Ramp Index Command */
mbed_official 579:53297373a894 224 #define TCC_CTRLBSET_IDXCMD_Msk (0x3ul << TCC_CTRLBSET_IDXCMD_Pos)
mbed_official 579:53297373a894 225 #define TCC_CTRLBSET_IDXCMD(value) ((TCC_CTRLBSET_IDXCMD_Msk & ((value) << TCC_CTRLBSET_IDXCMD_Pos)))
mbed_official 579:53297373a894 226 #define TCC_CTRLBSET_IDXCMD_DISABLE_Val 0x0ul /**< \brief (TCC_CTRLBSET) Command disabled: Index toggles between cycles A and B */
mbed_official 579:53297373a894 227 #define TCC_CTRLBSET_IDXCMD_SET_Val 0x1ul /**< \brief (TCC_CTRLBSET) Set index: cycle B will be forced in the next cycle */
mbed_official 579:53297373a894 228 #define TCC_CTRLBSET_IDXCMD_CLEAR_Val 0x2ul /**< \brief (TCC_CTRLBSET) Clear index: cycle A will be forced in the next cycle */
mbed_official 579:53297373a894 229 #define TCC_CTRLBSET_IDXCMD_HOLD_Val 0x3ul /**< \brief (TCC_CTRLBSET) Hold index: the next cycle will be the same as the current cycle */
mbed_official 579:53297373a894 230 #define TCC_CTRLBSET_IDXCMD_DISABLE (TCC_CTRLBSET_IDXCMD_DISABLE_Val << TCC_CTRLBSET_IDXCMD_Pos)
mbed_official 579:53297373a894 231 #define TCC_CTRLBSET_IDXCMD_SET (TCC_CTRLBSET_IDXCMD_SET_Val << TCC_CTRLBSET_IDXCMD_Pos)
mbed_official 579:53297373a894 232 #define TCC_CTRLBSET_IDXCMD_CLEAR (TCC_CTRLBSET_IDXCMD_CLEAR_Val << TCC_CTRLBSET_IDXCMD_Pos)
mbed_official 579:53297373a894 233 #define TCC_CTRLBSET_IDXCMD_HOLD (TCC_CTRLBSET_IDXCMD_HOLD_Val << TCC_CTRLBSET_IDXCMD_Pos)
mbed_official 579:53297373a894 234 #define TCC_CTRLBSET_CMD_Pos 5 /**< \brief (TCC_CTRLBSET) TCC Command */
mbed_official 579:53297373a894 235 #define TCC_CTRLBSET_CMD_Msk (0x7ul << TCC_CTRLBSET_CMD_Pos)
mbed_official 579:53297373a894 236 #define TCC_CTRLBSET_CMD(value) ((TCC_CTRLBSET_CMD_Msk & ((value) << TCC_CTRLBSET_CMD_Pos)))
mbed_official 579:53297373a894 237 #define TCC_CTRLBSET_CMD_NONE_Val 0x0ul /**< \brief (TCC_CTRLBSET) No action */
mbed_official 579:53297373a894 238 #define TCC_CTRLBSET_CMD_RETRIGGER_Val 0x1ul /**< \brief (TCC_CTRLBSET) Clear start, restart or retrigger */
mbed_official 579:53297373a894 239 #define TCC_CTRLBSET_CMD_STOP_Val 0x2ul /**< \brief (TCC_CTRLBSET) Force stop */
mbed_official 579:53297373a894 240 #define TCC_CTRLBSET_CMD_UPDATE_Val 0x3ul /**< \brief (TCC_CTRLBSET) Force update of double buffered registers */
mbed_official 579:53297373a894 241 #define TCC_CTRLBSET_CMD_READSYNC_Val 0x4ul /**< \brief (TCC_CTRLBSET) Force COUNT read synchronization */
mbed_official 579:53297373a894 242 #define TCC_CTRLBSET_CMD_NONE (TCC_CTRLBSET_CMD_NONE_Val << TCC_CTRLBSET_CMD_Pos)
mbed_official 579:53297373a894 243 #define TCC_CTRLBSET_CMD_RETRIGGER (TCC_CTRLBSET_CMD_RETRIGGER_Val << TCC_CTRLBSET_CMD_Pos)
mbed_official 579:53297373a894 244 #define TCC_CTRLBSET_CMD_STOP (TCC_CTRLBSET_CMD_STOP_Val << TCC_CTRLBSET_CMD_Pos)
mbed_official 579:53297373a894 245 #define TCC_CTRLBSET_CMD_UPDATE (TCC_CTRLBSET_CMD_UPDATE_Val << TCC_CTRLBSET_CMD_Pos)
mbed_official 579:53297373a894 246 #define TCC_CTRLBSET_CMD_READSYNC (TCC_CTRLBSET_CMD_READSYNC_Val << TCC_CTRLBSET_CMD_Pos)
mbed_official 579:53297373a894 247 #define TCC_CTRLBSET_MASK 0xFFul /**< \brief (TCC_CTRLBSET) MASK Register */
mbed_official 579:53297373a894 248
mbed_official 579:53297373a894 249 /* -------- TCC_SYNCBUSY : (TCC Offset: 0x08) (R/ 32) Synchronization Busy -------- */
mbed_official 579:53297373a894 250 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 251 typedef union {
mbed_official 579:53297373a894 252 struct {
mbed_official 579:53297373a894 253 uint32_t SWRST:1; /*!< bit: 0 Swrst Busy */
mbed_official 579:53297373a894 254 uint32_t ENABLE:1; /*!< bit: 1 Enable Busy */
mbed_official 579:53297373a894 255 uint32_t CTRLB:1; /*!< bit: 2 Ctrlb Busy */
mbed_official 579:53297373a894 256 uint32_t STATUS:1; /*!< bit: 3 Status Busy */
mbed_official 579:53297373a894 257 uint32_t COUNT:1; /*!< bit: 4 Count Busy */
mbed_official 579:53297373a894 258 uint32_t PATT:1; /*!< bit: 5 Pattern Busy */
mbed_official 579:53297373a894 259 uint32_t WAVE:1; /*!< bit: 6 Wave Busy */
mbed_official 579:53297373a894 260 uint32_t PER:1; /*!< bit: 7 Period busy */
mbed_official 579:53297373a894 261 uint32_t CC0:1; /*!< bit: 8 Compare Channel 0 Busy */
mbed_official 579:53297373a894 262 uint32_t CC1:1; /*!< bit: 9 Compare Channel 1 Busy */
mbed_official 579:53297373a894 263 uint32_t CC2:1; /*!< bit: 10 Compare Channel 2 Busy */
mbed_official 579:53297373a894 264 uint32_t CC3:1; /*!< bit: 11 Compare Channel 3 Busy */
mbed_official 579:53297373a894 265 uint32_t :4; /*!< bit: 12..15 Reserved */
mbed_official 579:53297373a894 266 uint32_t PATTB:1; /*!< bit: 16 Pattern Buffer Busy */
mbed_official 579:53297373a894 267 uint32_t WAVEB:1; /*!< bit: 17 Wave Buffer Busy */
mbed_official 579:53297373a894 268 uint32_t PERB:1; /*!< bit: 18 Period Buffer Busy */
mbed_official 579:53297373a894 269 uint32_t CCB0:1; /*!< bit: 19 Compare Channel Buffer 0 Busy */
mbed_official 579:53297373a894 270 uint32_t CCB1:1; /*!< bit: 20 Compare Channel Buffer 1 Busy */
mbed_official 579:53297373a894 271 uint32_t CCB2:1; /*!< bit: 21 Compare Channel Buffer 2 Busy */
mbed_official 579:53297373a894 272 uint32_t CCB3:1; /*!< bit: 22 Compare Channel Buffer 3 Busy */
mbed_official 579:53297373a894 273 uint32_t :9; /*!< bit: 23..31 Reserved */
mbed_official 579:53297373a894 274 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 275 struct {
mbed_official 579:53297373a894 276 uint32_t :8; /*!< bit: 0.. 7 Reserved */
mbed_official 579:53297373a894 277 uint32_t CC:4; /*!< bit: 8..11 Compare Channel x Busy */
mbed_official 579:53297373a894 278 uint32_t :7; /*!< bit: 12..18 Reserved */
mbed_official 579:53297373a894 279 uint32_t CCB:4; /*!< bit: 19..22 Compare Channel Buffer x Busy */
mbed_official 579:53297373a894 280 uint32_t :9; /*!< bit: 23..31 Reserved */
mbed_official 579:53297373a894 281 } vec; /*!< Structure used for vec access */
mbed_official 579:53297373a894 282 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 283 } TCC_SYNCBUSY_Type;
mbed_official 579:53297373a894 284 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 285
mbed_official 579:53297373a894 286 #define TCC_SYNCBUSY_OFFSET 0x08 /**< \brief (TCC_SYNCBUSY offset) Synchronization Busy */
mbed_official 579:53297373a894 287 #define TCC_SYNCBUSY_RESETVALUE 0x00000000ul /**< \brief (TCC_SYNCBUSY reset_value) Synchronization Busy */
mbed_official 579:53297373a894 288
mbed_official 579:53297373a894 289 #define TCC_SYNCBUSY_SWRST_Pos 0 /**< \brief (TCC_SYNCBUSY) Swrst Busy */
mbed_official 579:53297373a894 290 #define TCC_SYNCBUSY_SWRST (0x1ul << TCC_SYNCBUSY_SWRST_Pos)
mbed_official 579:53297373a894 291 #define TCC_SYNCBUSY_ENABLE_Pos 1 /**< \brief (TCC_SYNCBUSY) Enable Busy */
mbed_official 579:53297373a894 292 #define TCC_SYNCBUSY_ENABLE (0x1ul << TCC_SYNCBUSY_ENABLE_Pos)
mbed_official 579:53297373a894 293 #define TCC_SYNCBUSY_CTRLB_Pos 2 /**< \brief (TCC_SYNCBUSY) Ctrlb Busy */
mbed_official 579:53297373a894 294 #define TCC_SYNCBUSY_CTRLB (0x1ul << TCC_SYNCBUSY_CTRLB_Pos)
mbed_official 579:53297373a894 295 #define TCC_SYNCBUSY_STATUS_Pos 3 /**< \brief (TCC_SYNCBUSY) Status Busy */
mbed_official 579:53297373a894 296 #define TCC_SYNCBUSY_STATUS (0x1ul << TCC_SYNCBUSY_STATUS_Pos)
mbed_official 579:53297373a894 297 #define TCC_SYNCBUSY_COUNT_Pos 4 /**< \brief (TCC_SYNCBUSY) Count Busy */
mbed_official 579:53297373a894 298 #define TCC_SYNCBUSY_COUNT (0x1ul << TCC_SYNCBUSY_COUNT_Pos)
mbed_official 579:53297373a894 299 #define TCC_SYNCBUSY_PATT_Pos 5 /**< \brief (TCC_SYNCBUSY) Pattern Busy */
mbed_official 579:53297373a894 300 #define TCC_SYNCBUSY_PATT (0x1ul << TCC_SYNCBUSY_PATT_Pos)
mbed_official 579:53297373a894 301 #define TCC_SYNCBUSY_WAVE_Pos 6 /**< \brief (TCC_SYNCBUSY) Wave Busy */
mbed_official 579:53297373a894 302 #define TCC_SYNCBUSY_WAVE (0x1ul << TCC_SYNCBUSY_WAVE_Pos)
mbed_official 579:53297373a894 303 #define TCC_SYNCBUSY_PER_Pos 7 /**< \brief (TCC_SYNCBUSY) Period busy */
mbed_official 579:53297373a894 304 #define TCC_SYNCBUSY_PER (0x1ul << TCC_SYNCBUSY_PER_Pos)
mbed_official 579:53297373a894 305 #define TCC_SYNCBUSY_CC0_Pos 8 /**< \brief (TCC_SYNCBUSY) Compare Channel 0 Busy */
mbed_official 579:53297373a894 306 #define TCC_SYNCBUSY_CC0 (1 << TCC_SYNCBUSY_CC0_Pos)
mbed_official 579:53297373a894 307 #define TCC_SYNCBUSY_CC1_Pos 9 /**< \brief (TCC_SYNCBUSY) Compare Channel 1 Busy */
mbed_official 579:53297373a894 308 #define TCC_SYNCBUSY_CC1 (1 << TCC_SYNCBUSY_CC1_Pos)
mbed_official 579:53297373a894 309 #define TCC_SYNCBUSY_CC2_Pos 10 /**< \brief (TCC_SYNCBUSY) Compare Channel 2 Busy */
mbed_official 579:53297373a894 310 #define TCC_SYNCBUSY_CC2 (1 << TCC_SYNCBUSY_CC2_Pos)
mbed_official 579:53297373a894 311 #define TCC_SYNCBUSY_CC3_Pos 11 /**< \brief (TCC_SYNCBUSY) Compare Channel 3 Busy */
mbed_official 579:53297373a894 312 #define TCC_SYNCBUSY_CC3 (1 << TCC_SYNCBUSY_CC3_Pos)
mbed_official 579:53297373a894 313 #define TCC_SYNCBUSY_CC_Pos 8 /**< \brief (TCC_SYNCBUSY) Compare Channel x Busy */
mbed_official 579:53297373a894 314 #define TCC_SYNCBUSY_CC_Msk (0xFul << TCC_SYNCBUSY_CC_Pos)
mbed_official 579:53297373a894 315 #define TCC_SYNCBUSY_CC(value) ((TCC_SYNCBUSY_CC_Msk & ((value) << TCC_SYNCBUSY_CC_Pos)))
mbed_official 579:53297373a894 316 #define TCC_SYNCBUSY_PATTB_Pos 16 /**< \brief (TCC_SYNCBUSY) Pattern Buffer Busy */
mbed_official 579:53297373a894 317 #define TCC_SYNCBUSY_PATTB (0x1ul << TCC_SYNCBUSY_PATTB_Pos)
mbed_official 579:53297373a894 318 #define TCC_SYNCBUSY_WAVEB_Pos 17 /**< \brief (TCC_SYNCBUSY) Wave Buffer Busy */
mbed_official 579:53297373a894 319 #define TCC_SYNCBUSY_WAVEB (0x1ul << TCC_SYNCBUSY_WAVEB_Pos)
mbed_official 579:53297373a894 320 #define TCC_SYNCBUSY_PERB_Pos 18 /**< \brief (TCC_SYNCBUSY) Period Buffer Busy */
mbed_official 579:53297373a894 321 #define TCC_SYNCBUSY_PERB (0x1ul << TCC_SYNCBUSY_PERB_Pos)
mbed_official 579:53297373a894 322 #define TCC_SYNCBUSY_CCB0_Pos 19 /**< \brief (TCC_SYNCBUSY) Compare Channel Buffer 0 Busy */
mbed_official 579:53297373a894 323 #define TCC_SYNCBUSY_CCB0 (1 << TCC_SYNCBUSY_CCB0_Pos)
mbed_official 579:53297373a894 324 #define TCC_SYNCBUSY_CCB1_Pos 20 /**< \brief (TCC_SYNCBUSY) Compare Channel Buffer 1 Busy */
mbed_official 579:53297373a894 325 #define TCC_SYNCBUSY_CCB1 (1 << TCC_SYNCBUSY_CCB1_Pos)
mbed_official 579:53297373a894 326 #define TCC_SYNCBUSY_CCB2_Pos 21 /**< \brief (TCC_SYNCBUSY) Compare Channel Buffer 2 Busy */
mbed_official 579:53297373a894 327 #define TCC_SYNCBUSY_CCB2 (1 << TCC_SYNCBUSY_CCB2_Pos)
mbed_official 579:53297373a894 328 #define TCC_SYNCBUSY_CCB3_Pos 22 /**< \brief (TCC_SYNCBUSY) Compare Channel Buffer 3 Busy */
mbed_official 579:53297373a894 329 #define TCC_SYNCBUSY_CCB3 (1 << TCC_SYNCBUSY_CCB3_Pos)
mbed_official 579:53297373a894 330 #define TCC_SYNCBUSY_CCB_Pos 19 /**< \brief (TCC_SYNCBUSY) Compare Channel Buffer x Busy */
mbed_official 579:53297373a894 331 #define TCC_SYNCBUSY_CCB_Msk (0xFul << TCC_SYNCBUSY_CCB_Pos)
mbed_official 579:53297373a894 332 #define TCC_SYNCBUSY_CCB(value) ((TCC_SYNCBUSY_CCB_Msk & ((value) << TCC_SYNCBUSY_CCB_Pos)))
mbed_official 579:53297373a894 333 #define TCC_SYNCBUSY_MASK 0x007F0FFFul /**< \brief (TCC_SYNCBUSY) MASK Register */
mbed_official 579:53297373a894 334
mbed_official 579:53297373a894 335 /* -------- TCC_FCTRLA : (TCC Offset: 0x0C) (R/W 32) Recoverable Fault A Configuration -------- */
mbed_official 579:53297373a894 336 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 337 typedef union {
mbed_official 579:53297373a894 338 struct {
mbed_official 579:53297373a894 339 uint32_t SRC:2; /*!< bit: 0.. 1 Fault A Source */
mbed_official 579:53297373a894 340 uint32_t :1; /*!< bit: 2 Reserved */
mbed_official 579:53297373a894 341 uint32_t KEEP:1; /*!< bit: 3 Fault A Keeper */
mbed_official 579:53297373a894 342 uint32_t QUAL:1; /*!< bit: 4 Fault A Qualification */
mbed_official 579:53297373a894 343 uint32_t BLANK:2; /*!< bit: 5.. 6 Fault A Blanking Mode */
mbed_official 579:53297373a894 344 uint32_t RESTART:1; /*!< bit: 7 Fault A Restart */
mbed_official 579:53297373a894 345 uint32_t HALT:2; /*!< bit: 8.. 9 Fault A Halt Mode */
mbed_official 579:53297373a894 346 uint32_t CHSEL:2; /*!< bit: 10..11 Fault A Capture Channel */
mbed_official 579:53297373a894 347 uint32_t CAPTURE:3; /*!< bit: 12..14 Fault A Capture Action */
mbed_official 579:53297373a894 348 uint32_t :1; /*!< bit: 15 Reserved */
mbed_official 579:53297373a894 349 uint32_t BLANKVAL:8; /*!< bit: 16..23 Fault A Blanking Time */
mbed_official 579:53297373a894 350 uint32_t FILTERVAL:4; /*!< bit: 24..27 Fault A Filter Value */
mbed_official 579:53297373a894 351 uint32_t :4; /*!< bit: 28..31 Reserved */
mbed_official 579:53297373a894 352 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 353 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 354 } TCC_FCTRLA_Type;
mbed_official 579:53297373a894 355 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 356
mbed_official 579:53297373a894 357 #define TCC_FCTRLA_OFFSET 0x0C /**< \brief (TCC_FCTRLA offset) Recoverable Fault A Configuration */
mbed_official 579:53297373a894 358 #define TCC_FCTRLA_RESETVALUE 0x00000000ul /**< \brief (TCC_FCTRLA reset_value) Recoverable Fault A Configuration */
mbed_official 579:53297373a894 359
mbed_official 579:53297373a894 360 #define TCC_FCTRLA_SRC_Pos 0 /**< \brief (TCC_FCTRLA) Fault A Source */
mbed_official 579:53297373a894 361 #define TCC_FCTRLA_SRC_Msk (0x3ul << TCC_FCTRLA_SRC_Pos)
mbed_official 579:53297373a894 362 #define TCC_FCTRLA_SRC(value) ((TCC_FCTRLA_SRC_Msk & ((value) << TCC_FCTRLA_SRC_Pos)))
mbed_official 579:53297373a894 363 #define TCC_FCTRLA_SRC_DISABLE_Val 0x0ul /**< \brief (TCC_FCTRLA) Fault input disabled */
mbed_official 579:53297373a894 364 #define TCC_FCTRLA_SRC_ENABLE_Val 0x1ul /**< \brief (TCC_FCTRLA) MCEx (x=0,1) event input */
mbed_official 579:53297373a894 365 #define TCC_FCTRLA_SRC_INVERT_Val 0x2ul /**< \brief (TCC_FCTRLA) Inverted MCEx (x=0,1) event input */
mbed_official 579:53297373a894 366 #define TCC_FCTRLA_SRC_ALTFAULT_Val 0x3ul /**< \brief (TCC_FCTRLA) Alternate fault (A or B) state at the end of the previous period */
mbed_official 579:53297373a894 367 #define TCC_FCTRLA_SRC_DISABLE (TCC_FCTRLA_SRC_DISABLE_Val << TCC_FCTRLA_SRC_Pos)
mbed_official 579:53297373a894 368 #define TCC_FCTRLA_SRC_ENABLE (TCC_FCTRLA_SRC_ENABLE_Val << TCC_FCTRLA_SRC_Pos)
mbed_official 579:53297373a894 369 #define TCC_FCTRLA_SRC_INVERT (TCC_FCTRLA_SRC_INVERT_Val << TCC_FCTRLA_SRC_Pos)
mbed_official 579:53297373a894 370 #define TCC_FCTRLA_SRC_ALTFAULT (TCC_FCTRLA_SRC_ALTFAULT_Val << TCC_FCTRLA_SRC_Pos)
mbed_official 579:53297373a894 371 #define TCC_FCTRLA_KEEP_Pos 3 /**< \brief (TCC_FCTRLA) Fault A Keeper */
mbed_official 579:53297373a894 372 #define TCC_FCTRLA_KEEP (0x1ul << TCC_FCTRLA_KEEP_Pos)
mbed_official 579:53297373a894 373 #define TCC_FCTRLA_QUAL_Pos 4 /**< \brief (TCC_FCTRLA) Fault A Qualification */
mbed_official 579:53297373a894 374 #define TCC_FCTRLA_QUAL (0x1ul << TCC_FCTRLA_QUAL_Pos)
mbed_official 579:53297373a894 375 #define TCC_FCTRLA_BLANK_Pos 5 /**< \brief (TCC_FCTRLA) Fault A Blanking Mode */
mbed_official 579:53297373a894 376 #define TCC_FCTRLA_BLANK_Msk (0x3ul << TCC_FCTRLA_BLANK_Pos)
mbed_official 579:53297373a894 377 #define TCC_FCTRLA_BLANK(value) ((TCC_FCTRLA_BLANK_Msk & ((value) << TCC_FCTRLA_BLANK_Pos)))
mbed_official 579:53297373a894 378 #define TCC_FCTRLA_BLANK_NONE_Val 0x0ul /**< \brief (TCC_FCTRLA) No blanking applied */
mbed_official 579:53297373a894 379 #define TCC_FCTRLA_BLANK_RISE_Val 0x1ul /**< \brief (TCC_FCTRLA) Blanking applied from rising edge of the output waveform */
mbed_official 579:53297373a894 380 #define TCC_FCTRLA_BLANK_FALL_Val 0x2ul /**< \brief (TCC_FCTRLA) Blanking applied from falling edge of the output waveform */
mbed_official 579:53297373a894 381 #define TCC_FCTRLA_BLANK_BOTH_Val 0x3ul /**< \brief (TCC_FCTRLA) Blanking applied from each toggle of the output waveform */
mbed_official 579:53297373a894 382 #define TCC_FCTRLA_BLANK_NONE (TCC_FCTRLA_BLANK_NONE_Val << TCC_FCTRLA_BLANK_Pos)
mbed_official 579:53297373a894 383 #define TCC_FCTRLA_BLANK_RISE (TCC_FCTRLA_BLANK_RISE_Val << TCC_FCTRLA_BLANK_Pos)
mbed_official 579:53297373a894 384 #define TCC_FCTRLA_BLANK_FALL (TCC_FCTRLA_BLANK_FALL_Val << TCC_FCTRLA_BLANK_Pos)
mbed_official 579:53297373a894 385 #define TCC_FCTRLA_BLANK_BOTH (TCC_FCTRLA_BLANK_BOTH_Val << TCC_FCTRLA_BLANK_Pos)
mbed_official 579:53297373a894 386 #define TCC_FCTRLA_RESTART_Pos 7 /**< \brief (TCC_FCTRLA) Fault A Restart */
mbed_official 579:53297373a894 387 #define TCC_FCTRLA_RESTART (0x1ul << TCC_FCTRLA_RESTART_Pos)
mbed_official 579:53297373a894 388 #define TCC_FCTRLA_HALT_Pos 8 /**< \brief (TCC_FCTRLA) Fault A Halt Mode */
mbed_official 579:53297373a894 389 #define TCC_FCTRLA_HALT_Msk (0x3ul << TCC_FCTRLA_HALT_Pos)
mbed_official 579:53297373a894 390 #define TCC_FCTRLA_HALT(value) ((TCC_FCTRLA_HALT_Msk & ((value) << TCC_FCTRLA_HALT_Pos)))
mbed_official 579:53297373a894 391 #define TCC_FCTRLA_HALT_DISABLE_Val 0x0ul /**< \brief (TCC_FCTRLA) Halt action disabled */
mbed_official 579:53297373a894 392 #define TCC_FCTRLA_HALT_HW_Val 0x1ul /**< \brief (TCC_FCTRLA) Hardware halt action */
mbed_official 579:53297373a894 393 #define TCC_FCTRLA_HALT_SW_Val 0x2ul /**< \brief (TCC_FCTRLA) Software halt action */
mbed_official 579:53297373a894 394 #define TCC_FCTRLA_HALT_NR_Val 0x3ul /**< \brief (TCC_FCTRLA) Non-recoverable fault */
mbed_official 579:53297373a894 395 #define TCC_FCTRLA_HALT_DISABLE (TCC_FCTRLA_HALT_DISABLE_Val << TCC_FCTRLA_HALT_Pos)
mbed_official 579:53297373a894 396 #define TCC_FCTRLA_HALT_HW (TCC_FCTRLA_HALT_HW_Val << TCC_FCTRLA_HALT_Pos)
mbed_official 579:53297373a894 397 #define TCC_FCTRLA_HALT_SW (TCC_FCTRLA_HALT_SW_Val << TCC_FCTRLA_HALT_Pos)
mbed_official 579:53297373a894 398 #define TCC_FCTRLA_HALT_NR (TCC_FCTRLA_HALT_NR_Val << TCC_FCTRLA_HALT_Pos)
mbed_official 579:53297373a894 399 #define TCC_FCTRLA_CHSEL_Pos 10 /**< \brief (TCC_FCTRLA) Fault A Capture Channel */
mbed_official 579:53297373a894 400 #define TCC_FCTRLA_CHSEL_Msk (0x3ul << TCC_FCTRLA_CHSEL_Pos)
mbed_official 579:53297373a894 401 #define TCC_FCTRLA_CHSEL(value) ((TCC_FCTRLA_CHSEL_Msk & ((value) << TCC_FCTRLA_CHSEL_Pos)))
mbed_official 579:53297373a894 402 #define TCC_FCTRLA_CHSEL_CC0_Val 0x0ul /**< \brief (TCC_FCTRLA) Capture value stored in channel 0 */
mbed_official 579:53297373a894 403 #define TCC_FCTRLA_CHSEL_CC1_Val 0x1ul /**< \brief (TCC_FCTRLA) Capture value stored in channel 1 */
mbed_official 579:53297373a894 404 #define TCC_FCTRLA_CHSEL_CC2_Val 0x2ul /**< \brief (TCC_FCTRLA) Capture value stored in channel 2 */
mbed_official 579:53297373a894 405 #define TCC_FCTRLA_CHSEL_CC3_Val 0x3ul /**< \brief (TCC_FCTRLA) Capture value stored in channel 3 */
mbed_official 579:53297373a894 406 #define TCC_FCTRLA_CHSEL_CC0 (TCC_FCTRLA_CHSEL_CC0_Val << TCC_FCTRLA_CHSEL_Pos)
mbed_official 579:53297373a894 407 #define TCC_FCTRLA_CHSEL_CC1 (TCC_FCTRLA_CHSEL_CC1_Val << TCC_FCTRLA_CHSEL_Pos)
mbed_official 579:53297373a894 408 #define TCC_FCTRLA_CHSEL_CC2 (TCC_FCTRLA_CHSEL_CC2_Val << TCC_FCTRLA_CHSEL_Pos)
mbed_official 579:53297373a894 409 #define TCC_FCTRLA_CHSEL_CC3 (TCC_FCTRLA_CHSEL_CC3_Val << TCC_FCTRLA_CHSEL_Pos)
mbed_official 579:53297373a894 410 #define TCC_FCTRLA_CAPTURE_Pos 12 /**< \brief (TCC_FCTRLA) Fault A Capture Action */
mbed_official 579:53297373a894 411 #define TCC_FCTRLA_CAPTURE_Msk (0x7ul << TCC_FCTRLA_CAPTURE_Pos)
mbed_official 579:53297373a894 412 #define TCC_FCTRLA_CAPTURE(value) ((TCC_FCTRLA_CAPTURE_Msk & ((value) << TCC_FCTRLA_CAPTURE_Pos)))
mbed_official 579:53297373a894 413 #define TCC_FCTRLA_CAPTURE_DISABLE_Val 0x0ul /**< \brief (TCC_FCTRLA) No capture */
mbed_official 579:53297373a894 414 #define TCC_FCTRLA_CAPTURE_CAPT_Val 0x1ul /**< \brief (TCC_FCTRLA) Capture on fault */
mbed_official 579:53297373a894 415 #define TCC_FCTRLA_CAPTURE_CAPTMIN_Val 0x2ul /**< \brief (TCC_FCTRLA) Minimum capture */
mbed_official 579:53297373a894 416 #define TCC_FCTRLA_CAPTURE_CAPTMAX_Val 0x3ul /**< \brief (TCC_FCTRLA) Maximum capture */
mbed_official 579:53297373a894 417 #define TCC_FCTRLA_CAPTURE_LOCMIN_Val 0x4ul /**< \brief (TCC_FCTRLA) Minimum local detection */
mbed_official 579:53297373a894 418 #define TCC_FCTRLA_CAPTURE_LOCMAX_Val 0x5ul /**< \brief (TCC_FCTRLA) Maximum local detection */
mbed_official 579:53297373a894 419 #define TCC_FCTRLA_CAPTURE_DERIV0_Val 0x6ul /**< \brief (TCC_FCTRLA) Minimum and maximum local detection */
mbed_official 579:53297373a894 420 #define TCC_FCTRLA_CAPTURE_DISABLE (TCC_FCTRLA_CAPTURE_DISABLE_Val << TCC_FCTRLA_CAPTURE_Pos)
mbed_official 579:53297373a894 421 #define TCC_FCTRLA_CAPTURE_CAPT (TCC_FCTRLA_CAPTURE_CAPT_Val << TCC_FCTRLA_CAPTURE_Pos)
mbed_official 579:53297373a894 422 #define TCC_FCTRLA_CAPTURE_CAPTMIN (TCC_FCTRLA_CAPTURE_CAPTMIN_Val << TCC_FCTRLA_CAPTURE_Pos)
mbed_official 579:53297373a894 423 #define TCC_FCTRLA_CAPTURE_CAPTMAX (TCC_FCTRLA_CAPTURE_CAPTMAX_Val << TCC_FCTRLA_CAPTURE_Pos)
mbed_official 579:53297373a894 424 #define TCC_FCTRLA_CAPTURE_LOCMIN (TCC_FCTRLA_CAPTURE_LOCMIN_Val << TCC_FCTRLA_CAPTURE_Pos)
mbed_official 579:53297373a894 425 #define TCC_FCTRLA_CAPTURE_LOCMAX (TCC_FCTRLA_CAPTURE_LOCMAX_Val << TCC_FCTRLA_CAPTURE_Pos)
mbed_official 579:53297373a894 426 #define TCC_FCTRLA_CAPTURE_DERIV0 (TCC_FCTRLA_CAPTURE_DERIV0_Val << TCC_FCTRLA_CAPTURE_Pos)
mbed_official 579:53297373a894 427 #define TCC_FCTRLA_BLANKVAL_Pos 16 /**< \brief (TCC_FCTRLA) Fault A Blanking Time */
mbed_official 579:53297373a894 428 #define TCC_FCTRLA_BLANKVAL_Msk (0xFFul << TCC_FCTRLA_BLANKVAL_Pos)
mbed_official 579:53297373a894 429 #define TCC_FCTRLA_BLANKVAL(value) ((TCC_FCTRLA_BLANKVAL_Msk & ((value) << TCC_FCTRLA_BLANKVAL_Pos)))
mbed_official 579:53297373a894 430 #define TCC_FCTRLA_FILTERVAL_Pos 24 /**< \brief (TCC_FCTRLA) Fault A Filter Value */
mbed_official 579:53297373a894 431 #define TCC_FCTRLA_FILTERVAL_Msk (0xFul << TCC_FCTRLA_FILTERVAL_Pos)
mbed_official 579:53297373a894 432 #define TCC_FCTRLA_FILTERVAL(value) ((TCC_FCTRLA_FILTERVAL_Msk & ((value) << TCC_FCTRLA_FILTERVAL_Pos)))
mbed_official 579:53297373a894 433 #define TCC_FCTRLA_MASK 0x0FFF7FFBul /**< \brief (TCC_FCTRLA) MASK Register */
mbed_official 579:53297373a894 434
mbed_official 579:53297373a894 435 /* -------- TCC_FCTRLB : (TCC Offset: 0x10) (R/W 32) Recoverable Fault B Configuration -------- */
mbed_official 579:53297373a894 436 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 437 typedef union {
mbed_official 579:53297373a894 438 struct {
mbed_official 579:53297373a894 439 uint32_t SRC:2; /*!< bit: 0.. 1 Fault B Source */
mbed_official 579:53297373a894 440 uint32_t :1; /*!< bit: 2 Reserved */
mbed_official 579:53297373a894 441 uint32_t KEEP:1; /*!< bit: 3 Fault B Keeper */
mbed_official 579:53297373a894 442 uint32_t QUAL:1; /*!< bit: 4 Fault B Qualification */
mbed_official 579:53297373a894 443 uint32_t BLANK:2; /*!< bit: 5.. 6 Fault B Blanking Mode */
mbed_official 579:53297373a894 444 uint32_t RESTART:1; /*!< bit: 7 Fault B Restart */
mbed_official 579:53297373a894 445 uint32_t HALT:2; /*!< bit: 8.. 9 Fault B Halt Mode */
mbed_official 579:53297373a894 446 uint32_t CHSEL:2; /*!< bit: 10..11 Fault B Capture Channel */
mbed_official 579:53297373a894 447 uint32_t CAPTURE:3; /*!< bit: 12..14 Fault B Capture Action */
mbed_official 579:53297373a894 448 uint32_t :1; /*!< bit: 15 Reserved */
mbed_official 579:53297373a894 449 uint32_t BLANKVAL:8; /*!< bit: 16..23 Fault B Blanking Time */
mbed_official 579:53297373a894 450 uint32_t FILTERVAL:4; /*!< bit: 24..27 Fault B Filter Value */
mbed_official 579:53297373a894 451 uint32_t :4; /*!< bit: 28..31 Reserved */
mbed_official 579:53297373a894 452 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 453 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 454 } TCC_FCTRLB_Type;
mbed_official 579:53297373a894 455 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 456
mbed_official 579:53297373a894 457 #define TCC_FCTRLB_OFFSET 0x10 /**< \brief (TCC_FCTRLB offset) Recoverable Fault B Configuration */
mbed_official 579:53297373a894 458 #define TCC_FCTRLB_RESETVALUE 0x00000000ul /**< \brief (TCC_FCTRLB reset_value) Recoverable Fault B Configuration */
mbed_official 579:53297373a894 459
mbed_official 579:53297373a894 460 #define TCC_FCTRLB_SRC_Pos 0 /**< \brief (TCC_FCTRLB) Fault B Source */
mbed_official 579:53297373a894 461 #define TCC_FCTRLB_SRC_Msk (0x3ul << TCC_FCTRLB_SRC_Pos)
mbed_official 579:53297373a894 462 #define TCC_FCTRLB_SRC(value) ((TCC_FCTRLB_SRC_Msk & ((value) << TCC_FCTRLB_SRC_Pos)))
mbed_official 579:53297373a894 463 #define TCC_FCTRLB_SRC_DISABLE_Val 0x0ul /**< \brief (TCC_FCTRLB) Fault input disabled */
mbed_official 579:53297373a894 464 #define TCC_FCTRLB_SRC_ENABLE_Val 0x1ul /**< \brief (TCC_FCTRLB) MCEx (x=0,1) event input */
mbed_official 579:53297373a894 465 #define TCC_FCTRLB_SRC_INVERT_Val 0x2ul /**< \brief (TCC_FCTRLB) Inverted MCEx (x=0,1) event input */
mbed_official 579:53297373a894 466 #define TCC_FCTRLB_SRC_ALTFAULT_Val 0x3ul /**< \brief (TCC_FCTRLB) Alternate fault (A or B) state at the end of the previous period */
mbed_official 579:53297373a894 467 #define TCC_FCTRLB_SRC_DISABLE (TCC_FCTRLB_SRC_DISABLE_Val << TCC_FCTRLB_SRC_Pos)
mbed_official 579:53297373a894 468 #define TCC_FCTRLB_SRC_ENABLE (TCC_FCTRLB_SRC_ENABLE_Val << TCC_FCTRLB_SRC_Pos)
mbed_official 579:53297373a894 469 #define TCC_FCTRLB_SRC_INVERT (TCC_FCTRLB_SRC_INVERT_Val << TCC_FCTRLB_SRC_Pos)
mbed_official 579:53297373a894 470 #define TCC_FCTRLB_SRC_ALTFAULT (TCC_FCTRLB_SRC_ALTFAULT_Val << TCC_FCTRLB_SRC_Pos)
mbed_official 579:53297373a894 471 #define TCC_FCTRLB_KEEP_Pos 3 /**< \brief (TCC_FCTRLB) Fault B Keeper */
mbed_official 579:53297373a894 472 #define TCC_FCTRLB_KEEP (0x1ul << TCC_FCTRLB_KEEP_Pos)
mbed_official 579:53297373a894 473 #define TCC_FCTRLB_QUAL_Pos 4 /**< \brief (TCC_FCTRLB) Fault B Qualification */
mbed_official 579:53297373a894 474 #define TCC_FCTRLB_QUAL (0x1ul << TCC_FCTRLB_QUAL_Pos)
mbed_official 579:53297373a894 475 #define TCC_FCTRLB_BLANK_Pos 5 /**< \brief (TCC_FCTRLB) Fault B Blanking Mode */
mbed_official 579:53297373a894 476 #define TCC_FCTRLB_BLANK_Msk (0x3ul << TCC_FCTRLB_BLANK_Pos)
mbed_official 579:53297373a894 477 #define TCC_FCTRLB_BLANK(value) ((TCC_FCTRLB_BLANK_Msk & ((value) << TCC_FCTRLB_BLANK_Pos)))
mbed_official 579:53297373a894 478 #define TCC_FCTRLB_BLANK_NONE_Val 0x0ul /**< \brief (TCC_FCTRLB) No blanking applied */
mbed_official 579:53297373a894 479 #define TCC_FCTRLB_BLANK_RISE_Val 0x1ul /**< \brief (TCC_FCTRLB) Blanking applied from rising edge of the output waveform */
mbed_official 579:53297373a894 480 #define TCC_FCTRLB_BLANK_FALL_Val 0x2ul /**< \brief (TCC_FCTRLB) Blanking applied from falling edge of the output waveform */
mbed_official 579:53297373a894 481 #define TCC_FCTRLB_BLANK_BOTH_Val 0x3ul /**< \brief (TCC_FCTRLB) Blanking applied from each toggle of the output waveform */
mbed_official 579:53297373a894 482 #define TCC_FCTRLB_BLANK_NONE (TCC_FCTRLB_BLANK_NONE_Val << TCC_FCTRLB_BLANK_Pos)
mbed_official 579:53297373a894 483 #define TCC_FCTRLB_BLANK_RISE (TCC_FCTRLB_BLANK_RISE_Val << TCC_FCTRLB_BLANK_Pos)
mbed_official 579:53297373a894 484 #define TCC_FCTRLB_BLANK_FALL (TCC_FCTRLB_BLANK_FALL_Val << TCC_FCTRLB_BLANK_Pos)
mbed_official 579:53297373a894 485 #define TCC_FCTRLB_BLANK_BOTH (TCC_FCTRLB_BLANK_BOTH_Val << TCC_FCTRLB_BLANK_Pos)
mbed_official 579:53297373a894 486 #define TCC_FCTRLB_RESTART_Pos 7 /**< \brief (TCC_FCTRLB) Fault B Restart */
mbed_official 579:53297373a894 487 #define TCC_FCTRLB_RESTART (0x1ul << TCC_FCTRLB_RESTART_Pos)
mbed_official 579:53297373a894 488 #define TCC_FCTRLB_HALT_Pos 8 /**< \brief (TCC_FCTRLB) Fault B Halt Mode */
mbed_official 579:53297373a894 489 #define TCC_FCTRLB_HALT_Msk (0x3ul << TCC_FCTRLB_HALT_Pos)
mbed_official 579:53297373a894 490 #define TCC_FCTRLB_HALT(value) ((TCC_FCTRLB_HALT_Msk & ((value) << TCC_FCTRLB_HALT_Pos)))
mbed_official 579:53297373a894 491 #define TCC_FCTRLB_HALT_DISABLE_Val 0x0ul /**< \brief (TCC_FCTRLB) Halt action disabled */
mbed_official 579:53297373a894 492 #define TCC_FCTRLB_HALT_HW_Val 0x1ul /**< \brief (TCC_FCTRLB) Hardware halt action */
mbed_official 579:53297373a894 493 #define TCC_FCTRLB_HALT_SW_Val 0x2ul /**< \brief (TCC_FCTRLB) Software halt action */
mbed_official 579:53297373a894 494 #define TCC_FCTRLB_HALT_NR_Val 0x3ul /**< \brief (TCC_FCTRLB) Non-recoverable fault */
mbed_official 579:53297373a894 495 #define TCC_FCTRLB_HALT_DISABLE (TCC_FCTRLB_HALT_DISABLE_Val << TCC_FCTRLB_HALT_Pos)
mbed_official 579:53297373a894 496 #define TCC_FCTRLB_HALT_HW (TCC_FCTRLB_HALT_HW_Val << TCC_FCTRLB_HALT_Pos)
mbed_official 579:53297373a894 497 #define TCC_FCTRLB_HALT_SW (TCC_FCTRLB_HALT_SW_Val << TCC_FCTRLB_HALT_Pos)
mbed_official 579:53297373a894 498 #define TCC_FCTRLB_HALT_NR (TCC_FCTRLB_HALT_NR_Val << TCC_FCTRLB_HALT_Pos)
mbed_official 579:53297373a894 499 #define TCC_FCTRLB_CHSEL_Pos 10 /**< \brief (TCC_FCTRLB) Fault B Capture Channel */
mbed_official 579:53297373a894 500 #define TCC_FCTRLB_CHSEL_Msk (0x3ul << TCC_FCTRLB_CHSEL_Pos)
mbed_official 579:53297373a894 501 #define TCC_FCTRLB_CHSEL(value) ((TCC_FCTRLB_CHSEL_Msk & ((value) << TCC_FCTRLB_CHSEL_Pos)))
mbed_official 579:53297373a894 502 #define TCC_FCTRLB_CHSEL_CC0_Val 0x0ul /**< \brief (TCC_FCTRLB) Capture value stored in channel 0 */
mbed_official 579:53297373a894 503 #define TCC_FCTRLB_CHSEL_CC1_Val 0x1ul /**< \brief (TCC_FCTRLB) Capture value stored in channel 1 */
mbed_official 579:53297373a894 504 #define TCC_FCTRLB_CHSEL_CC2_Val 0x2ul /**< \brief (TCC_FCTRLB) Capture value stored in channel 2 */
mbed_official 579:53297373a894 505 #define TCC_FCTRLB_CHSEL_CC3_Val 0x3ul /**< \brief (TCC_FCTRLB) Capture value stored in channel 3 */
mbed_official 579:53297373a894 506 #define TCC_FCTRLB_CHSEL_CC0 (TCC_FCTRLB_CHSEL_CC0_Val << TCC_FCTRLB_CHSEL_Pos)
mbed_official 579:53297373a894 507 #define TCC_FCTRLB_CHSEL_CC1 (TCC_FCTRLB_CHSEL_CC1_Val << TCC_FCTRLB_CHSEL_Pos)
mbed_official 579:53297373a894 508 #define TCC_FCTRLB_CHSEL_CC2 (TCC_FCTRLB_CHSEL_CC2_Val << TCC_FCTRLB_CHSEL_Pos)
mbed_official 579:53297373a894 509 #define TCC_FCTRLB_CHSEL_CC3 (TCC_FCTRLB_CHSEL_CC3_Val << TCC_FCTRLB_CHSEL_Pos)
mbed_official 579:53297373a894 510 #define TCC_FCTRLB_CAPTURE_Pos 12 /**< \brief (TCC_FCTRLB) Fault B Capture Action */
mbed_official 579:53297373a894 511 #define TCC_FCTRLB_CAPTURE_Msk (0x7ul << TCC_FCTRLB_CAPTURE_Pos)
mbed_official 579:53297373a894 512 #define TCC_FCTRLB_CAPTURE(value) ((TCC_FCTRLB_CAPTURE_Msk & ((value) << TCC_FCTRLB_CAPTURE_Pos)))
mbed_official 579:53297373a894 513 #define TCC_FCTRLB_CAPTURE_DISABLE_Val 0x0ul /**< \brief (TCC_FCTRLB) No capture */
mbed_official 579:53297373a894 514 #define TCC_FCTRLB_CAPTURE_CAPT_Val 0x1ul /**< \brief (TCC_FCTRLB) Capture on fault */
mbed_official 579:53297373a894 515 #define TCC_FCTRLB_CAPTURE_CAPTMIN_Val 0x2ul /**< \brief (TCC_FCTRLB) Minimum capture */
mbed_official 579:53297373a894 516 #define TCC_FCTRLB_CAPTURE_CAPTMAX_Val 0x3ul /**< \brief (TCC_FCTRLB) Maximum capture */
mbed_official 579:53297373a894 517 #define TCC_FCTRLB_CAPTURE_LOCMIN_Val 0x4ul /**< \brief (TCC_FCTRLB) Minimum local detection */
mbed_official 579:53297373a894 518 #define TCC_FCTRLB_CAPTURE_LOCMAX_Val 0x5ul /**< \brief (TCC_FCTRLB) Maximum local detection */
mbed_official 579:53297373a894 519 #define TCC_FCTRLB_CAPTURE_DERIV0_Val 0x6ul /**< \brief (TCC_FCTRLB) Minimum and maximum local detection */
mbed_official 579:53297373a894 520 #define TCC_FCTRLB_CAPTURE_DISABLE (TCC_FCTRLB_CAPTURE_DISABLE_Val << TCC_FCTRLB_CAPTURE_Pos)
mbed_official 579:53297373a894 521 #define TCC_FCTRLB_CAPTURE_CAPT (TCC_FCTRLB_CAPTURE_CAPT_Val << TCC_FCTRLB_CAPTURE_Pos)
mbed_official 579:53297373a894 522 #define TCC_FCTRLB_CAPTURE_CAPTMIN (TCC_FCTRLB_CAPTURE_CAPTMIN_Val << TCC_FCTRLB_CAPTURE_Pos)
mbed_official 579:53297373a894 523 #define TCC_FCTRLB_CAPTURE_CAPTMAX (TCC_FCTRLB_CAPTURE_CAPTMAX_Val << TCC_FCTRLB_CAPTURE_Pos)
mbed_official 579:53297373a894 524 #define TCC_FCTRLB_CAPTURE_LOCMIN (TCC_FCTRLB_CAPTURE_LOCMIN_Val << TCC_FCTRLB_CAPTURE_Pos)
mbed_official 579:53297373a894 525 #define TCC_FCTRLB_CAPTURE_LOCMAX (TCC_FCTRLB_CAPTURE_LOCMAX_Val << TCC_FCTRLB_CAPTURE_Pos)
mbed_official 579:53297373a894 526 #define TCC_FCTRLB_CAPTURE_DERIV0 (TCC_FCTRLB_CAPTURE_DERIV0_Val << TCC_FCTRLB_CAPTURE_Pos)
mbed_official 579:53297373a894 527 #define TCC_FCTRLB_BLANKVAL_Pos 16 /**< \brief (TCC_FCTRLB) Fault B Blanking Time */
mbed_official 579:53297373a894 528 #define TCC_FCTRLB_BLANKVAL_Msk (0xFFul << TCC_FCTRLB_BLANKVAL_Pos)
mbed_official 579:53297373a894 529 #define TCC_FCTRLB_BLANKVAL(value) ((TCC_FCTRLB_BLANKVAL_Msk & ((value) << TCC_FCTRLB_BLANKVAL_Pos)))
mbed_official 579:53297373a894 530 #define TCC_FCTRLB_FILTERVAL_Pos 24 /**< \brief (TCC_FCTRLB) Fault B Filter Value */
mbed_official 579:53297373a894 531 #define TCC_FCTRLB_FILTERVAL_Msk (0xFul << TCC_FCTRLB_FILTERVAL_Pos)
mbed_official 579:53297373a894 532 #define TCC_FCTRLB_FILTERVAL(value) ((TCC_FCTRLB_FILTERVAL_Msk & ((value) << TCC_FCTRLB_FILTERVAL_Pos)))
mbed_official 579:53297373a894 533 #define TCC_FCTRLB_MASK 0x0FFF7FFBul /**< \brief (TCC_FCTRLB) MASK Register */
mbed_official 579:53297373a894 534
mbed_official 579:53297373a894 535 /* -------- TCC_WEXCTRL : (TCC Offset: 0x14) (R/W 32) Waveform Extension Configuration -------- */
mbed_official 579:53297373a894 536 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 537 typedef union {
mbed_official 579:53297373a894 538 struct {
mbed_official 579:53297373a894 539 uint32_t OTMX:2; /*!< bit: 0.. 1 Output Matrix */
mbed_official 579:53297373a894 540 uint32_t :6; /*!< bit: 2.. 7 Reserved */
mbed_official 579:53297373a894 541 uint32_t DTIEN0:1; /*!< bit: 8 Dead-time Insertion Generator 0 Enable */
mbed_official 579:53297373a894 542 uint32_t DTIEN1:1; /*!< bit: 9 Dead-time Insertion Generator 1 Enable */
mbed_official 579:53297373a894 543 uint32_t DTIEN2:1; /*!< bit: 10 Dead-time Insertion Generator 2 Enable */
mbed_official 579:53297373a894 544 uint32_t DTIEN3:1; /*!< bit: 11 Dead-time Insertion Generator 3 Enable */
mbed_official 579:53297373a894 545 uint32_t :4; /*!< bit: 12..15 Reserved */
mbed_official 579:53297373a894 546 uint32_t DTLS:8; /*!< bit: 16..23 Dead-time Low Side Outputs Value */
mbed_official 579:53297373a894 547 uint32_t DTHS:8; /*!< bit: 24..31 Dead-time High Side Outputs Value */
mbed_official 579:53297373a894 548 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 549 struct {
mbed_official 579:53297373a894 550 uint32_t :8; /*!< bit: 0.. 7 Reserved */
mbed_official 579:53297373a894 551 uint32_t DTIEN:4; /*!< bit: 8..11 Dead-time Insertion Generator x Enable */
mbed_official 579:53297373a894 552 uint32_t :20; /*!< bit: 12..31 Reserved */
mbed_official 579:53297373a894 553 } vec; /*!< Structure used for vec access */
mbed_official 579:53297373a894 554 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 555 } TCC_WEXCTRL_Type;
mbed_official 579:53297373a894 556 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 557
mbed_official 579:53297373a894 558 #define TCC_WEXCTRL_OFFSET 0x14 /**< \brief (TCC_WEXCTRL offset) Waveform Extension Configuration */
mbed_official 579:53297373a894 559 #define TCC_WEXCTRL_RESETVALUE 0x00000000ul /**< \brief (TCC_WEXCTRL reset_value) Waveform Extension Configuration */
mbed_official 579:53297373a894 560
mbed_official 579:53297373a894 561 #define TCC_WEXCTRL_OTMX_Pos 0 /**< \brief (TCC_WEXCTRL) Output Matrix */
mbed_official 579:53297373a894 562 #define TCC_WEXCTRL_OTMX_Msk (0x3ul << TCC_WEXCTRL_OTMX_Pos)
mbed_official 579:53297373a894 563 #define TCC_WEXCTRL_OTMX(value) ((TCC_WEXCTRL_OTMX_Msk & ((value) << TCC_WEXCTRL_OTMX_Pos)))
mbed_official 579:53297373a894 564 #define TCC_WEXCTRL_DTIEN0_Pos 8 /**< \brief (TCC_WEXCTRL) Dead-time Insertion Generator 0 Enable */
mbed_official 579:53297373a894 565 #define TCC_WEXCTRL_DTIEN0 (1 << TCC_WEXCTRL_DTIEN0_Pos)
mbed_official 579:53297373a894 566 #define TCC_WEXCTRL_DTIEN1_Pos 9 /**< \brief (TCC_WEXCTRL) Dead-time Insertion Generator 1 Enable */
mbed_official 579:53297373a894 567 #define TCC_WEXCTRL_DTIEN1 (1 << TCC_WEXCTRL_DTIEN1_Pos)
mbed_official 579:53297373a894 568 #define TCC_WEXCTRL_DTIEN2_Pos 10 /**< \brief (TCC_WEXCTRL) Dead-time Insertion Generator 2 Enable */
mbed_official 579:53297373a894 569 #define TCC_WEXCTRL_DTIEN2 (1 << TCC_WEXCTRL_DTIEN2_Pos)
mbed_official 579:53297373a894 570 #define TCC_WEXCTRL_DTIEN3_Pos 11 /**< \brief (TCC_WEXCTRL) Dead-time Insertion Generator 3 Enable */
mbed_official 579:53297373a894 571 #define TCC_WEXCTRL_DTIEN3 (1 << TCC_WEXCTRL_DTIEN3_Pos)
mbed_official 579:53297373a894 572 #define TCC_WEXCTRL_DTIEN_Pos 8 /**< \brief (TCC_WEXCTRL) Dead-time Insertion Generator x Enable */
mbed_official 579:53297373a894 573 #define TCC_WEXCTRL_DTIEN_Msk (0xFul << TCC_WEXCTRL_DTIEN_Pos)
mbed_official 579:53297373a894 574 #define TCC_WEXCTRL_DTIEN(value) ((TCC_WEXCTRL_DTIEN_Msk & ((value) << TCC_WEXCTRL_DTIEN_Pos)))
mbed_official 579:53297373a894 575 #define TCC_WEXCTRL_DTLS_Pos 16 /**< \brief (TCC_WEXCTRL) Dead-time Low Side Outputs Value */
mbed_official 579:53297373a894 576 #define TCC_WEXCTRL_DTLS_Msk (0xFFul << TCC_WEXCTRL_DTLS_Pos)
mbed_official 579:53297373a894 577 #define TCC_WEXCTRL_DTLS(value) ((TCC_WEXCTRL_DTLS_Msk & ((value) << TCC_WEXCTRL_DTLS_Pos)))
mbed_official 579:53297373a894 578 #define TCC_WEXCTRL_DTHS_Pos 24 /**< \brief (TCC_WEXCTRL) Dead-time High Side Outputs Value */
mbed_official 579:53297373a894 579 #define TCC_WEXCTRL_DTHS_Msk (0xFFul << TCC_WEXCTRL_DTHS_Pos)
mbed_official 579:53297373a894 580 #define TCC_WEXCTRL_DTHS(value) ((TCC_WEXCTRL_DTHS_Msk & ((value) << TCC_WEXCTRL_DTHS_Pos)))
mbed_official 579:53297373a894 581 #define TCC_WEXCTRL_MASK 0xFFFF0F03ul /**< \brief (TCC_WEXCTRL) MASK Register */
mbed_official 579:53297373a894 582
mbed_official 579:53297373a894 583 /* -------- TCC_DRVCTRL : (TCC Offset: 0x18) (R/W 32) Driver Control -------- */
mbed_official 579:53297373a894 584 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 585 typedef union {
mbed_official 579:53297373a894 586 struct {
mbed_official 579:53297373a894 587 uint32_t NRE0:1; /*!< bit: 0 Non-Recoverable State 0 Output Enable */
mbed_official 579:53297373a894 588 uint32_t NRE1:1; /*!< bit: 1 Non-Recoverable State 1 Output Enable */
mbed_official 579:53297373a894 589 uint32_t NRE2:1; /*!< bit: 2 Non-Recoverable State 2 Output Enable */
mbed_official 579:53297373a894 590 uint32_t NRE3:1; /*!< bit: 3 Non-Recoverable State 3 Output Enable */
mbed_official 579:53297373a894 591 uint32_t NRE4:1; /*!< bit: 4 Non-Recoverable State 4 Output Enable */
mbed_official 579:53297373a894 592 uint32_t NRE5:1; /*!< bit: 5 Non-Recoverable State 5 Output Enable */
mbed_official 579:53297373a894 593 uint32_t NRE6:1; /*!< bit: 6 Non-Recoverable State 6 Output Enable */
mbed_official 579:53297373a894 594 uint32_t NRE7:1; /*!< bit: 7 Non-Recoverable State 7 Output Enable */
mbed_official 579:53297373a894 595 uint32_t NRV0:1; /*!< bit: 8 Non-Recoverable State 0 Output Value */
mbed_official 579:53297373a894 596 uint32_t NRV1:1; /*!< bit: 9 Non-Recoverable State 1 Output Value */
mbed_official 579:53297373a894 597 uint32_t NRV2:1; /*!< bit: 10 Non-Recoverable State 2 Output Value */
mbed_official 579:53297373a894 598 uint32_t NRV3:1; /*!< bit: 11 Non-Recoverable State 3 Output Value */
mbed_official 579:53297373a894 599 uint32_t NRV4:1; /*!< bit: 12 Non-Recoverable State 4 Output Value */
mbed_official 579:53297373a894 600 uint32_t NRV5:1; /*!< bit: 13 Non-Recoverable State 5 Output Value */
mbed_official 579:53297373a894 601 uint32_t NRV6:1; /*!< bit: 14 Non-Recoverable State 6 Output Value */
mbed_official 579:53297373a894 602 uint32_t NRV7:1; /*!< bit: 15 Non-Recoverable State 7 Output Value */
mbed_official 579:53297373a894 603 uint32_t INVEN0:1; /*!< bit: 16 Output Waveform 0 Inversion */
mbed_official 579:53297373a894 604 uint32_t INVEN1:1; /*!< bit: 17 Output Waveform 1 Inversion */
mbed_official 579:53297373a894 605 uint32_t INVEN2:1; /*!< bit: 18 Output Waveform 2 Inversion */
mbed_official 579:53297373a894 606 uint32_t INVEN3:1; /*!< bit: 19 Output Waveform 3 Inversion */
mbed_official 579:53297373a894 607 uint32_t INVEN4:1; /*!< bit: 20 Output Waveform 4 Inversion */
mbed_official 579:53297373a894 608 uint32_t INVEN5:1; /*!< bit: 21 Output Waveform 5 Inversion */
mbed_official 579:53297373a894 609 uint32_t INVEN6:1; /*!< bit: 22 Output Waveform 6 Inversion */
mbed_official 579:53297373a894 610 uint32_t INVEN7:1; /*!< bit: 23 Output Waveform 7 Inversion */
mbed_official 579:53297373a894 611 uint32_t FILTERVAL0:4; /*!< bit: 24..27 Non-Recoverable Fault Input 0 Filter Value */
mbed_official 579:53297373a894 612 uint32_t FILTERVAL1:4; /*!< bit: 28..31 Non-Recoverable Fault Input 1 Filter Value */
mbed_official 579:53297373a894 613 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 614 struct {
mbed_official 579:53297373a894 615 uint32_t NRE:8; /*!< bit: 0.. 7 Non-Recoverable State x Output Enable */
mbed_official 579:53297373a894 616 uint32_t NRV:8; /*!< bit: 8..15 Non-Recoverable State x Output Value */
mbed_official 579:53297373a894 617 uint32_t INVEN:8; /*!< bit: 16..23 Output Waveform x Inversion */
mbed_official 579:53297373a894 618 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 619 } vec; /*!< Structure used for vec access */
mbed_official 579:53297373a894 620 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 621 } TCC_DRVCTRL_Type;
mbed_official 579:53297373a894 622 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 623
mbed_official 579:53297373a894 624 #define TCC_DRVCTRL_OFFSET 0x18 /**< \brief (TCC_DRVCTRL offset) Driver Control */
mbed_official 579:53297373a894 625 #define TCC_DRVCTRL_RESETVALUE 0x00000000ul /**< \brief (TCC_DRVCTRL reset_value) Driver Control */
mbed_official 579:53297373a894 626
mbed_official 579:53297373a894 627 #define TCC_DRVCTRL_NRE0_Pos 0 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 0 Output Enable */
mbed_official 579:53297373a894 628 #define TCC_DRVCTRL_NRE0 (1 << TCC_DRVCTRL_NRE0_Pos)
mbed_official 579:53297373a894 629 #define TCC_DRVCTRL_NRE1_Pos 1 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 1 Output Enable */
mbed_official 579:53297373a894 630 #define TCC_DRVCTRL_NRE1 (1 << TCC_DRVCTRL_NRE1_Pos)
mbed_official 579:53297373a894 631 #define TCC_DRVCTRL_NRE2_Pos 2 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 2 Output Enable */
mbed_official 579:53297373a894 632 #define TCC_DRVCTRL_NRE2 (1 << TCC_DRVCTRL_NRE2_Pos)
mbed_official 579:53297373a894 633 #define TCC_DRVCTRL_NRE3_Pos 3 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 3 Output Enable */
mbed_official 579:53297373a894 634 #define TCC_DRVCTRL_NRE3 (1 << TCC_DRVCTRL_NRE3_Pos)
mbed_official 579:53297373a894 635 #define TCC_DRVCTRL_NRE4_Pos 4 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 4 Output Enable */
mbed_official 579:53297373a894 636 #define TCC_DRVCTRL_NRE4 (1 << TCC_DRVCTRL_NRE4_Pos)
mbed_official 579:53297373a894 637 #define TCC_DRVCTRL_NRE5_Pos 5 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 5 Output Enable */
mbed_official 579:53297373a894 638 #define TCC_DRVCTRL_NRE5 (1 << TCC_DRVCTRL_NRE5_Pos)
mbed_official 579:53297373a894 639 #define TCC_DRVCTRL_NRE6_Pos 6 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 6 Output Enable */
mbed_official 579:53297373a894 640 #define TCC_DRVCTRL_NRE6 (1 << TCC_DRVCTRL_NRE6_Pos)
mbed_official 579:53297373a894 641 #define TCC_DRVCTRL_NRE7_Pos 7 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 7 Output Enable */
mbed_official 579:53297373a894 642 #define TCC_DRVCTRL_NRE7 (1 << TCC_DRVCTRL_NRE7_Pos)
mbed_official 579:53297373a894 643 #define TCC_DRVCTRL_NRE_Pos 0 /**< \brief (TCC_DRVCTRL) Non-Recoverable State x Output Enable */
mbed_official 579:53297373a894 644 #define TCC_DRVCTRL_NRE_Msk (0xFFul << TCC_DRVCTRL_NRE_Pos)
mbed_official 579:53297373a894 645 #define TCC_DRVCTRL_NRE(value) ((TCC_DRVCTRL_NRE_Msk & ((value) << TCC_DRVCTRL_NRE_Pos)))
mbed_official 579:53297373a894 646 #define TCC_DRVCTRL_NRV0_Pos 8 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 0 Output Value */
mbed_official 579:53297373a894 647 #define TCC_DRVCTRL_NRV0 (1 << TCC_DRVCTRL_NRV0_Pos)
mbed_official 579:53297373a894 648 #define TCC_DRVCTRL_NRV1_Pos 9 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 1 Output Value */
mbed_official 579:53297373a894 649 #define TCC_DRVCTRL_NRV1 (1 << TCC_DRVCTRL_NRV1_Pos)
mbed_official 579:53297373a894 650 #define TCC_DRVCTRL_NRV2_Pos 10 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 2 Output Value */
mbed_official 579:53297373a894 651 #define TCC_DRVCTRL_NRV2 (1 << TCC_DRVCTRL_NRV2_Pos)
mbed_official 579:53297373a894 652 #define TCC_DRVCTRL_NRV3_Pos 11 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 3 Output Value */
mbed_official 579:53297373a894 653 #define TCC_DRVCTRL_NRV3 (1 << TCC_DRVCTRL_NRV3_Pos)
mbed_official 579:53297373a894 654 #define TCC_DRVCTRL_NRV4_Pos 12 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 4 Output Value */
mbed_official 579:53297373a894 655 #define TCC_DRVCTRL_NRV4 (1 << TCC_DRVCTRL_NRV4_Pos)
mbed_official 579:53297373a894 656 #define TCC_DRVCTRL_NRV5_Pos 13 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 5 Output Value */
mbed_official 579:53297373a894 657 #define TCC_DRVCTRL_NRV5 (1 << TCC_DRVCTRL_NRV5_Pos)
mbed_official 579:53297373a894 658 #define TCC_DRVCTRL_NRV6_Pos 14 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 6 Output Value */
mbed_official 579:53297373a894 659 #define TCC_DRVCTRL_NRV6 (1 << TCC_DRVCTRL_NRV6_Pos)
mbed_official 579:53297373a894 660 #define TCC_DRVCTRL_NRV7_Pos 15 /**< \brief (TCC_DRVCTRL) Non-Recoverable State 7 Output Value */
mbed_official 579:53297373a894 661 #define TCC_DRVCTRL_NRV7 (1 << TCC_DRVCTRL_NRV7_Pos)
mbed_official 579:53297373a894 662 #define TCC_DRVCTRL_NRV_Pos 8 /**< \brief (TCC_DRVCTRL) Non-Recoverable State x Output Value */
mbed_official 579:53297373a894 663 #define TCC_DRVCTRL_NRV_Msk (0xFFul << TCC_DRVCTRL_NRV_Pos)
mbed_official 579:53297373a894 664 #define TCC_DRVCTRL_NRV(value) ((TCC_DRVCTRL_NRV_Msk & ((value) << TCC_DRVCTRL_NRV_Pos)))
mbed_official 579:53297373a894 665 #define TCC_DRVCTRL_INVEN0_Pos 16 /**< \brief (TCC_DRVCTRL) Output Waveform 0 Inversion */
mbed_official 579:53297373a894 666 #define TCC_DRVCTRL_INVEN0 (1 << TCC_DRVCTRL_INVEN0_Pos)
mbed_official 579:53297373a894 667 #define TCC_DRVCTRL_INVEN1_Pos 17 /**< \brief (TCC_DRVCTRL) Output Waveform 1 Inversion */
mbed_official 579:53297373a894 668 #define TCC_DRVCTRL_INVEN1 (1 << TCC_DRVCTRL_INVEN1_Pos)
mbed_official 579:53297373a894 669 #define TCC_DRVCTRL_INVEN2_Pos 18 /**< \brief (TCC_DRVCTRL) Output Waveform 2 Inversion */
mbed_official 579:53297373a894 670 #define TCC_DRVCTRL_INVEN2 (1 << TCC_DRVCTRL_INVEN2_Pos)
mbed_official 579:53297373a894 671 #define TCC_DRVCTRL_INVEN3_Pos 19 /**< \brief (TCC_DRVCTRL) Output Waveform 3 Inversion */
mbed_official 579:53297373a894 672 #define TCC_DRVCTRL_INVEN3 (1 << TCC_DRVCTRL_INVEN3_Pos)
mbed_official 579:53297373a894 673 #define TCC_DRVCTRL_INVEN4_Pos 20 /**< \brief (TCC_DRVCTRL) Output Waveform 4 Inversion */
mbed_official 579:53297373a894 674 #define TCC_DRVCTRL_INVEN4 (1 << TCC_DRVCTRL_INVEN4_Pos)
mbed_official 579:53297373a894 675 #define TCC_DRVCTRL_INVEN5_Pos 21 /**< \brief (TCC_DRVCTRL) Output Waveform 5 Inversion */
mbed_official 579:53297373a894 676 #define TCC_DRVCTRL_INVEN5 (1 << TCC_DRVCTRL_INVEN5_Pos)
mbed_official 579:53297373a894 677 #define TCC_DRVCTRL_INVEN6_Pos 22 /**< \brief (TCC_DRVCTRL) Output Waveform 6 Inversion */
mbed_official 579:53297373a894 678 #define TCC_DRVCTRL_INVEN6 (1 << TCC_DRVCTRL_INVEN6_Pos)
mbed_official 579:53297373a894 679 #define TCC_DRVCTRL_INVEN7_Pos 23 /**< \brief (TCC_DRVCTRL) Output Waveform 7 Inversion */
mbed_official 579:53297373a894 680 #define TCC_DRVCTRL_INVEN7 (1 << TCC_DRVCTRL_INVEN7_Pos)
mbed_official 579:53297373a894 681 #define TCC_DRVCTRL_INVEN_Pos 16 /**< \brief (TCC_DRVCTRL) Output Waveform x Inversion */
mbed_official 579:53297373a894 682 #define TCC_DRVCTRL_INVEN_Msk (0xFFul << TCC_DRVCTRL_INVEN_Pos)
mbed_official 579:53297373a894 683 #define TCC_DRVCTRL_INVEN(value) ((TCC_DRVCTRL_INVEN_Msk & ((value) << TCC_DRVCTRL_INVEN_Pos)))
mbed_official 579:53297373a894 684 #define TCC_DRVCTRL_FILTERVAL0_Pos 24 /**< \brief (TCC_DRVCTRL) Non-Recoverable Fault Input 0 Filter Value */
mbed_official 579:53297373a894 685 #define TCC_DRVCTRL_FILTERVAL0_Msk (0xFul << TCC_DRVCTRL_FILTERVAL0_Pos)
mbed_official 579:53297373a894 686 #define TCC_DRVCTRL_FILTERVAL0(value) ((TCC_DRVCTRL_FILTERVAL0_Msk & ((value) << TCC_DRVCTRL_FILTERVAL0_Pos)))
mbed_official 579:53297373a894 687 #define TCC_DRVCTRL_FILTERVAL1_Pos 28 /**< \brief (TCC_DRVCTRL) Non-Recoverable Fault Input 1 Filter Value */
mbed_official 579:53297373a894 688 #define TCC_DRVCTRL_FILTERVAL1_Msk (0xFul << TCC_DRVCTRL_FILTERVAL1_Pos)
mbed_official 579:53297373a894 689 #define TCC_DRVCTRL_FILTERVAL1(value) ((TCC_DRVCTRL_FILTERVAL1_Msk & ((value) << TCC_DRVCTRL_FILTERVAL1_Pos)))
mbed_official 579:53297373a894 690 #define TCC_DRVCTRL_MASK 0xFFFFFFFFul /**< \brief (TCC_DRVCTRL) MASK Register */
mbed_official 579:53297373a894 691
mbed_official 579:53297373a894 692 /* -------- TCC_DBGCTRL : (TCC Offset: 0x1E) (R/W 8) Debug Control -------- */
mbed_official 579:53297373a894 693 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 694 typedef union {
mbed_official 579:53297373a894 695 struct {
mbed_official 579:53297373a894 696 uint8_t DBGRUN:1; /*!< bit: 0 Debug Running Mode */
mbed_official 579:53297373a894 697 uint8_t :1; /*!< bit: 1 Reserved */
mbed_official 579:53297373a894 698 uint8_t FDDBD:1; /*!< bit: 2 Fault Detection on Debug Break Detection */
mbed_official 579:53297373a894 699 uint8_t :5; /*!< bit: 3.. 7 Reserved */
mbed_official 579:53297373a894 700 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 701 uint8_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 702 } TCC_DBGCTRL_Type;
mbed_official 579:53297373a894 703 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 704
mbed_official 579:53297373a894 705 #define TCC_DBGCTRL_OFFSET 0x1E /**< \brief (TCC_DBGCTRL offset) Debug Control */
mbed_official 579:53297373a894 706 #define TCC_DBGCTRL_RESETVALUE 0x00ul /**< \brief (TCC_DBGCTRL reset_value) Debug Control */
mbed_official 579:53297373a894 707
mbed_official 579:53297373a894 708 #define TCC_DBGCTRL_DBGRUN_Pos 0 /**< \brief (TCC_DBGCTRL) Debug Running Mode */
mbed_official 579:53297373a894 709 #define TCC_DBGCTRL_DBGRUN (0x1ul << TCC_DBGCTRL_DBGRUN_Pos)
mbed_official 579:53297373a894 710 #define TCC_DBGCTRL_FDDBD_Pos 2 /**< \brief (TCC_DBGCTRL) Fault Detection on Debug Break Detection */
mbed_official 579:53297373a894 711 #define TCC_DBGCTRL_FDDBD (0x1ul << TCC_DBGCTRL_FDDBD_Pos)
mbed_official 579:53297373a894 712 #define TCC_DBGCTRL_MASK 0x05ul /**< \brief (TCC_DBGCTRL) MASK Register */
mbed_official 579:53297373a894 713
mbed_official 579:53297373a894 714 /* -------- TCC_EVCTRL : (TCC Offset: 0x20) (R/W 32) Event Control -------- */
mbed_official 579:53297373a894 715 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 716 typedef union {
mbed_official 579:53297373a894 717 struct {
mbed_official 579:53297373a894 718 uint32_t EVACT0:3; /*!< bit: 0.. 2 Timer/counter Input Event0 Action */
mbed_official 579:53297373a894 719 uint32_t EVACT1:3; /*!< bit: 3.. 5 Timer/counter Input Event1 Action */
mbed_official 579:53297373a894 720 uint32_t CNTSEL:2; /*!< bit: 6.. 7 Timer/counter Output Event Mode */
mbed_official 579:53297373a894 721 uint32_t OVFEO:1; /*!< bit: 8 Overflow/Underflow Output Event Enable */
mbed_official 579:53297373a894 722 uint32_t TRGEO:1; /*!< bit: 9 Retrigger Output Event Enable */
mbed_official 579:53297373a894 723 uint32_t CNTEO:1; /*!< bit: 10 Timer/counter Output Event Enable */
mbed_official 579:53297373a894 724 uint32_t :1; /*!< bit: 11 Reserved */
mbed_official 579:53297373a894 725 uint32_t TCINV0:1; /*!< bit: 12 Inverted Event 0 Input Enable */
mbed_official 579:53297373a894 726 uint32_t TCINV1:1; /*!< bit: 13 Inverted Event 1 Input Enable */
mbed_official 579:53297373a894 727 uint32_t TCEI0:1; /*!< bit: 14 Timer/counter Event 0 Input Enable */
mbed_official 579:53297373a894 728 uint32_t TCEI1:1; /*!< bit: 15 Timer/counter Event 1 Input Enable */
mbed_official 579:53297373a894 729 uint32_t MCEI0:1; /*!< bit: 16 Match or Capture Channel 0 Event Input Enable */
mbed_official 579:53297373a894 730 uint32_t MCEI1:1; /*!< bit: 17 Match or Capture Channel 1 Event Input Enable */
mbed_official 579:53297373a894 731 uint32_t MCEI2:1; /*!< bit: 18 Match or Capture Channel 2 Event Input Enable */
mbed_official 579:53297373a894 732 uint32_t MCEI3:1; /*!< bit: 19 Match or Capture Channel 3 Event Input Enable */
mbed_official 579:53297373a894 733 uint32_t :4; /*!< bit: 20..23 Reserved */
mbed_official 579:53297373a894 734 uint32_t MCEO0:1; /*!< bit: 24 Match or Capture Channel 0 Event Output Enable */
mbed_official 579:53297373a894 735 uint32_t MCEO1:1; /*!< bit: 25 Match or Capture Channel 1 Event Output Enable */
mbed_official 579:53297373a894 736 uint32_t MCEO2:1; /*!< bit: 26 Match or Capture Channel 2 Event Output Enable */
mbed_official 579:53297373a894 737 uint32_t MCEO3:1; /*!< bit: 27 Match or Capture Channel 3 Event Output Enable */
mbed_official 579:53297373a894 738 uint32_t :4; /*!< bit: 28..31 Reserved */
mbed_official 579:53297373a894 739 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 740 struct {
mbed_official 579:53297373a894 741 uint32_t :12; /*!< bit: 0..11 Reserved */
mbed_official 579:53297373a894 742 uint32_t TCINV:2; /*!< bit: 12..13 Inverted Event x Input Enable */
mbed_official 579:53297373a894 743 uint32_t TCEI:2; /*!< bit: 14..15 Timer/counter Event x Input Enable */
mbed_official 579:53297373a894 744 uint32_t MCEI:4; /*!< bit: 16..19 Match or Capture Channel x Event Input Enable */
mbed_official 579:53297373a894 745 uint32_t :4; /*!< bit: 20..23 Reserved */
mbed_official 579:53297373a894 746 uint32_t MCEO:4; /*!< bit: 24..27 Match or Capture Channel x Event Output Enable */
mbed_official 579:53297373a894 747 uint32_t :4; /*!< bit: 28..31 Reserved */
mbed_official 579:53297373a894 748 } vec; /*!< Structure used for vec access */
mbed_official 579:53297373a894 749 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 750 } TCC_EVCTRL_Type;
mbed_official 579:53297373a894 751 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 752
mbed_official 579:53297373a894 753 #define TCC_EVCTRL_OFFSET 0x20 /**< \brief (TCC_EVCTRL offset) Event Control */
mbed_official 579:53297373a894 754 #define TCC_EVCTRL_RESETVALUE 0x00000000ul /**< \brief (TCC_EVCTRL reset_value) Event Control */
mbed_official 579:53297373a894 755
mbed_official 579:53297373a894 756 #define TCC_EVCTRL_EVACT0_Pos 0 /**< \brief (TCC_EVCTRL) Timer/counter Input Event0 Action */
mbed_official 579:53297373a894 757 #define TCC_EVCTRL_EVACT0_Msk (0x7ul << TCC_EVCTRL_EVACT0_Pos)
mbed_official 579:53297373a894 758 #define TCC_EVCTRL_EVACT0(value) ((TCC_EVCTRL_EVACT0_Msk & ((value) << TCC_EVCTRL_EVACT0_Pos)))
mbed_official 579:53297373a894 759 #define TCC_EVCTRL_EVACT0_OFF_Val 0x0ul /**< \brief (TCC_EVCTRL) Event action disabled */
mbed_official 579:53297373a894 760 #define TCC_EVCTRL_EVACT0_RETRIGGER_Val 0x1ul /**< \brief (TCC_EVCTRL) Start, restart or re-trigger counter on event */
mbed_official 579:53297373a894 761 #define TCC_EVCTRL_EVACT0_COUNTEV_Val 0x2ul /**< \brief (TCC_EVCTRL) Count on event */
mbed_official 579:53297373a894 762 #define TCC_EVCTRL_EVACT0_START_Val 0x3ul /**< \brief (TCC_EVCTRL) Start counter on event */
mbed_official 579:53297373a894 763 #define TCC_EVCTRL_EVACT0_INC_Val 0x4ul /**< \brief (TCC_EVCTRL) Increment counter on event */
mbed_official 579:53297373a894 764 #define TCC_EVCTRL_EVACT0_COUNT_Val 0x5ul /**< \brief (TCC_EVCTRL) Count on active state of asynchronous event */
mbed_official 579:53297373a894 765 #define TCC_EVCTRL_EVACT0_FAULT_Val 0x7ul /**< \brief (TCC_EVCTRL) Non-recoverable fault */
mbed_official 579:53297373a894 766 #define TCC_EVCTRL_EVACT0_OFF (TCC_EVCTRL_EVACT0_OFF_Val << TCC_EVCTRL_EVACT0_Pos)
mbed_official 579:53297373a894 767 #define TCC_EVCTRL_EVACT0_RETRIGGER (TCC_EVCTRL_EVACT0_RETRIGGER_Val << TCC_EVCTRL_EVACT0_Pos)
mbed_official 579:53297373a894 768 #define TCC_EVCTRL_EVACT0_COUNTEV (TCC_EVCTRL_EVACT0_COUNTEV_Val << TCC_EVCTRL_EVACT0_Pos)
mbed_official 579:53297373a894 769 #define TCC_EVCTRL_EVACT0_START (TCC_EVCTRL_EVACT0_START_Val << TCC_EVCTRL_EVACT0_Pos)
mbed_official 579:53297373a894 770 #define TCC_EVCTRL_EVACT0_INC (TCC_EVCTRL_EVACT0_INC_Val << TCC_EVCTRL_EVACT0_Pos)
mbed_official 579:53297373a894 771 #define TCC_EVCTRL_EVACT0_COUNT (TCC_EVCTRL_EVACT0_COUNT_Val << TCC_EVCTRL_EVACT0_Pos)
mbed_official 579:53297373a894 772 #define TCC_EVCTRL_EVACT0_FAULT (TCC_EVCTRL_EVACT0_FAULT_Val << TCC_EVCTRL_EVACT0_Pos)
mbed_official 579:53297373a894 773 #define TCC_EVCTRL_EVACT1_Pos 3 /**< \brief (TCC_EVCTRL) Timer/counter Input Event1 Action */
mbed_official 579:53297373a894 774 #define TCC_EVCTRL_EVACT1_Msk (0x7ul << TCC_EVCTRL_EVACT1_Pos)
mbed_official 579:53297373a894 775 #define TCC_EVCTRL_EVACT1(value) ((TCC_EVCTRL_EVACT1_Msk & ((value) << TCC_EVCTRL_EVACT1_Pos)))
mbed_official 579:53297373a894 776 #define TCC_EVCTRL_EVACT1_OFF_Val 0x0ul /**< \brief (TCC_EVCTRL) Event action disabled */
mbed_official 579:53297373a894 777 #define TCC_EVCTRL_EVACT1_RETRIGGER_Val 0x1ul /**< \brief (TCC_EVCTRL) Re-trigger counter on event */
mbed_official 579:53297373a894 778 #define TCC_EVCTRL_EVACT1_DIR_Val 0x2ul /**< \brief (TCC_EVCTRL) Direction control */
mbed_official 579:53297373a894 779 #define TCC_EVCTRL_EVACT1_STOP_Val 0x3ul /**< \brief (TCC_EVCTRL) Stop counter on event */
mbed_official 579:53297373a894 780 #define TCC_EVCTRL_EVACT1_DEC_Val 0x4ul /**< \brief (TCC_EVCTRL) Decrement counter on event */
mbed_official 579:53297373a894 781 #define TCC_EVCTRL_EVACT1_PPW_Val 0x5ul /**< \brief (TCC_EVCTRL) Period capture value in CC0 register, pulse width capture value in CC1 register */
mbed_official 579:53297373a894 782 #define TCC_EVCTRL_EVACT1_PWP_Val 0x6ul /**< \brief (TCC_EVCTRL) Period capture value in CC1 register, pulse width capture value in CC0 register */
mbed_official 579:53297373a894 783 #define TCC_EVCTRL_EVACT1_FAULT_Val 0x7ul /**< \brief (TCC_EVCTRL) Non-recoverable fault */
mbed_official 579:53297373a894 784 #define TCC_EVCTRL_EVACT1_OFF (TCC_EVCTRL_EVACT1_OFF_Val << TCC_EVCTRL_EVACT1_Pos)
mbed_official 579:53297373a894 785 #define TCC_EVCTRL_EVACT1_RETRIGGER (TCC_EVCTRL_EVACT1_RETRIGGER_Val << TCC_EVCTRL_EVACT1_Pos)
mbed_official 579:53297373a894 786 #define TCC_EVCTRL_EVACT1_DIR (TCC_EVCTRL_EVACT1_DIR_Val << TCC_EVCTRL_EVACT1_Pos)
mbed_official 579:53297373a894 787 #define TCC_EVCTRL_EVACT1_STOP (TCC_EVCTRL_EVACT1_STOP_Val << TCC_EVCTRL_EVACT1_Pos)
mbed_official 579:53297373a894 788 #define TCC_EVCTRL_EVACT1_DEC (TCC_EVCTRL_EVACT1_DEC_Val << TCC_EVCTRL_EVACT1_Pos)
mbed_official 579:53297373a894 789 #define TCC_EVCTRL_EVACT1_PPW (TCC_EVCTRL_EVACT1_PPW_Val << TCC_EVCTRL_EVACT1_Pos)
mbed_official 579:53297373a894 790 #define TCC_EVCTRL_EVACT1_PWP (TCC_EVCTRL_EVACT1_PWP_Val << TCC_EVCTRL_EVACT1_Pos)
mbed_official 579:53297373a894 791 #define TCC_EVCTRL_EVACT1_FAULT (TCC_EVCTRL_EVACT1_FAULT_Val << TCC_EVCTRL_EVACT1_Pos)
mbed_official 579:53297373a894 792 #define TCC_EVCTRL_CNTSEL_Pos 6 /**< \brief (TCC_EVCTRL) Timer/counter Output Event Mode */
mbed_official 579:53297373a894 793 #define TCC_EVCTRL_CNTSEL_Msk (0x3ul << TCC_EVCTRL_CNTSEL_Pos)
mbed_official 579:53297373a894 794 #define TCC_EVCTRL_CNTSEL(value) ((TCC_EVCTRL_CNTSEL_Msk & ((value) << TCC_EVCTRL_CNTSEL_Pos)))
mbed_official 579:53297373a894 795 #define TCC_EVCTRL_CNTSEL_START_Val 0x0ul /**< \brief (TCC_EVCTRL) An interrupt/event is generated when a new counter cycle starts */
mbed_official 579:53297373a894 796 #define TCC_EVCTRL_CNTSEL_END_Val 0x1ul /**< \brief (TCC_EVCTRL) An interrupt/event is generated when a counter cycle ends */
mbed_official 579:53297373a894 797 #define TCC_EVCTRL_CNTSEL_BETWEEN_Val 0x2ul /**< \brief (TCC_EVCTRL) An interrupt/event is generated when a counter cycle ends, except for the first and last cycles */
mbed_official 579:53297373a894 798 #define TCC_EVCTRL_CNTSEL_BOUNDARY_Val 0x3ul /**< \brief (TCC_EVCTRL) An interrupt/event is generated when a new counter cycle starts or a counter cycle ends */
mbed_official 579:53297373a894 799 #define TCC_EVCTRL_CNTSEL_START (TCC_EVCTRL_CNTSEL_START_Val << TCC_EVCTRL_CNTSEL_Pos)
mbed_official 579:53297373a894 800 #define TCC_EVCTRL_CNTSEL_END (TCC_EVCTRL_CNTSEL_END_Val << TCC_EVCTRL_CNTSEL_Pos)
mbed_official 579:53297373a894 801 #define TCC_EVCTRL_CNTSEL_BETWEEN (TCC_EVCTRL_CNTSEL_BETWEEN_Val << TCC_EVCTRL_CNTSEL_Pos)
mbed_official 579:53297373a894 802 #define TCC_EVCTRL_CNTSEL_BOUNDARY (TCC_EVCTRL_CNTSEL_BOUNDARY_Val << TCC_EVCTRL_CNTSEL_Pos)
mbed_official 579:53297373a894 803 #define TCC_EVCTRL_OVFEO_Pos 8 /**< \brief (TCC_EVCTRL) Overflow/Underflow Output Event Enable */
mbed_official 579:53297373a894 804 #define TCC_EVCTRL_OVFEO (0x1ul << TCC_EVCTRL_OVFEO_Pos)
mbed_official 579:53297373a894 805 #define TCC_EVCTRL_TRGEO_Pos 9 /**< \brief (TCC_EVCTRL) Retrigger Output Event Enable */
mbed_official 579:53297373a894 806 #define TCC_EVCTRL_TRGEO (0x1ul << TCC_EVCTRL_TRGEO_Pos)
mbed_official 579:53297373a894 807 #define TCC_EVCTRL_CNTEO_Pos 10 /**< \brief (TCC_EVCTRL) Timer/counter Output Event Enable */
mbed_official 579:53297373a894 808 #define TCC_EVCTRL_CNTEO (0x1ul << TCC_EVCTRL_CNTEO_Pos)
mbed_official 579:53297373a894 809 #define TCC_EVCTRL_TCINV0_Pos 12 /**< \brief (TCC_EVCTRL) Inverted Event 0 Input Enable */
mbed_official 579:53297373a894 810 #define TCC_EVCTRL_TCINV0 (1 << TCC_EVCTRL_TCINV0_Pos)
mbed_official 579:53297373a894 811 #define TCC_EVCTRL_TCINV1_Pos 13 /**< \brief (TCC_EVCTRL) Inverted Event 1 Input Enable */
mbed_official 579:53297373a894 812 #define TCC_EVCTRL_TCINV1 (1 << TCC_EVCTRL_TCINV1_Pos)
mbed_official 579:53297373a894 813 #define TCC_EVCTRL_TCINV_Pos 12 /**< \brief (TCC_EVCTRL) Inverted Event x Input Enable */
mbed_official 579:53297373a894 814 #define TCC_EVCTRL_TCINV_Msk (0x3ul << TCC_EVCTRL_TCINV_Pos)
mbed_official 579:53297373a894 815 #define TCC_EVCTRL_TCINV(value) ((TCC_EVCTRL_TCINV_Msk & ((value) << TCC_EVCTRL_TCINV_Pos)))
mbed_official 579:53297373a894 816 #define TCC_EVCTRL_TCEI0_Pos 14 /**< \brief (TCC_EVCTRL) Timer/counter Event 0 Input Enable */
mbed_official 579:53297373a894 817 #define TCC_EVCTRL_TCEI0 (1 << TCC_EVCTRL_TCEI0_Pos)
mbed_official 579:53297373a894 818 #define TCC_EVCTRL_TCEI1_Pos 15 /**< \brief (TCC_EVCTRL) Timer/counter Event 1 Input Enable */
mbed_official 579:53297373a894 819 #define TCC_EVCTRL_TCEI1 (1 << TCC_EVCTRL_TCEI1_Pos)
mbed_official 579:53297373a894 820 #define TCC_EVCTRL_TCEI_Pos 14 /**< \brief (TCC_EVCTRL) Timer/counter Event x Input Enable */
mbed_official 579:53297373a894 821 #define TCC_EVCTRL_TCEI_Msk (0x3ul << TCC_EVCTRL_TCEI_Pos)
mbed_official 579:53297373a894 822 #define TCC_EVCTRL_TCEI(value) ((TCC_EVCTRL_TCEI_Msk & ((value) << TCC_EVCTRL_TCEI_Pos)))
mbed_official 579:53297373a894 823 #define TCC_EVCTRL_MCEI0_Pos 16 /**< \brief (TCC_EVCTRL) Match or Capture Channel 0 Event Input Enable */
mbed_official 579:53297373a894 824 #define TCC_EVCTRL_MCEI0 (1 << TCC_EVCTRL_MCEI0_Pos)
mbed_official 579:53297373a894 825 #define TCC_EVCTRL_MCEI1_Pos 17 /**< \brief (TCC_EVCTRL) Match or Capture Channel 1 Event Input Enable */
mbed_official 579:53297373a894 826 #define TCC_EVCTRL_MCEI1 (1 << TCC_EVCTRL_MCEI1_Pos)
mbed_official 579:53297373a894 827 #define TCC_EVCTRL_MCEI2_Pos 18 /**< \brief (TCC_EVCTRL) Match or Capture Channel 2 Event Input Enable */
mbed_official 579:53297373a894 828 #define TCC_EVCTRL_MCEI2 (1 << TCC_EVCTRL_MCEI2_Pos)
mbed_official 579:53297373a894 829 #define TCC_EVCTRL_MCEI3_Pos 19 /**< \brief (TCC_EVCTRL) Match or Capture Channel 3 Event Input Enable */
mbed_official 579:53297373a894 830 #define TCC_EVCTRL_MCEI3 (1 << TCC_EVCTRL_MCEI3_Pos)
mbed_official 579:53297373a894 831 #define TCC_EVCTRL_MCEI_Pos 16 /**< \brief (TCC_EVCTRL) Match or Capture Channel x Event Input Enable */
mbed_official 579:53297373a894 832 #define TCC_EVCTRL_MCEI_Msk (0xFul << TCC_EVCTRL_MCEI_Pos)
mbed_official 579:53297373a894 833 #define TCC_EVCTRL_MCEI(value) ((TCC_EVCTRL_MCEI_Msk & ((value) << TCC_EVCTRL_MCEI_Pos)))
mbed_official 579:53297373a894 834 #define TCC_EVCTRL_MCEO0_Pos 24 /**< \brief (TCC_EVCTRL) Match or Capture Channel 0 Event Output Enable */
mbed_official 579:53297373a894 835 #define TCC_EVCTRL_MCEO0 (1 << TCC_EVCTRL_MCEO0_Pos)
mbed_official 579:53297373a894 836 #define TCC_EVCTRL_MCEO1_Pos 25 /**< \brief (TCC_EVCTRL) Match or Capture Channel 1 Event Output Enable */
mbed_official 579:53297373a894 837 #define TCC_EVCTRL_MCEO1 (1 << TCC_EVCTRL_MCEO1_Pos)
mbed_official 579:53297373a894 838 #define TCC_EVCTRL_MCEO2_Pos 26 /**< \brief (TCC_EVCTRL) Match or Capture Channel 2 Event Output Enable */
mbed_official 579:53297373a894 839 #define TCC_EVCTRL_MCEO2 (1 << TCC_EVCTRL_MCEO2_Pos)
mbed_official 579:53297373a894 840 #define TCC_EVCTRL_MCEO3_Pos 27 /**< \brief (TCC_EVCTRL) Match or Capture Channel 3 Event Output Enable */
mbed_official 579:53297373a894 841 #define TCC_EVCTRL_MCEO3 (1 << TCC_EVCTRL_MCEO3_Pos)
mbed_official 579:53297373a894 842 #define TCC_EVCTRL_MCEO_Pos 24 /**< \brief (TCC_EVCTRL) Match or Capture Channel x Event Output Enable */
mbed_official 579:53297373a894 843 #define TCC_EVCTRL_MCEO_Msk (0xFul << TCC_EVCTRL_MCEO_Pos)
mbed_official 579:53297373a894 844 #define TCC_EVCTRL_MCEO(value) ((TCC_EVCTRL_MCEO_Msk & ((value) << TCC_EVCTRL_MCEO_Pos)))
mbed_official 579:53297373a894 845 #define TCC_EVCTRL_MASK 0x0F0FF7FFul /**< \brief (TCC_EVCTRL) MASK Register */
mbed_official 579:53297373a894 846
mbed_official 579:53297373a894 847 /* -------- TCC_INTENCLR : (TCC Offset: 0x24) (R/W 32) Interrupt Enable Clear -------- */
mbed_official 579:53297373a894 848 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 849 typedef union {
mbed_official 579:53297373a894 850 struct {
mbed_official 579:53297373a894 851 uint32_t OVF:1; /*!< bit: 0 Overflow Interrupt Enable */
mbed_official 579:53297373a894 852 uint32_t TRG:1; /*!< bit: 1 Retrigger Interrupt Enable */
mbed_official 579:53297373a894 853 uint32_t CNT:1; /*!< bit: 2 Counter Interrupt Enable */
mbed_official 579:53297373a894 854 uint32_t ERR:1; /*!< bit: 3 Error Interrupt Enable */
mbed_official 579:53297373a894 855 uint32_t :7; /*!< bit: 4..10 Reserved */
mbed_official 579:53297373a894 856 uint32_t DFS:1; /*!< bit: 11 Non-Recoverable Debug Fault Interrupt Enable */
mbed_official 579:53297373a894 857 uint32_t FAULTA:1; /*!< bit: 12 Recoverable Fault A Interrupt Enable */
mbed_official 579:53297373a894 858 uint32_t FAULTB:1; /*!< bit: 13 Recoverable Fault B Interrupt Enable */
mbed_official 579:53297373a894 859 uint32_t FAULT0:1; /*!< bit: 14 Non-Recoverable Fault 0 Interrupt Enable */
mbed_official 579:53297373a894 860 uint32_t FAULT1:1; /*!< bit: 15 Non-Recoverable Fault 1 Interrupt Enable */
mbed_official 579:53297373a894 861 uint32_t MC0:1; /*!< bit: 16 Match or Capture Channel 0 Interrupt Enable */
mbed_official 579:53297373a894 862 uint32_t MC1:1; /*!< bit: 17 Match or Capture Channel 1 Interrupt Enable */
mbed_official 579:53297373a894 863 uint32_t MC2:1; /*!< bit: 18 Match or Capture Channel 2 Interrupt Enable */
mbed_official 579:53297373a894 864 uint32_t MC3:1; /*!< bit: 19 Match or Capture Channel 3 Interrupt Enable */
mbed_official 579:53297373a894 865 uint32_t :12; /*!< bit: 20..31 Reserved */
mbed_official 579:53297373a894 866 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 867 struct {
mbed_official 579:53297373a894 868 uint32_t :16; /*!< bit: 0..15 Reserved */
mbed_official 579:53297373a894 869 uint32_t MC:4; /*!< bit: 16..19 Match or Capture Channel x Interrupt Enable */
mbed_official 579:53297373a894 870 uint32_t :12; /*!< bit: 20..31 Reserved */
mbed_official 579:53297373a894 871 } vec; /*!< Structure used for vec access */
mbed_official 579:53297373a894 872 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 873 } TCC_INTENCLR_Type;
mbed_official 579:53297373a894 874 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 875
mbed_official 579:53297373a894 876 #define TCC_INTENCLR_OFFSET 0x24 /**< \brief (TCC_INTENCLR offset) Interrupt Enable Clear */
mbed_official 579:53297373a894 877 #define TCC_INTENCLR_RESETVALUE 0x00000000ul /**< \brief (TCC_INTENCLR reset_value) Interrupt Enable Clear */
mbed_official 579:53297373a894 878
mbed_official 579:53297373a894 879 #define TCC_INTENCLR_OVF_Pos 0 /**< \brief (TCC_INTENCLR) Overflow Interrupt Enable */
mbed_official 579:53297373a894 880 #define TCC_INTENCLR_OVF (0x1ul << TCC_INTENCLR_OVF_Pos)
mbed_official 579:53297373a894 881 #define TCC_INTENCLR_TRG_Pos 1 /**< \brief (TCC_INTENCLR) Retrigger Interrupt Enable */
mbed_official 579:53297373a894 882 #define TCC_INTENCLR_TRG (0x1ul << TCC_INTENCLR_TRG_Pos)
mbed_official 579:53297373a894 883 #define TCC_INTENCLR_CNT_Pos 2 /**< \brief (TCC_INTENCLR) Counter Interrupt Enable */
mbed_official 579:53297373a894 884 #define TCC_INTENCLR_CNT (0x1ul << TCC_INTENCLR_CNT_Pos)
mbed_official 579:53297373a894 885 #define TCC_INTENCLR_ERR_Pos 3 /**< \brief (TCC_INTENCLR) Error Interrupt Enable */
mbed_official 579:53297373a894 886 #define TCC_INTENCLR_ERR (0x1ul << TCC_INTENCLR_ERR_Pos)
mbed_official 579:53297373a894 887 #define TCC_INTENCLR_DFS_Pos 11 /**< \brief (TCC_INTENCLR) Non-Recoverable Debug Fault Interrupt Enable */
mbed_official 579:53297373a894 888 #define TCC_INTENCLR_DFS (0x1ul << TCC_INTENCLR_DFS_Pos)
mbed_official 579:53297373a894 889 #define TCC_INTENCLR_FAULTA_Pos 12 /**< \brief (TCC_INTENCLR) Recoverable Fault A Interrupt Enable */
mbed_official 579:53297373a894 890 #define TCC_INTENCLR_FAULTA (0x1ul << TCC_INTENCLR_FAULTA_Pos)
mbed_official 579:53297373a894 891 #define TCC_INTENCLR_FAULTB_Pos 13 /**< \brief (TCC_INTENCLR) Recoverable Fault B Interrupt Enable */
mbed_official 579:53297373a894 892 #define TCC_INTENCLR_FAULTB (0x1ul << TCC_INTENCLR_FAULTB_Pos)
mbed_official 579:53297373a894 893 #define TCC_INTENCLR_FAULT0_Pos 14 /**< \brief (TCC_INTENCLR) Non-Recoverable Fault 0 Interrupt Enable */
mbed_official 579:53297373a894 894 #define TCC_INTENCLR_FAULT0 (0x1ul << TCC_INTENCLR_FAULT0_Pos)
mbed_official 579:53297373a894 895 #define TCC_INTENCLR_FAULT1_Pos 15 /**< \brief (TCC_INTENCLR) Non-Recoverable Fault 1 Interrupt Enable */
mbed_official 579:53297373a894 896 #define TCC_INTENCLR_FAULT1 (0x1ul << TCC_INTENCLR_FAULT1_Pos)
mbed_official 579:53297373a894 897 #define TCC_INTENCLR_MC0_Pos 16 /**< \brief (TCC_INTENCLR) Match or Capture Channel 0 Interrupt Enable */
mbed_official 579:53297373a894 898 #define TCC_INTENCLR_MC0 (1 << TCC_INTENCLR_MC0_Pos)
mbed_official 579:53297373a894 899 #define TCC_INTENCLR_MC1_Pos 17 /**< \brief (TCC_INTENCLR) Match or Capture Channel 1 Interrupt Enable */
mbed_official 579:53297373a894 900 #define TCC_INTENCLR_MC1 (1 << TCC_INTENCLR_MC1_Pos)
mbed_official 579:53297373a894 901 #define TCC_INTENCLR_MC2_Pos 18 /**< \brief (TCC_INTENCLR) Match or Capture Channel 2 Interrupt Enable */
mbed_official 579:53297373a894 902 #define TCC_INTENCLR_MC2 (1 << TCC_INTENCLR_MC2_Pos)
mbed_official 579:53297373a894 903 #define TCC_INTENCLR_MC3_Pos 19 /**< \brief (TCC_INTENCLR) Match or Capture Channel 3 Interrupt Enable */
mbed_official 579:53297373a894 904 #define TCC_INTENCLR_MC3 (1 << TCC_INTENCLR_MC3_Pos)
mbed_official 579:53297373a894 905 #define TCC_INTENCLR_MC_Pos 16 /**< \brief (TCC_INTENCLR) Match or Capture Channel x Interrupt Enable */
mbed_official 579:53297373a894 906 #define TCC_INTENCLR_MC_Msk (0xFul << TCC_INTENCLR_MC_Pos)
mbed_official 579:53297373a894 907 #define TCC_INTENCLR_MC(value) ((TCC_INTENCLR_MC_Msk & ((value) << TCC_INTENCLR_MC_Pos)))
mbed_official 579:53297373a894 908 #define TCC_INTENCLR_MASK 0x000FF80Ful /**< \brief (TCC_INTENCLR) MASK Register */
mbed_official 579:53297373a894 909
mbed_official 579:53297373a894 910 /* -------- TCC_INTENSET : (TCC Offset: 0x28) (R/W 32) Interrupt Enable Set -------- */
mbed_official 579:53297373a894 911 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 912 typedef union {
mbed_official 579:53297373a894 913 struct {
mbed_official 579:53297373a894 914 uint32_t OVF:1; /*!< bit: 0 Overflow Interrupt Enable */
mbed_official 579:53297373a894 915 uint32_t TRG:1; /*!< bit: 1 Retrigger Interrupt Enable */
mbed_official 579:53297373a894 916 uint32_t CNT:1; /*!< bit: 2 Counter Interrupt Enable */
mbed_official 579:53297373a894 917 uint32_t ERR:1; /*!< bit: 3 Error Interrupt Enable */
mbed_official 579:53297373a894 918 uint32_t :7; /*!< bit: 4..10 Reserved */
mbed_official 579:53297373a894 919 uint32_t DFS:1; /*!< bit: 11 Non-Recoverable Debug Fault Interrupt Enable */
mbed_official 579:53297373a894 920 uint32_t FAULTA:1; /*!< bit: 12 Recoverable Fault A Interrupt Enable */
mbed_official 579:53297373a894 921 uint32_t FAULTB:1; /*!< bit: 13 Recoverable Fault B Interrupt Enable */
mbed_official 579:53297373a894 922 uint32_t FAULT0:1; /*!< bit: 14 Non-Recoverable Fault 0 Interrupt Enable */
mbed_official 579:53297373a894 923 uint32_t FAULT1:1; /*!< bit: 15 Non-Recoverable Fault 1 Interrupt Enable */
mbed_official 579:53297373a894 924 uint32_t MC0:1; /*!< bit: 16 Match or Capture Channel 0 Interrupt Enable */
mbed_official 579:53297373a894 925 uint32_t MC1:1; /*!< bit: 17 Match or Capture Channel 1 Interrupt Enable */
mbed_official 579:53297373a894 926 uint32_t MC2:1; /*!< bit: 18 Match or Capture Channel 2 Interrupt Enable */
mbed_official 579:53297373a894 927 uint32_t MC3:1; /*!< bit: 19 Match or Capture Channel 3 Interrupt Enable */
mbed_official 579:53297373a894 928 uint32_t :12; /*!< bit: 20..31 Reserved */
mbed_official 579:53297373a894 929 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 930 struct {
mbed_official 579:53297373a894 931 uint32_t :16; /*!< bit: 0..15 Reserved */
mbed_official 579:53297373a894 932 uint32_t MC:4; /*!< bit: 16..19 Match or Capture Channel x Interrupt Enable */
mbed_official 579:53297373a894 933 uint32_t :12; /*!< bit: 20..31 Reserved */
mbed_official 579:53297373a894 934 } vec; /*!< Structure used for vec access */
mbed_official 579:53297373a894 935 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 936 } TCC_INTENSET_Type;
mbed_official 579:53297373a894 937 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 938
mbed_official 579:53297373a894 939 #define TCC_INTENSET_OFFSET 0x28 /**< \brief (TCC_INTENSET offset) Interrupt Enable Set */
mbed_official 579:53297373a894 940 #define TCC_INTENSET_RESETVALUE 0x00000000ul /**< \brief (TCC_INTENSET reset_value) Interrupt Enable Set */
mbed_official 579:53297373a894 941
mbed_official 579:53297373a894 942 #define TCC_INTENSET_OVF_Pos 0 /**< \brief (TCC_INTENSET) Overflow Interrupt Enable */
mbed_official 579:53297373a894 943 #define TCC_INTENSET_OVF (0x1ul << TCC_INTENSET_OVF_Pos)
mbed_official 579:53297373a894 944 #define TCC_INTENSET_TRG_Pos 1 /**< \brief (TCC_INTENSET) Retrigger Interrupt Enable */
mbed_official 579:53297373a894 945 #define TCC_INTENSET_TRG (0x1ul << TCC_INTENSET_TRG_Pos)
mbed_official 579:53297373a894 946 #define TCC_INTENSET_CNT_Pos 2 /**< \brief (TCC_INTENSET) Counter Interrupt Enable */
mbed_official 579:53297373a894 947 #define TCC_INTENSET_CNT (0x1ul << TCC_INTENSET_CNT_Pos)
mbed_official 579:53297373a894 948 #define TCC_INTENSET_ERR_Pos 3 /**< \brief (TCC_INTENSET) Error Interrupt Enable */
mbed_official 579:53297373a894 949 #define TCC_INTENSET_ERR (0x1ul << TCC_INTENSET_ERR_Pos)
mbed_official 579:53297373a894 950 #define TCC_INTENSET_DFS_Pos 11 /**< \brief (TCC_INTENSET) Non-Recoverable Debug Fault Interrupt Enable */
mbed_official 579:53297373a894 951 #define TCC_INTENSET_DFS (0x1ul << TCC_INTENSET_DFS_Pos)
mbed_official 579:53297373a894 952 #define TCC_INTENSET_FAULTA_Pos 12 /**< \brief (TCC_INTENSET) Recoverable Fault A Interrupt Enable */
mbed_official 579:53297373a894 953 #define TCC_INTENSET_FAULTA (0x1ul << TCC_INTENSET_FAULTA_Pos)
mbed_official 579:53297373a894 954 #define TCC_INTENSET_FAULTB_Pos 13 /**< \brief (TCC_INTENSET) Recoverable Fault B Interrupt Enable */
mbed_official 579:53297373a894 955 #define TCC_INTENSET_FAULTB (0x1ul << TCC_INTENSET_FAULTB_Pos)
mbed_official 579:53297373a894 956 #define TCC_INTENSET_FAULT0_Pos 14 /**< \brief (TCC_INTENSET) Non-Recoverable Fault 0 Interrupt Enable */
mbed_official 579:53297373a894 957 #define TCC_INTENSET_FAULT0 (0x1ul << TCC_INTENSET_FAULT0_Pos)
mbed_official 579:53297373a894 958 #define TCC_INTENSET_FAULT1_Pos 15 /**< \brief (TCC_INTENSET) Non-Recoverable Fault 1 Interrupt Enable */
mbed_official 579:53297373a894 959 #define TCC_INTENSET_FAULT1 (0x1ul << TCC_INTENSET_FAULT1_Pos)
mbed_official 579:53297373a894 960 #define TCC_INTENSET_MC0_Pos 16 /**< \brief (TCC_INTENSET) Match or Capture Channel 0 Interrupt Enable */
mbed_official 579:53297373a894 961 #define TCC_INTENSET_MC0 (1 << TCC_INTENSET_MC0_Pos)
mbed_official 579:53297373a894 962 #define TCC_INTENSET_MC1_Pos 17 /**< \brief (TCC_INTENSET) Match or Capture Channel 1 Interrupt Enable */
mbed_official 579:53297373a894 963 #define TCC_INTENSET_MC1 (1 << TCC_INTENSET_MC1_Pos)
mbed_official 579:53297373a894 964 #define TCC_INTENSET_MC2_Pos 18 /**< \brief (TCC_INTENSET) Match or Capture Channel 2 Interrupt Enable */
mbed_official 579:53297373a894 965 #define TCC_INTENSET_MC2 (1 << TCC_INTENSET_MC2_Pos)
mbed_official 579:53297373a894 966 #define TCC_INTENSET_MC3_Pos 19 /**< \brief (TCC_INTENSET) Match or Capture Channel 3 Interrupt Enable */
mbed_official 579:53297373a894 967 #define TCC_INTENSET_MC3 (1 << TCC_INTENSET_MC3_Pos)
mbed_official 579:53297373a894 968 #define TCC_INTENSET_MC_Pos 16 /**< \brief (TCC_INTENSET) Match or Capture Channel x Interrupt Enable */
mbed_official 579:53297373a894 969 #define TCC_INTENSET_MC_Msk (0xFul << TCC_INTENSET_MC_Pos)
mbed_official 579:53297373a894 970 #define TCC_INTENSET_MC(value) ((TCC_INTENSET_MC_Msk & ((value) << TCC_INTENSET_MC_Pos)))
mbed_official 579:53297373a894 971 #define TCC_INTENSET_MASK 0x000FF80Ful /**< \brief (TCC_INTENSET) MASK Register */
mbed_official 579:53297373a894 972
mbed_official 579:53297373a894 973 /* -------- TCC_INTFLAG : (TCC Offset: 0x2C) (R/W 32) Interrupt Flag Status and Clear -------- */
mbed_official 579:53297373a894 974 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 975 typedef union {
mbed_official 579:53297373a894 976 struct {
mbed_official 579:53297373a894 977 uint32_t OVF:1; /*!< bit: 0 Overflow */
mbed_official 579:53297373a894 978 uint32_t TRG:1; /*!< bit: 1 Retrigger */
mbed_official 579:53297373a894 979 uint32_t CNT:1; /*!< bit: 2 Counter */
mbed_official 579:53297373a894 980 uint32_t ERR:1; /*!< bit: 3 Error */
mbed_official 579:53297373a894 981 uint32_t :7; /*!< bit: 4..10 Reserved */
mbed_official 579:53297373a894 982 uint32_t DFS:1; /*!< bit: 11 Non-Recoverable Debug Fault */
mbed_official 579:53297373a894 983 uint32_t FAULTA:1; /*!< bit: 12 Recoverable Fault A */
mbed_official 579:53297373a894 984 uint32_t FAULTB:1; /*!< bit: 13 Recoverable Fault B */
mbed_official 579:53297373a894 985 uint32_t FAULT0:1; /*!< bit: 14 Non-Recoverable Fault 0 */
mbed_official 579:53297373a894 986 uint32_t FAULT1:1; /*!< bit: 15 Non-Recoverable Fault 1 */
mbed_official 579:53297373a894 987 uint32_t MC0:1; /*!< bit: 16 Match or Capture 0 */
mbed_official 579:53297373a894 988 uint32_t MC1:1; /*!< bit: 17 Match or Capture 1 */
mbed_official 579:53297373a894 989 uint32_t MC2:1; /*!< bit: 18 Match or Capture 2 */
mbed_official 579:53297373a894 990 uint32_t MC3:1; /*!< bit: 19 Match or Capture 3 */
mbed_official 579:53297373a894 991 uint32_t :12; /*!< bit: 20..31 Reserved */
mbed_official 579:53297373a894 992 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 993 struct {
mbed_official 579:53297373a894 994 uint32_t :16; /*!< bit: 0..15 Reserved */
mbed_official 579:53297373a894 995 uint32_t MC:4; /*!< bit: 16..19 Match or Capture x */
mbed_official 579:53297373a894 996 uint32_t :12; /*!< bit: 20..31 Reserved */
mbed_official 579:53297373a894 997 } vec; /*!< Structure used for vec access */
mbed_official 579:53297373a894 998 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 999 } TCC_INTFLAG_Type;
mbed_official 579:53297373a894 1000 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 1001
mbed_official 579:53297373a894 1002 #define TCC_INTFLAG_OFFSET 0x2C /**< \brief (TCC_INTFLAG offset) Interrupt Flag Status and Clear */
mbed_official 579:53297373a894 1003 #define TCC_INTFLAG_RESETVALUE 0x00000000ul /**< \brief (TCC_INTFLAG reset_value) Interrupt Flag Status and Clear */
mbed_official 579:53297373a894 1004
mbed_official 579:53297373a894 1005 #define TCC_INTFLAG_OVF_Pos 0 /**< \brief (TCC_INTFLAG) Overflow */
mbed_official 579:53297373a894 1006 #define TCC_INTFLAG_OVF (0x1ul << TCC_INTFLAG_OVF_Pos)
mbed_official 579:53297373a894 1007 #define TCC_INTFLAG_TRG_Pos 1 /**< \brief (TCC_INTFLAG) Retrigger */
mbed_official 579:53297373a894 1008 #define TCC_INTFLAG_TRG (0x1ul << TCC_INTFLAG_TRG_Pos)
mbed_official 579:53297373a894 1009 #define TCC_INTFLAG_CNT_Pos 2 /**< \brief (TCC_INTFLAG) Counter */
mbed_official 579:53297373a894 1010 #define TCC_INTFLAG_CNT (0x1ul << TCC_INTFLAG_CNT_Pos)
mbed_official 579:53297373a894 1011 #define TCC_INTFLAG_ERR_Pos 3 /**< \brief (TCC_INTFLAG) Error */
mbed_official 579:53297373a894 1012 #define TCC_INTFLAG_ERR (0x1ul << TCC_INTFLAG_ERR_Pos)
mbed_official 579:53297373a894 1013 #define TCC_INTFLAG_DFS_Pos 11 /**< \brief (TCC_INTFLAG) Non-Recoverable Debug Fault */
mbed_official 579:53297373a894 1014 #define TCC_INTFLAG_DFS (0x1ul << TCC_INTFLAG_DFS_Pos)
mbed_official 579:53297373a894 1015 #define TCC_INTFLAG_FAULTA_Pos 12 /**< \brief (TCC_INTFLAG) Recoverable Fault A */
mbed_official 579:53297373a894 1016 #define TCC_INTFLAG_FAULTA (0x1ul << TCC_INTFLAG_FAULTA_Pos)
mbed_official 579:53297373a894 1017 #define TCC_INTFLAG_FAULTB_Pos 13 /**< \brief (TCC_INTFLAG) Recoverable Fault B */
mbed_official 579:53297373a894 1018 #define TCC_INTFLAG_FAULTB (0x1ul << TCC_INTFLAG_FAULTB_Pos)
mbed_official 579:53297373a894 1019 #define TCC_INTFLAG_FAULT0_Pos 14 /**< \brief (TCC_INTFLAG) Non-Recoverable Fault 0 */
mbed_official 579:53297373a894 1020 #define TCC_INTFLAG_FAULT0 (0x1ul << TCC_INTFLAG_FAULT0_Pos)
mbed_official 579:53297373a894 1021 #define TCC_INTFLAG_FAULT1_Pos 15 /**< \brief (TCC_INTFLAG) Non-Recoverable Fault 1 */
mbed_official 579:53297373a894 1022 #define TCC_INTFLAG_FAULT1 (0x1ul << TCC_INTFLAG_FAULT1_Pos)
mbed_official 579:53297373a894 1023 #define TCC_INTFLAG_MC0_Pos 16 /**< \brief (TCC_INTFLAG) Match or Capture 0 */
mbed_official 579:53297373a894 1024 #define TCC_INTFLAG_MC0 (1 << TCC_INTFLAG_MC0_Pos)
mbed_official 579:53297373a894 1025 #define TCC_INTFLAG_MC1_Pos 17 /**< \brief (TCC_INTFLAG) Match or Capture 1 */
mbed_official 579:53297373a894 1026 #define TCC_INTFLAG_MC1 (1 << TCC_INTFLAG_MC1_Pos)
mbed_official 579:53297373a894 1027 #define TCC_INTFLAG_MC2_Pos 18 /**< \brief (TCC_INTFLAG) Match or Capture 2 */
mbed_official 579:53297373a894 1028 #define TCC_INTFLAG_MC2 (1 << TCC_INTFLAG_MC2_Pos)
mbed_official 579:53297373a894 1029 #define TCC_INTFLAG_MC3_Pos 19 /**< \brief (TCC_INTFLAG) Match or Capture 3 */
mbed_official 579:53297373a894 1030 #define TCC_INTFLAG_MC3 (1 << TCC_INTFLAG_MC3_Pos)
mbed_official 579:53297373a894 1031 #define TCC_INTFLAG_MC_Pos 16 /**< \brief (TCC_INTFLAG) Match or Capture x */
mbed_official 579:53297373a894 1032 #define TCC_INTFLAG_MC_Msk (0xFul << TCC_INTFLAG_MC_Pos)
mbed_official 579:53297373a894 1033 #define TCC_INTFLAG_MC(value) ((TCC_INTFLAG_MC_Msk & ((value) << TCC_INTFLAG_MC_Pos)))
mbed_official 579:53297373a894 1034 #define TCC_INTFLAG_MASK 0x000FF80Ful /**< \brief (TCC_INTFLAG) MASK Register */
mbed_official 579:53297373a894 1035
mbed_official 579:53297373a894 1036 /* -------- TCC_STATUS : (TCC Offset: 0x30) (R/W 32) Status -------- */
mbed_official 579:53297373a894 1037 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 1038 typedef union {
mbed_official 579:53297373a894 1039 struct {
mbed_official 579:53297373a894 1040 uint32_t STOP:1; /*!< bit: 0 Stop */
mbed_official 579:53297373a894 1041 uint32_t IDX:1; /*!< bit: 1 Ramp */
mbed_official 579:53297373a894 1042 uint32_t :1; /*!< bit: 2 Reserved */
mbed_official 579:53297373a894 1043 uint32_t DFS:1; /*!< bit: 3 Non-Recoverable Debug Fault State */
mbed_official 579:53297373a894 1044 uint32_t SLAVE:1; /*!< bit: 4 Slave */
mbed_official 579:53297373a894 1045 uint32_t PATTBV:1; /*!< bit: 5 Pattern Buffer Valid */
mbed_official 579:53297373a894 1046 uint32_t WAVEBV:1; /*!< bit: 6 Wave Buffer Valid */
mbed_official 579:53297373a894 1047 uint32_t PERBV:1; /*!< bit: 7 Period Buffer Valid */
mbed_official 579:53297373a894 1048 uint32_t FAULTAIN:1; /*!< bit: 8 Recoverable Fault A Input */
mbed_official 579:53297373a894 1049 uint32_t FAULTBIN:1; /*!< bit: 9 Recoverable Fault B Input */
mbed_official 579:53297373a894 1050 uint32_t FAULT0IN:1; /*!< bit: 10 Non-Recoverable Fault0 Input */
mbed_official 579:53297373a894 1051 uint32_t FAULT1IN:1; /*!< bit: 11 Non-Recoverable Fault1 Input */
mbed_official 579:53297373a894 1052 uint32_t FAULTA:1; /*!< bit: 12 Recoverable Fault A State */
mbed_official 579:53297373a894 1053 uint32_t FAULTB:1; /*!< bit: 13 Recoverable Fault B State */
mbed_official 579:53297373a894 1054 uint32_t FAULT0:1; /*!< bit: 14 Non-Recoverable Fault 0 State */
mbed_official 579:53297373a894 1055 uint32_t FAULT1:1; /*!< bit: 15 Non-Recoverable Fault 1 State */
mbed_official 579:53297373a894 1056 uint32_t CCBV0:1; /*!< bit: 16 Compare Channel 0 Buffer Valid */
mbed_official 579:53297373a894 1057 uint32_t CCBV1:1; /*!< bit: 17 Compare Channel 1 Buffer Valid */
mbed_official 579:53297373a894 1058 uint32_t CCBV2:1; /*!< bit: 18 Compare Channel 2 Buffer Valid */
mbed_official 579:53297373a894 1059 uint32_t CCBV3:1; /*!< bit: 19 Compare Channel 3 Buffer Valid */
mbed_official 579:53297373a894 1060 uint32_t :4; /*!< bit: 20..23 Reserved */
mbed_official 579:53297373a894 1061 uint32_t CMP0:1; /*!< bit: 24 Compare Channel 0 Value */
mbed_official 579:53297373a894 1062 uint32_t CMP1:1; /*!< bit: 25 Compare Channel 1 Value */
mbed_official 579:53297373a894 1063 uint32_t CMP2:1; /*!< bit: 26 Compare Channel 2 Value */
mbed_official 579:53297373a894 1064 uint32_t CMP3:1; /*!< bit: 27 Compare Channel 3 Value */
mbed_official 579:53297373a894 1065 uint32_t :4; /*!< bit: 28..31 Reserved */
mbed_official 579:53297373a894 1066 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 1067 struct {
mbed_official 579:53297373a894 1068 uint32_t :16; /*!< bit: 0..15 Reserved */
mbed_official 579:53297373a894 1069 uint32_t CCBV:4; /*!< bit: 16..19 Compare Channel x Buffer Valid */
mbed_official 579:53297373a894 1070 uint32_t :4; /*!< bit: 20..23 Reserved */
mbed_official 579:53297373a894 1071 uint32_t CMP:4; /*!< bit: 24..27 Compare Channel x Value */
mbed_official 579:53297373a894 1072 uint32_t :4; /*!< bit: 28..31 Reserved */
mbed_official 579:53297373a894 1073 } vec; /*!< Structure used for vec access */
mbed_official 579:53297373a894 1074 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 1075 } TCC_STATUS_Type;
mbed_official 579:53297373a894 1076 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 1077
mbed_official 579:53297373a894 1078 #define TCC_STATUS_OFFSET 0x30 /**< \brief (TCC_STATUS offset) Status */
mbed_official 579:53297373a894 1079 #define TCC_STATUS_RESETVALUE 0x00000001ul /**< \brief (TCC_STATUS reset_value) Status */
mbed_official 579:53297373a894 1080
mbed_official 579:53297373a894 1081 #define TCC_STATUS_STOP_Pos 0 /**< \brief (TCC_STATUS) Stop */
mbed_official 579:53297373a894 1082 #define TCC_STATUS_STOP (0x1ul << TCC_STATUS_STOP_Pos)
mbed_official 579:53297373a894 1083 #define TCC_STATUS_IDX_Pos 1 /**< \brief (TCC_STATUS) Ramp */
mbed_official 579:53297373a894 1084 #define TCC_STATUS_IDX (0x1ul << TCC_STATUS_IDX_Pos)
mbed_official 579:53297373a894 1085 #define TCC_STATUS_DFS_Pos 3 /**< \brief (TCC_STATUS) Non-Recoverable Debug Fault State */
mbed_official 579:53297373a894 1086 #define TCC_STATUS_DFS (0x1ul << TCC_STATUS_DFS_Pos)
mbed_official 579:53297373a894 1087 #define TCC_STATUS_SLAVE_Pos 4 /**< \brief (TCC_STATUS) Slave */
mbed_official 579:53297373a894 1088 #define TCC_STATUS_SLAVE (0x1ul << TCC_STATUS_SLAVE_Pos)
mbed_official 579:53297373a894 1089 #define TCC_STATUS_PATTBV_Pos 5 /**< \brief (TCC_STATUS) Pattern Buffer Valid */
mbed_official 579:53297373a894 1090 #define TCC_STATUS_PATTBV (0x1ul << TCC_STATUS_PATTBV_Pos)
mbed_official 579:53297373a894 1091 #define TCC_STATUS_WAVEBV_Pos 6 /**< \brief (TCC_STATUS) Wave Buffer Valid */
mbed_official 579:53297373a894 1092 #define TCC_STATUS_WAVEBV (0x1ul << TCC_STATUS_WAVEBV_Pos)
mbed_official 579:53297373a894 1093 #define TCC_STATUS_PERBV_Pos 7 /**< \brief (TCC_STATUS) Period Buffer Valid */
mbed_official 579:53297373a894 1094 #define TCC_STATUS_PERBV (0x1ul << TCC_STATUS_PERBV_Pos)
mbed_official 579:53297373a894 1095 #define TCC_STATUS_FAULTAIN_Pos 8 /**< \brief (TCC_STATUS) Recoverable Fault A Input */
mbed_official 579:53297373a894 1096 #define TCC_STATUS_FAULTAIN (0x1ul << TCC_STATUS_FAULTAIN_Pos)
mbed_official 579:53297373a894 1097 #define TCC_STATUS_FAULTBIN_Pos 9 /**< \brief (TCC_STATUS) Recoverable Fault B Input */
mbed_official 579:53297373a894 1098 #define TCC_STATUS_FAULTBIN (0x1ul << TCC_STATUS_FAULTBIN_Pos)
mbed_official 579:53297373a894 1099 #define TCC_STATUS_FAULT0IN_Pos 10 /**< \brief (TCC_STATUS) Non-Recoverable Fault0 Input */
mbed_official 579:53297373a894 1100 #define TCC_STATUS_FAULT0IN (0x1ul << TCC_STATUS_FAULT0IN_Pos)
mbed_official 579:53297373a894 1101 #define TCC_STATUS_FAULT1IN_Pos 11 /**< \brief (TCC_STATUS) Non-Recoverable Fault1 Input */
mbed_official 579:53297373a894 1102 #define TCC_STATUS_FAULT1IN (0x1ul << TCC_STATUS_FAULT1IN_Pos)
mbed_official 579:53297373a894 1103 #define TCC_STATUS_FAULTA_Pos 12 /**< \brief (TCC_STATUS) Recoverable Fault A State */
mbed_official 579:53297373a894 1104 #define TCC_STATUS_FAULTA (0x1ul << TCC_STATUS_FAULTA_Pos)
mbed_official 579:53297373a894 1105 #define TCC_STATUS_FAULTB_Pos 13 /**< \brief (TCC_STATUS) Recoverable Fault B State */
mbed_official 579:53297373a894 1106 #define TCC_STATUS_FAULTB (0x1ul << TCC_STATUS_FAULTB_Pos)
mbed_official 579:53297373a894 1107 #define TCC_STATUS_FAULT0_Pos 14 /**< \brief (TCC_STATUS) Non-Recoverable Fault 0 State */
mbed_official 579:53297373a894 1108 #define TCC_STATUS_FAULT0 (0x1ul << TCC_STATUS_FAULT0_Pos)
mbed_official 579:53297373a894 1109 #define TCC_STATUS_FAULT1_Pos 15 /**< \brief (TCC_STATUS) Non-Recoverable Fault 1 State */
mbed_official 579:53297373a894 1110 #define TCC_STATUS_FAULT1 (0x1ul << TCC_STATUS_FAULT1_Pos)
mbed_official 579:53297373a894 1111 #define TCC_STATUS_CCBV0_Pos 16 /**< \brief (TCC_STATUS) Compare Channel 0 Buffer Valid */
mbed_official 579:53297373a894 1112 #define TCC_STATUS_CCBV0 (1 << TCC_STATUS_CCBV0_Pos)
mbed_official 579:53297373a894 1113 #define TCC_STATUS_CCBV1_Pos 17 /**< \brief (TCC_STATUS) Compare Channel 1 Buffer Valid */
mbed_official 579:53297373a894 1114 #define TCC_STATUS_CCBV1 (1 << TCC_STATUS_CCBV1_Pos)
mbed_official 579:53297373a894 1115 #define TCC_STATUS_CCBV2_Pos 18 /**< \brief (TCC_STATUS) Compare Channel 2 Buffer Valid */
mbed_official 579:53297373a894 1116 #define TCC_STATUS_CCBV2 (1 << TCC_STATUS_CCBV2_Pos)
mbed_official 579:53297373a894 1117 #define TCC_STATUS_CCBV3_Pos 19 /**< \brief (TCC_STATUS) Compare Channel 3 Buffer Valid */
mbed_official 579:53297373a894 1118 #define TCC_STATUS_CCBV3 (1 << TCC_STATUS_CCBV3_Pos)
mbed_official 579:53297373a894 1119 #define TCC_STATUS_CCBV_Pos 16 /**< \brief (TCC_STATUS) Compare Channel x Buffer Valid */
mbed_official 579:53297373a894 1120 #define TCC_STATUS_CCBV_Msk (0xFul << TCC_STATUS_CCBV_Pos)
mbed_official 579:53297373a894 1121 #define TCC_STATUS_CCBV(value) ((TCC_STATUS_CCBV_Msk & ((value) << TCC_STATUS_CCBV_Pos)))
mbed_official 579:53297373a894 1122 #define TCC_STATUS_CMP0_Pos 24 /**< \brief (TCC_STATUS) Compare Channel 0 Value */
mbed_official 579:53297373a894 1123 #define TCC_STATUS_CMP0 (1 << TCC_STATUS_CMP0_Pos)
mbed_official 579:53297373a894 1124 #define TCC_STATUS_CMP1_Pos 25 /**< \brief (TCC_STATUS) Compare Channel 1 Value */
mbed_official 579:53297373a894 1125 #define TCC_STATUS_CMP1 (1 << TCC_STATUS_CMP1_Pos)
mbed_official 579:53297373a894 1126 #define TCC_STATUS_CMP2_Pos 26 /**< \brief (TCC_STATUS) Compare Channel 2 Value */
mbed_official 579:53297373a894 1127 #define TCC_STATUS_CMP2 (1 << TCC_STATUS_CMP2_Pos)
mbed_official 579:53297373a894 1128 #define TCC_STATUS_CMP3_Pos 27 /**< \brief (TCC_STATUS) Compare Channel 3 Value */
mbed_official 579:53297373a894 1129 #define TCC_STATUS_CMP3 (1 << TCC_STATUS_CMP3_Pos)
mbed_official 579:53297373a894 1130 #define TCC_STATUS_CMP_Pos 24 /**< \brief (TCC_STATUS) Compare Channel x Value */
mbed_official 579:53297373a894 1131 #define TCC_STATUS_CMP_Msk (0xFul << TCC_STATUS_CMP_Pos)
mbed_official 579:53297373a894 1132 #define TCC_STATUS_CMP(value) ((TCC_STATUS_CMP_Msk & ((value) << TCC_STATUS_CMP_Pos)))
mbed_official 579:53297373a894 1133 #define TCC_STATUS_MASK 0x0F0FFFFBul /**< \brief (TCC_STATUS) MASK Register */
mbed_official 579:53297373a894 1134
mbed_official 579:53297373a894 1135 /* -------- TCC_COUNT : (TCC Offset: 0x34) (R/W 32) Count -------- */
mbed_official 579:53297373a894 1136 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 1137 typedef union {
mbed_official 579:53297373a894 1138 struct { // DITH4 mode
mbed_official 579:53297373a894 1139 uint32_t :4; /*!< bit: 0.. 3 Reserved */
mbed_official 579:53297373a894 1140 uint32_t COUNT:20; /*!< bit: 4..23 Counter Value */
mbed_official 579:53297373a894 1141 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1142 } DITH4; /*!< Structure used for DITH4 */
mbed_official 579:53297373a894 1143 struct { // DITH5 mode
mbed_official 579:53297373a894 1144 uint32_t :5; /*!< bit: 0.. 4 Reserved */
mbed_official 579:53297373a894 1145 uint32_t COUNT:19; /*!< bit: 5..23 Counter Value */
mbed_official 579:53297373a894 1146 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1147 } DITH5; /*!< Structure used for DITH5 */
mbed_official 579:53297373a894 1148 struct { // DITH6 mode
mbed_official 579:53297373a894 1149 uint32_t :6; /*!< bit: 0.. 5 Reserved */
mbed_official 579:53297373a894 1150 uint32_t COUNT:18; /*!< bit: 6..23 Counter Value */
mbed_official 579:53297373a894 1151 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1152 } DITH6; /*!< Structure used for DITH6 */
mbed_official 579:53297373a894 1153 struct {
mbed_official 579:53297373a894 1154 uint32_t COUNT:24; /*!< bit: 0..23 Counter Value */
mbed_official 579:53297373a894 1155 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1156 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 1157 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 1158 } TCC_COUNT_Type;
mbed_official 579:53297373a894 1159 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 1160
mbed_official 579:53297373a894 1161 #define TCC_COUNT_OFFSET 0x34 /**< \brief (TCC_COUNT offset) Count */
mbed_official 579:53297373a894 1162 #define TCC_COUNT_RESETVALUE 0x00000000ul /**< \brief (TCC_COUNT reset_value) Count */
mbed_official 579:53297373a894 1163
mbed_official 579:53297373a894 1164 // DITH4 mode
mbed_official 579:53297373a894 1165 #define TCC_COUNT_DITH4_COUNT_Pos 4 /**< \brief (TCC_COUNT_DITH4) Counter Value */
mbed_official 579:53297373a894 1166 #define TCC_COUNT_DITH4_COUNT_Msk (0xFFFFFul << TCC_COUNT_DITH4_COUNT_Pos)
mbed_official 579:53297373a894 1167 #define TCC_COUNT_DITH4_COUNT(value) ((TCC_COUNT_DITH4_COUNT_Msk & ((value) << TCC_COUNT_DITH4_COUNT_Pos)))
mbed_official 579:53297373a894 1168 #define TCC_COUNT_DITH4_MASK 0x00FFFFF0ul /**< \brief (TCC_COUNT_DITH4) MASK Register */
mbed_official 579:53297373a894 1169
mbed_official 579:53297373a894 1170 // DITH5 mode
mbed_official 579:53297373a894 1171 #define TCC_COUNT_DITH5_COUNT_Pos 5 /**< \brief (TCC_COUNT_DITH5) Counter Value */
mbed_official 579:53297373a894 1172 #define TCC_COUNT_DITH5_COUNT_Msk (0x7FFFFul << TCC_COUNT_DITH5_COUNT_Pos)
mbed_official 579:53297373a894 1173 #define TCC_COUNT_DITH5_COUNT(value) ((TCC_COUNT_DITH5_COUNT_Msk & ((value) << TCC_COUNT_DITH5_COUNT_Pos)))
mbed_official 579:53297373a894 1174 #define TCC_COUNT_DITH5_MASK 0x00FFFFE0ul /**< \brief (TCC_COUNT_DITH5) MASK Register */
mbed_official 579:53297373a894 1175
mbed_official 579:53297373a894 1176 // DITH6 mode
mbed_official 579:53297373a894 1177 #define TCC_COUNT_DITH6_COUNT_Pos 6 /**< \brief (TCC_COUNT_DITH6) Counter Value */
mbed_official 579:53297373a894 1178 #define TCC_COUNT_DITH6_COUNT_Msk (0x3FFFFul << TCC_COUNT_DITH6_COUNT_Pos)
mbed_official 579:53297373a894 1179 #define TCC_COUNT_DITH6_COUNT(value) ((TCC_COUNT_DITH6_COUNT_Msk & ((value) << TCC_COUNT_DITH6_COUNT_Pos)))
mbed_official 579:53297373a894 1180 #define TCC_COUNT_DITH6_MASK 0x00FFFFC0ul /**< \brief (TCC_COUNT_DITH6) MASK Register */
mbed_official 579:53297373a894 1181
mbed_official 579:53297373a894 1182 #define TCC_COUNT_COUNT_Pos 0 /**< \brief (TCC_COUNT) Counter Value */
mbed_official 579:53297373a894 1183 #define TCC_COUNT_COUNT_Msk (0xFFFFFFul << TCC_COUNT_COUNT_Pos)
mbed_official 579:53297373a894 1184 #define TCC_COUNT_COUNT(value) ((TCC_COUNT_COUNT_Msk & ((value) << TCC_COUNT_COUNT_Pos)))
mbed_official 579:53297373a894 1185 #define TCC_COUNT_MASK 0x00FFFFFFul /**< \brief (TCC_COUNT) MASK Register */
mbed_official 579:53297373a894 1186
mbed_official 579:53297373a894 1187 /* -------- TCC_PATT : (TCC Offset: 0x38) (R/W 16) Pattern -------- */
mbed_official 579:53297373a894 1188 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 1189 typedef union {
mbed_official 579:53297373a894 1190 struct {
mbed_official 579:53297373a894 1191 uint16_t PGE0:1; /*!< bit: 0 Pattern Generator 0 Output Enable */
mbed_official 579:53297373a894 1192 uint16_t PGE1:1; /*!< bit: 1 Pattern Generator 1 Output Enable */
mbed_official 579:53297373a894 1193 uint16_t PGE2:1; /*!< bit: 2 Pattern Generator 2 Output Enable */
mbed_official 579:53297373a894 1194 uint16_t PGE3:1; /*!< bit: 3 Pattern Generator 3 Output Enable */
mbed_official 579:53297373a894 1195 uint16_t PGE4:1; /*!< bit: 4 Pattern Generator 4 Output Enable */
mbed_official 579:53297373a894 1196 uint16_t PGE5:1; /*!< bit: 5 Pattern Generator 5 Output Enable */
mbed_official 579:53297373a894 1197 uint16_t PGE6:1; /*!< bit: 6 Pattern Generator 6 Output Enable */
mbed_official 579:53297373a894 1198 uint16_t PGE7:1; /*!< bit: 7 Pattern Generator 7 Output Enable */
mbed_official 579:53297373a894 1199 uint16_t PGV0:1; /*!< bit: 8 Pattern Generator 0 Output Value */
mbed_official 579:53297373a894 1200 uint16_t PGV1:1; /*!< bit: 9 Pattern Generator 1 Output Value */
mbed_official 579:53297373a894 1201 uint16_t PGV2:1; /*!< bit: 10 Pattern Generator 2 Output Value */
mbed_official 579:53297373a894 1202 uint16_t PGV3:1; /*!< bit: 11 Pattern Generator 3 Output Value */
mbed_official 579:53297373a894 1203 uint16_t PGV4:1; /*!< bit: 12 Pattern Generator 4 Output Value */
mbed_official 579:53297373a894 1204 uint16_t PGV5:1; /*!< bit: 13 Pattern Generator 5 Output Value */
mbed_official 579:53297373a894 1205 uint16_t PGV6:1; /*!< bit: 14 Pattern Generator 6 Output Value */
mbed_official 579:53297373a894 1206 uint16_t PGV7:1; /*!< bit: 15 Pattern Generator 7 Output Value */
mbed_official 579:53297373a894 1207 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 1208 struct {
mbed_official 579:53297373a894 1209 uint16_t PGE:8; /*!< bit: 0.. 7 Pattern Generator x Output Enable */
mbed_official 579:53297373a894 1210 uint16_t PGV:8; /*!< bit: 8..15 Pattern Generator x Output Value */
mbed_official 579:53297373a894 1211 } vec; /*!< Structure used for vec access */
mbed_official 579:53297373a894 1212 uint16_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 1213 } TCC_PATT_Type;
mbed_official 579:53297373a894 1214 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 1215
mbed_official 579:53297373a894 1216 #define TCC_PATT_OFFSET 0x38 /**< \brief (TCC_PATT offset) Pattern */
mbed_official 579:53297373a894 1217 #define TCC_PATT_RESETVALUE 0x0000ul /**< \brief (TCC_PATT reset_value) Pattern */
mbed_official 579:53297373a894 1218
mbed_official 579:53297373a894 1219 #define TCC_PATT_PGE0_Pos 0 /**< \brief (TCC_PATT) Pattern Generator 0 Output Enable */
mbed_official 579:53297373a894 1220 #define TCC_PATT_PGE0 (1 << TCC_PATT_PGE0_Pos)
mbed_official 579:53297373a894 1221 #define TCC_PATT_PGE1_Pos 1 /**< \brief (TCC_PATT) Pattern Generator 1 Output Enable */
mbed_official 579:53297373a894 1222 #define TCC_PATT_PGE1 (1 << TCC_PATT_PGE1_Pos)
mbed_official 579:53297373a894 1223 #define TCC_PATT_PGE2_Pos 2 /**< \brief (TCC_PATT) Pattern Generator 2 Output Enable */
mbed_official 579:53297373a894 1224 #define TCC_PATT_PGE2 (1 << TCC_PATT_PGE2_Pos)
mbed_official 579:53297373a894 1225 #define TCC_PATT_PGE3_Pos 3 /**< \brief (TCC_PATT) Pattern Generator 3 Output Enable */
mbed_official 579:53297373a894 1226 #define TCC_PATT_PGE3 (1 << TCC_PATT_PGE3_Pos)
mbed_official 579:53297373a894 1227 #define TCC_PATT_PGE4_Pos 4 /**< \brief (TCC_PATT) Pattern Generator 4 Output Enable */
mbed_official 579:53297373a894 1228 #define TCC_PATT_PGE4 (1 << TCC_PATT_PGE4_Pos)
mbed_official 579:53297373a894 1229 #define TCC_PATT_PGE5_Pos 5 /**< \brief (TCC_PATT) Pattern Generator 5 Output Enable */
mbed_official 579:53297373a894 1230 #define TCC_PATT_PGE5 (1 << TCC_PATT_PGE5_Pos)
mbed_official 579:53297373a894 1231 #define TCC_PATT_PGE6_Pos 6 /**< \brief (TCC_PATT) Pattern Generator 6 Output Enable */
mbed_official 579:53297373a894 1232 #define TCC_PATT_PGE6 (1 << TCC_PATT_PGE6_Pos)
mbed_official 579:53297373a894 1233 #define TCC_PATT_PGE7_Pos 7 /**< \brief (TCC_PATT) Pattern Generator 7 Output Enable */
mbed_official 579:53297373a894 1234 #define TCC_PATT_PGE7 (1 << TCC_PATT_PGE7_Pos)
mbed_official 579:53297373a894 1235 #define TCC_PATT_PGE_Pos 0 /**< \brief (TCC_PATT) Pattern Generator x Output Enable */
mbed_official 579:53297373a894 1236 #define TCC_PATT_PGE_Msk (0xFFul << TCC_PATT_PGE_Pos)
mbed_official 579:53297373a894 1237 #define TCC_PATT_PGE(value) ((TCC_PATT_PGE_Msk & ((value) << TCC_PATT_PGE_Pos)))
mbed_official 579:53297373a894 1238 #define TCC_PATT_PGV0_Pos 8 /**< \brief (TCC_PATT) Pattern Generator 0 Output Value */
mbed_official 579:53297373a894 1239 #define TCC_PATT_PGV0 (1 << TCC_PATT_PGV0_Pos)
mbed_official 579:53297373a894 1240 #define TCC_PATT_PGV1_Pos 9 /**< \brief (TCC_PATT) Pattern Generator 1 Output Value */
mbed_official 579:53297373a894 1241 #define TCC_PATT_PGV1 (1 << TCC_PATT_PGV1_Pos)
mbed_official 579:53297373a894 1242 #define TCC_PATT_PGV2_Pos 10 /**< \brief (TCC_PATT) Pattern Generator 2 Output Value */
mbed_official 579:53297373a894 1243 #define TCC_PATT_PGV2 (1 << TCC_PATT_PGV2_Pos)
mbed_official 579:53297373a894 1244 #define TCC_PATT_PGV3_Pos 11 /**< \brief (TCC_PATT) Pattern Generator 3 Output Value */
mbed_official 579:53297373a894 1245 #define TCC_PATT_PGV3 (1 << TCC_PATT_PGV3_Pos)
mbed_official 579:53297373a894 1246 #define TCC_PATT_PGV4_Pos 12 /**< \brief (TCC_PATT) Pattern Generator 4 Output Value */
mbed_official 579:53297373a894 1247 #define TCC_PATT_PGV4 (1 << TCC_PATT_PGV4_Pos)
mbed_official 579:53297373a894 1248 #define TCC_PATT_PGV5_Pos 13 /**< \brief (TCC_PATT) Pattern Generator 5 Output Value */
mbed_official 579:53297373a894 1249 #define TCC_PATT_PGV5 (1 << TCC_PATT_PGV5_Pos)
mbed_official 579:53297373a894 1250 #define TCC_PATT_PGV6_Pos 14 /**< \brief (TCC_PATT) Pattern Generator 6 Output Value */
mbed_official 579:53297373a894 1251 #define TCC_PATT_PGV6 (1 << TCC_PATT_PGV6_Pos)
mbed_official 579:53297373a894 1252 #define TCC_PATT_PGV7_Pos 15 /**< \brief (TCC_PATT) Pattern Generator 7 Output Value */
mbed_official 579:53297373a894 1253 #define TCC_PATT_PGV7 (1 << TCC_PATT_PGV7_Pos)
mbed_official 579:53297373a894 1254 #define TCC_PATT_PGV_Pos 8 /**< \brief (TCC_PATT) Pattern Generator x Output Value */
mbed_official 579:53297373a894 1255 #define TCC_PATT_PGV_Msk (0xFFul << TCC_PATT_PGV_Pos)
mbed_official 579:53297373a894 1256 #define TCC_PATT_PGV(value) ((TCC_PATT_PGV_Msk & ((value) << TCC_PATT_PGV_Pos)))
mbed_official 579:53297373a894 1257 #define TCC_PATT_MASK 0xFFFFul /**< \brief (TCC_PATT) MASK Register */
mbed_official 579:53297373a894 1258
mbed_official 579:53297373a894 1259 /* -------- TCC_WAVE : (TCC Offset: 0x3C) (R/W 32) Waveform Control -------- */
mbed_official 579:53297373a894 1260 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 1261 typedef union {
mbed_official 579:53297373a894 1262 struct {
mbed_official 579:53297373a894 1263 uint32_t WAVEGEN:3; /*!< bit: 0.. 2 Waveform Generation */
mbed_official 579:53297373a894 1264 uint32_t :1; /*!< bit: 3 Reserved */
mbed_official 579:53297373a894 1265 uint32_t RAMP:2; /*!< bit: 4.. 5 Ramp Mode */
mbed_official 579:53297373a894 1266 uint32_t :1; /*!< bit: 6 Reserved */
mbed_official 579:53297373a894 1267 uint32_t CIPEREN:1; /*!< bit: 7 Circular period Enable */
mbed_official 579:53297373a894 1268 uint32_t CICCEN0:1; /*!< bit: 8 Circular Channel 0 Enable */
mbed_official 579:53297373a894 1269 uint32_t CICCEN1:1; /*!< bit: 9 Circular Channel 1 Enable */
mbed_official 579:53297373a894 1270 uint32_t CICCEN2:1; /*!< bit: 10 Circular Channel 2 Enable */
mbed_official 579:53297373a894 1271 uint32_t CICCEN3:1; /*!< bit: 11 Circular Channel 3 Enable */
mbed_official 579:53297373a894 1272 uint32_t :4; /*!< bit: 12..15 Reserved */
mbed_official 579:53297373a894 1273 uint32_t POL0:1; /*!< bit: 16 Channel 0 Polarity */
mbed_official 579:53297373a894 1274 uint32_t POL1:1; /*!< bit: 17 Channel 1 Polarity */
mbed_official 579:53297373a894 1275 uint32_t POL2:1; /*!< bit: 18 Channel 2 Polarity */
mbed_official 579:53297373a894 1276 uint32_t POL3:1; /*!< bit: 19 Channel 3 Polarity */
mbed_official 579:53297373a894 1277 uint32_t :4; /*!< bit: 20..23 Reserved */
mbed_official 579:53297373a894 1278 uint32_t SWAP0:1; /*!< bit: 24 Swap DTI Output Pair 0 */
mbed_official 579:53297373a894 1279 uint32_t SWAP1:1; /*!< bit: 25 Swap DTI Output Pair 1 */
mbed_official 579:53297373a894 1280 uint32_t SWAP2:1; /*!< bit: 26 Swap DTI Output Pair 2 */
mbed_official 579:53297373a894 1281 uint32_t SWAP3:1; /*!< bit: 27 Swap DTI Output Pair 3 */
mbed_official 579:53297373a894 1282 uint32_t :4; /*!< bit: 28..31 Reserved */
mbed_official 579:53297373a894 1283 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 1284 struct {
mbed_official 579:53297373a894 1285 uint32_t :8; /*!< bit: 0.. 7 Reserved */
mbed_official 579:53297373a894 1286 uint32_t CICCEN:4; /*!< bit: 8..11 Circular Channel x Enable */
mbed_official 579:53297373a894 1287 uint32_t :4; /*!< bit: 12..15 Reserved */
mbed_official 579:53297373a894 1288 uint32_t POL:4; /*!< bit: 16..19 Channel x Polarity */
mbed_official 579:53297373a894 1289 uint32_t :4; /*!< bit: 20..23 Reserved */
mbed_official 579:53297373a894 1290 uint32_t SWAP:4; /*!< bit: 24..27 Swap DTI Output Pair x */
mbed_official 579:53297373a894 1291 uint32_t :4; /*!< bit: 28..31 Reserved */
mbed_official 579:53297373a894 1292 } vec; /*!< Structure used for vec access */
mbed_official 579:53297373a894 1293 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 1294 } TCC_WAVE_Type;
mbed_official 579:53297373a894 1295 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 1296
mbed_official 579:53297373a894 1297 #define TCC_WAVE_OFFSET 0x3C /**< \brief (TCC_WAVE offset) Waveform Control */
mbed_official 579:53297373a894 1298 #define TCC_WAVE_RESETVALUE 0x00000000ul /**< \brief (TCC_WAVE reset_value) Waveform Control */
mbed_official 579:53297373a894 1299
mbed_official 579:53297373a894 1300 #define TCC_WAVE_WAVEGEN_Pos 0 /**< \brief (TCC_WAVE) Waveform Generation */
mbed_official 579:53297373a894 1301 #define TCC_WAVE_WAVEGEN_Msk (0x7ul << TCC_WAVE_WAVEGEN_Pos)
mbed_official 579:53297373a894 1302 #define TCC_WAVE_WAVEGEN(value) ((TCC_WAVE_WAVEGEN_Msk & ((value) << TCC_WAVE_WAVEGEN_Pos)))
mbed_official 579:53297373a894 1303 #define TCC_WAVE_WAVEGEN_NFRQ_Val 0x0ul /**< \brief (TCC_WAVE) Normal frequency */
mbed_official 579:53297373a894 1304 #define TCC_WAVE_WAVEGEN_MFRQ_Val 0x1ul /**< \brief (TCC_WAVE) Match frequency */
mbed_official 579:53297373a894 1305 #define TCC_WAVE_WAVEGEN_NPWM_Val 0x2ul /**< \brief (TCC_WAVE) Normal PWM */
mbed_official 579:53297373a894 1306 #define TCC_WAVE_WAVEGEN_DSCRITICAL_Val 0x4ul /**< \brief (TCC_WAVE) Dual-slope critical */
mbed_official 579:53297373a894 1307 #define TCC_WAVE_WAVEGEN_DSBOTTOM_Val 0x5ul /**< \brief (TCC_WAVE) Dual-slope with interrupt/event condition when COUNT reaches ZERO */
mbed_official 579:53297373a894 1308 #define TCC_WAVE_WAVEGEN_DSBOTH_Val 0x6ul /**< \brief (TCC_WAVE) Dual-slope with interrupt/event condition when COUNT reaches ZERO or TOP */
mbed_official 579:53297373a894 1309 #define TCC_WAVE_WAVEGEN_DSTOP_Val 0x7ul /**< \brief (TCC_WAVE) Dual-slope with interrupt/event condition when COUNT reaches TOP */
mbed_official 579:53297373a894 1310 #define TCC_WAVE_WAVEGEN_NFRQ (TCC_WAVE_WAVEGEN_NFRQ_Val << TCC_WAVE_WAVEGEN_Pos)
mbed_official 579:53297373a894 1311 #define TCC_WAVE_WAVEGEN_MFRQ (TCC_WAVE_WAVEGEN_MFRQ_Val << TCC_WAVE_WAVEGEN_Pos)
mbed_official 579:53297373a894 1312 #define TCC_WAVE_WAVEGEN_NPWM (TCC_WAVE_WAVEGEN_NPWM_Val << TCC_WAVE_WAVEGEN_Pos)
mbed_official 579:53297373a894 1313 #define TCC_WAVE_WAVEGEN_DSCRITICAL (TCC_WAVE_WAVEGEN_DSCRITICAL_Val << TCC_WAVE_WAVEGEN_Pos)
mbed_official 579:53297373a894 1314 #define TCC_WAVE_WAVEGEN_DSBOTTOM (TCC_WAVE_WAVEGEN_DSBOTTOM_Val << TCC_WAVE_WAVEGEN_Pos)
mbed_official 579:53297373a894 1315 #define TCC_WAVE_WAVEGEN_DSBOTH (TCC_WAVE_WAVEGEN_DSBOTH_Val << TCC_WAVE_WAVEGEN_Pos)
mbed_official 579:53297373a894 1316 #define TCC_WAVE_WAVEGEN_DSTOP (TCC_WAVE_WAVEGEN_DSTOP_Val << TCC_WAVE_WAVEGEN_Pos)
mbed_official 579:53297373a894 1317 #define TCC_WAVE_RAMP_Pos 4 /**< \brief (TCC_WAVE) Ramp Mode */
mbed_official 579:53297373a894 1318 #define TCC_WAVE_RAMP_Msk (0x3ul << TCC_WAVE_RAMP_Pos)
mbed_official 579:53297373a894 1319 #define TCC_WAVE_RAMP(value) ((TCC_WAVE_RAMP_Msk & ((value) << TCC_WAVE_RAMP_Pos)))
mbed_official 579:53297373a894 1320 #define TCC_WAVE_RAMP_RAMP1_Val 0x0ul /**< \brief (TCC_WAVE) RAMP1 operation */
mbed_official 579:53297373a894 1321 #define TCC_WAVE_RAMP_RAMP2A_Val 0x1ul /**< \brief (TCC_WAVE) Alternative RAMP2 operation */
mbed_official 579:53297373a894 1322 #define TCC_WAVE_RAMP_RAMP2_Val 0x2ul /**< \brief (TCC_WAVE) RAMP2 operation */
mbed_official 579:53297373a894 1323 #define TCC_WAVE_RAMP_RAMP1 (TCC_WAVE_RAMP_RAMP1_Val << TCC_WAVE_RAMP_Pos)
mbed_official 579:53297373a894 1324 #define TCC_WAVE_RAMP_RAMP2A (TCC_WAVE_RAMP_RAMP2A_Val << TCC_WAVE_RAMP_Pos)
mbed_official 579:53297373a894 1325 #define TCC_WAVE_RAMP_RAMP2 (TCC_WAVE_RAMP_RAMP2_Val << TCC_WAVE_RAMP_Pos)
mbed_official 579:53297373a894 1326 #define TCC_WAVE_CIPEREN_Pos 7 /**< \brief (TCC_WAVE) Circular period Enable */
mbed_official 579:53297373a894 1327 #define TCC_WAVE_CIPEREN (0x1ul << TCC_WAVE_CIPEREN_Pos)
mbed_official 579:53297373a894 1328 #define TCC_WAVE_CICCEN0_Pos 8 /**< \brief (TCC_WAVE) Circular Channel 0 Enable */
mbed_official 579:53297373a894 1329 #define TCC_WAVE_CICCEN0 (1 << TCC_WAVE_CICCEN0_Pos)
mbed_official 579:53297373a894 1330 #define TCC_WAVE_CICCEN1_Pos 9 /**< \brief (TCC_WAVE) Circular Channel 1 Enable */
mbed_official 579:53297373a894 1331 #define TCC_WAVE_CICCEN1 (1 << TCC_WAVE_CICCEN1_Pos)
mbed_official 579:53297373a894 1332 #define TCC_WAVE_CICCEN2_Pos 10 /**< \brief (TCC_WAVE) Circular Channel 2 Enable */
mbed_official 579:53297373a894 1333 #define TCC_WAVE_CICCEN2 (1 << TCC_WAVE_CICCEN2_Pos)
mbed_official 579:53297373a894 1334 #define TCC_WAVE_CICCEN3_Pos 11 /**< \brief (TCC_WAVE) Circular Channel 3 Enable */
mbed_official 579:53297373a894 1335 #define TCC_WAVE_CICCEN3 (1 << TCC_WAVE_CICCEN3_Pos)
mbed_official 579:53297373a894 1336 #define TCC_WAVE_CICCEN_Pos 8 /**< \brief (TCC_WAVE) Circular Channel x Enable */
mbed_official 579:53297373a894 1337 #define TCC_WAVE_CICCEN_Msk (0xFul << TCC_WAVE_CICCEN_Pos)
mbed_official 579:53297373a894 1338 #define TCC_WAVE_CICCEN(value) ((TCC_WAVE_CICCEN_Msk & ((value) << TCC_WAVE_CICCEN_Pos)))
mbed_official 579:53297373a894 1339 #define TCC_WAVE_POL0_Pos 16 /**< \brief (TCC_WAVE) Channel 0 Polarity */
mbed_official 579:53297373a894 1340 #define TCC_WAVE_POL0 (1 << TCC_WAVE_POL0_Pos)
mbed_official 579:53297373a894 1341 #define TCC_WAVE_POL1_Pos 17 /**< \brief (TCC_WAVE) Channel 1 Polarity */
mbed_official 579:53297373a894 1342 #define TCC_WAVE_POL1 (1 << TCC_WAVE_POL1_Pos)
mbed_official 579:53297373a894 1343 #define TCC_WAVE_POL2_Pos 18 /**< \brief (TCC_WAVE) Channel 2 Polarity */
mbed_official 579:53297373a894 1344 #define TCC_WAVE_POL2 (1 << TCC_WAVE_POL2_Pos)
mbed_official 579:53297373a894 1345 #define TCC_WAVE_POL3_Pos 19 /**< \brief (TCC_WAVE) Channel 3 Polarity */
mbed_official 579:53297373a894 1346 #define TCC_WAVE_POL3 (1 << TCC_WAVE_POL3_Pos)
mbed_official 579:53297373a894 1347 #define TCC_WAVE_POL_Pos 16 /**< \brief (TCC_WAVE) Channel x Polarity */
mbed_official 579:53297373a894 1348 #define TCC_WAVE_POL_Msk (0xFul << TCC_WAVE_POL_Pos)
mbed_official 579:53297373a894 1349 #define TCC_WAVE_POL(value) ((TCC_WAVE_POL_Msk & ((value) << TCC_WAVE_POL_Pos)))
mbed_official 579:53297373a894 1350 #define TCC_WAVE_SWAP0_Pos 24 /**< \brief (TCC_WAVE) Swap DTI Output Pair 0 */
mbed_official 579:53297373a894 1351 #define TCC_WAVE_SWAP0 (1 << TCC_WAVE_SWAP0_Pos)
mbed_official 579:53297373a894 1352 #define TCC_WAVE_SWAP1_Pos 25 /**< \brief (TCC_WAVE) Swap DTI Output Pair 1 */
mbed_official 579:53297373a894 1353 #define TCC_WAVE_SWAP1 (1 << TCC_WAVE_SWAP1_Pos)
mbed_official 579:53297373a894 1354 #define TCC_WAVE_SWAP2_Pos 26 /**< \brief (TCC_WAVE) Swap DTI Output Pair 2 */
mbed_official 579:53297373a894 1355 #define TCC_WAVE_SWAP2 (1 << TCC_WAVE_SWAP2_Pos)
mbed_official 579:53297373a894 1356 #define TCC_WAVE_SWAP3_Pos 27 /**< \brief (TCC_WAVE) Swap DTI Output Pair 3 */
mbed_official 579:53297373a894 1357 #define TCC_WAVE_SWAP3 (1 << TCC_WAVE_SWAP3_Pos)
mbed_official 579:53297373a894 1358 #define TCC_WAVE_SWAP_Pos 24 /**< \brief (TCC_WAVE) Swap DTI Output Pair x */
mbed_official 579:53297373a894 1359 #define TCC_WAVE_SWAP_Msk (0xFul << TCC_WAVE_SWAP_Pos)
mbed_official 579:53297373a894 1360 #define TCC_WAVE_SWAP(value) ((TCC_WAVE_SWAP_Msk & ((value) << TCC_WAVE_SWAP_Pos)))
mbed_official 579:53297373a894 1361 #define TCC_WAVE_MASK 0x0F0F0FB7ul /**< \brief (TCC_WAVE) MASK Register */
mbed_official 579:53297373a894 1362
mbed_official 579:53297373a894 1363 /* -------- TCC_PER : (TCC Offset: 0x40) (R/W 32) Period -------- */
mbed_official 579:53297373a894 1364 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 1365 typedef union {
mbed_official 579:53297373a894 1366 struct { // DITH4 mode
mbed_official 579:53297373a894 1367 uint32_t DITHERCY:4; /*!< bit: 0.. 3 Dithering Cycle Number */
mbed_official 579:53297373a894 1368 uint32_t PER:20; /*!< bit: 4..23 Period Value */
mbed_official 579:53297373a894 1369 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1370 } DITH4; /*!< Structure used for DITH4 */
mbed_official 579:53297373a894 1371 struct { // DITH5 mode
mbed_official 579:53297373a894 1372 uint32_t DITHERCY:5; /*!< bit: 0.. 4 Dithering Cycle Number */
mbed_official 579:53297373a894 1373 uint32_t PER:19; /*!< bit: 5..23 Period Value */
mbed_official 579:53297373a894 1374 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1375 } DITH5; /*!< Structure used for DITH5 */
mbed_official 579:53297373a894 1376 struct { // DITH6 mode
mbed_official 579:53297373a894 1377 uint32_t DITHERCY:6; /*!< bit: 0.. 5 Dithering Cycle Number */
mbed_official 579:53297373a894 1378 uint32_t PER:18; /*!< bit: 6..23 Period Value */
mbed_official 579:53297373a894 1379 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1380 } DITH6; /*!< Structure used for DITH6 */
mbed_official 579:53297373a894 1381 struct {
mbed_official 579:53297373a894 1382 uint32_t PER:24; /*!< bit: 0..23 Period Value */
mbed_official 579:53297373a894 1383 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1384 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 1385 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 1386 } TCC_PER_Type;
mbed_official 579:53297373a894 1387 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 1388
mbed_official 579:53297373a894 1389 #define TCC_PER_OFFSET 0x40 /**< \brief (TCC_PER offset) Period */
mbed_official 579:53297373a894 1390 #define TCC_PER_RESETVALUE 0xFFFFFFFFul /**< \brief (TCC_PER reset_value) Period */
mbed_official 579:53297373a894 1391
mbed_official 579:53297373a894 1392 // DITH4 mode
mbed_official 579:53297373a894 1393 #define TCC_PER_DITH4_DITHERCY_Pos 0 /**< \brief (TCC_PER_DITH4) Dithering Cycle Number */
mbed_official 579:53297373a894 1394 #define TCC_PER_DITH4_DITHERCY_Msk (0xFul << TCC_PER_DITH4_DITHERCY_Pos)
mbed_official 579:53297373a894 1395 #define TCC_PER_DITH4_DITHERCY(value) ((TCC_PER_DITH4_DITHERCY_Msk & ((value) << TCC_PER_DITH4_DITHERCY_Pos)))
mbed_official 579:53297373a894 1396 #define TCC_PER_DITH4_PER_Pos 4 /**< \brief (TCC_PER_DITH4) Period Value */
mbed_official 579:53297373a894 1397 #define TCC_PER_DITH4_PER_Msk (0xFFFFFul << TCC_PER_DITH4_PER_Pos)
mbed_official 579:53297373a894 1398 #define TCC_PER_DITH4_PER(value) ((TCC_PER_DITH4_PER_Msk & ((value) << TCC_PER_DITH4_PER_Pos)))
mbed_official 579:53297373a894 1399 #define TCC_PER_DITH4_MASK 0x00FFFFFFul /**< \brief (TCC_PER_DITH4) MASK Register */
mbed_official 579:53297373a894 1400
mbed_official 579:53297373a894 1401 // DITH5 mode
mbed_official 579:53297373a894 1402 #define TCC_PER_DITH5_DITHERCY_Pos 0 /**< \brief (TCC_PER_DITH5) Dithering Cycle Number */
mbed_official 579:53297373a894 1403 #define TCC_PER_DITH5_DITHERCY_Msk (0x1Ful << TCC_PER_DITH5_DITHERCY_Pos)
mbed_official 579:53297373a894 1404 #define TCC_PER_DITH5_DITHERCY(value) ((TCC_PER_DITH5_DITHERCY_Msk & ((value) << TCC_PER_DITH5_DITHERCY_Pos)))
mbed_official 579:53297373a894 1405 #define TCC_PER_DITH5_PER_Pos 5 /**< \brief (TCC_PER_DITH5) Period Value */
mbed_official 579:53297373a894 1406 #define TCC_PER_DITH5_PER_Msk (0x7FFFFul << TCC_PER_DITH5_PER_Pos)
mbed_official 579:53297373a894 1407 #define TCC_PER_DITH5_PER(value) ((TCC_PER_DITH5_PER_Msk & ((value) << TCC_PER_DITH5_PER_Pos)))
mbed_official 579:53297373a894 1408 #define TCC_PER_DITH5_MASK 0x00FFFFFFul /**< \brief (TCC_PER_DITH5) MASK Register */
mbed_official 579:53297373a894 1409
mbed_official 579:53297373a894 1410 // DITH6 mode
mbed_official 579:53297373a894 1411 #define TCC_PER_DITH6_DITHERCY_Pos 0 /**< \brief (TCC_PER_DITH6) Dithering Cycle Number */
mbed_official 579:53297373a894 1412 #define TCC_PER_DITH6_DITHERCY_Msk (0x3Ful << TCC_PER_DITH6_DITHERCY_Pos)
mbed_official 579:53297373a894 1413 #define TCC_PER_DITH6_DITHERCY(value) ((TCC_PER_DITH6_DITHERCY_Msk & ((value) << TCC_PER_DITH6_DITHERCY_Pos)))
mbed_official 579:53297373a894 1414 #define TCC_PER_DITH6_PER_Pos 6 /**< \brief (TCC_PER_DITH6) Period Value */
mbed_official 579:53297373a894 1415 #define TCC_PER_DITH6_PER_Msk (0x3FFFFul << TCC_PER_DITH6_PER_Pos)
mbed_official 579:53297373a894 1416 #define TCC_PER_DITH6_PER(value) ((TCC_PER_DITH6_PER_Msk & ((value) << TCC_PER_DITH6_PER_Pos)))
mbed_official 579:53297373a894 1417 #define TCC_PER_DITH6_MASK 0x00FFFFFFul /**< \brief (TCC_PER_DITH6) MASK Register */
mbed_official 579:53297373a894 1418
mbed_official 579:53297373a894 1419 #define TCC_PER_PER_Pos 0 /**< \brief (TCC_PER) Period Value */
mbed_official 579:53297373a894 1420 #define TCC_PER_PER_Msk (0xFFFFFFul << TCC_PER_PER_Pos)
mbed_official 579:53297373a894 1421 #define TCC_PER_PER(value) ((TCC_PER_PER_Msk & ((value) << TCC_PER_PER_Pos)))
mbed_official 579:53297373a894 1422 #define TCC_PER_MASK 0x00FFFFFFul /**< \brief (TCC_PER) MASK Register */
mbed_official 579:53297373a894 1423
mbed_official 579:53297373a894 1424 /* -------- TCC_CC : (TCC Offset: 0x44) (R/W 32) Compare and Capture -------- */
mbed_official 579:53297373a894 1425 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 1426 typedef union {
mbed_official 579:53297373a894 1427 struct { // DITH4 mode
mbed_official 579:53297373a894 1428 uint32_t DITHERCY:4; /*!< bit: 0.. 3 Dithering Cycle Number */
mbed_official 579:53297373a894 1429 uint32_t CC:20; /*!< bit: 4..23 Channel Compare/Capture Value */
mbed_official 579:53297373a894 1430 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1431 } DITH4; /*!< Structure used for DITH4 */
mbed_official 579:53297373a894 1432 struct { // DITH5 mode
mbed_official 579:53297373a894 1433 uint32_t DITHERCY:5; /*!< bit: 0.. 4 Dithering Cycle Number */
mbed_official 579:53297373a894 1434 uint32_t CC:19; /*!< bit: 5..23 Channel Compare/Capture Value */
mbed_official 579:53297373a894 1435 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1436 } DITH5; /*!< Structure used for DITH5 */
mbed_official 579:53297373a894 1437 struct { // DITH6 mode
mbed_official 579:53297373a894 1438 uint32_t DITHERCY:6; /*!< bit: 0.. 5 Dithering Cycle Number */
mbed_official 579:53297373a894 1439 uint32_t CC:18; /*!< bit: 6..23 Channel Compare/Capture Value */
mbed_official 579:53297373a894 1440 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1441 } DITH6; /*!< Structure used for DITH6 */
mbed_official 579:53297373a894 1442 struct {
mbed_official 579:53297373a894 1443 uint32_t CC:24; /*!< bit: 0..23 Channel Compare/Capture Value */
mbed_official 579:53297373a894 1444 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1445 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 1446 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 1447 } TCC_CC_Type;
mbed_official 579:53297373a894 1448 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 1449
mbed_official 579:53297373a894 1450 #define TCC_CC_OFFSET 0x44 /**< \brief (TCC_CC offset) Compare and Capture */
mbed_official 579:53297373a894 1451 #define TCC_CC_RESETVALUE 0x00000000ul /**< \brief (TCC_CC reset_value) Compare and Capture */
mbed_official 579:53297373a894 1452
mbed_official 579:53297373a894 1453 // DITH4 mode
mbed_official 579:53297373a894 1454 #define TCC_CC_DITH4_DITHERCY_Pos 0 /**< \brief (TCC_CC_DITH4) Dithering Cycle Number */
mbed_official 579:53297373a894 1455 #define TCC_CC_DITH4_DITHERCY_Msk (0xFul << TCC_CC_DITH4_DITHERCY_Pos)
mbed_official 579:53297373a894 1456 #define TCC_CC_DITH4_DITHERCY(value) ((TCC_CC_DITH4_DITHERCY_Msk & ((value) << TCC_CC_DITH4_DITHERCY_Pos)))
mbed_official 579:53297373a894 1457 #define TCC_CC_DITH4_CC_Pos 4 /**< \brief (TCC_CC_DITH4) Channel Compare/Capture Value */
mbed_official 579:53297373a894 1458 #define TCC_CC_DITH4_CC_Msk (0xFFFFFul << TCC_CC_DITH4_CC_Pos)
mbed_official 579:53297373a894 1459 #define TCC_CC_DITH4_CC(value) ((TCC_CC_DITH4_CC_Msk & ((value) << TCC_CC_DITH4_CC_Pos)))
mbed_official 579:53297373a894 1460 #define TCC_CC_DITH4_MASK 0x00FFFFFFul /**< \brief (TCC_CC_DITH4) MASK Register */
mbed_official 579:53297373a894 1461
mbed_official 579:53297373a894 1462 // DITH5 mode
mbed_official 579:53297373a894 1463 #define TCC_CC_DITH5_DITHERCY_Pos 0 /**< \brief (TCC_CC_DITH5) Dithering Cycle Number */
mbed_official 579:53297373a894 1464 #define TCC_CC_DITH5_DITHERCY_Msk (0x1Ful << TCC_CC_DITH5_DITHERCY_Pos)
mbed_official 579:53297373a894 1465 #define TCC_CC_DITH5_DITHERCY(value) ((TCC_CC_DITH5_DITHERCY_Msk & ((value) << TCC_CC_DITH5_DITHERCY_Pos)))
mbed_official 579:53297373a894 1466 #define TCC_CC_DITH5_CC_Pos 5 /**< \brief (TCC_CC_DITH5) Channel Compare/Capture Value */
mbed_official 579:53297373a894 1467 #define TCC_CC_DITH5_CC_Msk (0x7FFFFul << TCC_CC_DITH5_CC_Pos)
mbed_official 579:53297373a894 1468 #define TCC_CC_DITH5_CC(value) ((TCC_CC_DITH5_CC_Msk & ((value) << TCC_CC_DITH5_CC_Pos)))
mbed_official 579:53297373a894 1469 #define TCC_CC_DITH5_MASK 0x00FFFFFFul /**< \brief (TCC_CC_DITH5) MASK Register */
mbed_official 579:53297373a894 1470
mbed_official 579:53297373a894 1471 // DITH6 mode
mbed_official 579:53297373a894 1472 #define TCC_CC_DITH6_DITHERCY_Pos 0 /**< \brief (TCC_CC_DITH6) Dithering Cycle Number */
mbed_official 579:53297373a894 1473 #define TCC_CC_DITH6_DITHERCY_Msk (0x3Ful << TCC_CC_DITH6_DITHERCY_Pos)
mbed_official 579:53297373a894 1474 #define TCC_CC_DITH6_DITHERCY(value) ((TCC_CC_DITH6_DITHERCY_Msk & ((value) << TCC_CC_DITH6_DITHERCY_Pos)))
mbed_official 579:53297373a894 1475 #define TCC_CC_DITH6_CC_Pos 6 /**< \brief (TCC_CC_DITH6) Channel Compare/Capture Value */
mbed_official 579:53297373a894 1476 #define TCC_CC_DITH6_CC_Msk (0x3FFFFul << TCC_CC_DITH6_CC_Pos)
mbed_official 579:53297373a894 1477 #define TCC_CC_DITH6_CC(value) ((TCC_CC_DITH6_CC_Msk & ((value) << TCC_CC_DITH6_CC_Pos)))
mbed_official 579:53297373a894 1478 #define TCC_CC_DITH6_MASK 0x00FFFFFFul /**< \brief (TCC_CC_DITH6) MASK Register */
mbed_official 579:53297373a894 1479
mbed_official 579:53297373a894 1480 #define TCC_CC_CC_Pos 0 /**< \brief (TCC_CC) Channel Compare/Capture Value */
mbed_official 579:53297373a894 1481 #define TCC_CC_CC_Msk (0xFFFFFFul << TCC_CC_CC_Pos)
mbed_official 579:53297373a894 1482 #define TCC_CC_CC(value) ((TCC_CC_CC_Msk & ((value) << TCC_CC_CC_Pos)))
mbed_official 579:53297373a894 1483 #define TCC_CC_MASK 0x00FFFFFFul /**< \brief (TCC_CC) MASK Register */
mbed_official 579:53297373a894 1484
mbed_official 579:53297373a894 1485 /* -------- TCC_PATTB : (TCC Offset: 0x64) (R/W 16) Pattern Buffer -------- */
mbed_official 579:53297373a894 1486 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 1487 typedef union {
mbed_official 579:53297373a894 1488 struct {
mbed_official 579:53297373a894 1489 uint16_t PGEB0:1; /*!< bit: 0 Pattern Generator 0 Output Enable Buffer */
mbed_official 579:53297373a894 1490 uint16_t PGEB1:1; /*!< bit: 1 Pattern Generator 1 Output Enable Buffer */
mbed_official 579:53297373a894 1491 uint16_t PGEB2:1; /*!< bit: 2 Pattern Generator 2 Output Enable Buffer */
mbed_official 579:53297373a894 1492 uint16_t PGEB3:1; /*!< bit: 3 Pattern Generator 3 Output Enable Buffer */
mbed_official 579:53297373a894 1493 uint16_t PGEB4:1; /*!< bit: 4 Pattern Generator 4 Output Enable Buffer */
mbed_official 579:53297373a894 1494 uint16_t PGEB5:1; /*!< bit: 5 Pattern Generator 5 Output Enable Buffer */
mbed_official 579:53297373a894 1495 uint16_t PGEB6:1; /*!< bit: 6 Pattern Generator 6 Output Enable Buffer */
mbed_official 579:53297373a894 1496 uint16_t PGEB7:1; /*!< bit: 7 Pattern Generator 7 Output Enable Buffer */
mbed_official 579:53297373a894 1497 uint16_t PGVB0:1; /*!< bit: 8 Pattern Generator 0 Output Enable */
mbed_official 579:53297373a894 1498 uint16_t PGVB1:1; /*!< bit: 9 Pattern Generator 1 Output Enable */
mbed_official 579:53297373a894 1499 uint16_t PGVB2:1; /*!< bit: 10 Pattern Generator 2 Output Enable */
mbed_official 579:53297373a894 1500 uint16_t PGVB3:1; /*!< bit: 11 Pattern Generator 3 Output Enable */
mbed_official 579:53297373a894 1501 uint16_t PGVB4:1; /*!< bit: 12 Pattern Generator 4 Output Enable */
mbed_official 579:53297373a894 1502 uint16_t PGVB5:1; /*!< bit: 13 Pattern Generator 5 Output Enable */
mbed_official 579:53297373a894 1503 uint16_t PGVB6:1; /*!< bit: 14 Pattern Generator 6 Output Enable */
mbed_official 579:53297373a894 1504 uint16_t PGVB7:1; /*!< bit: 15 Pattern Generator 7 Output Enable */
mbed_official 579:53297373a894 1505 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 1506 struct {
mbed_official 579:53297373a894 1507 uint16_t PGEB:8; /*!< bit: 0.. 7 Pattern Generator x Output Enable Buffer */
mbed_official 579:53297373a894 1508 uint16_t PGVB:8; /*!< bit: 8..15 Pattern Generator x Output Enable */
mbed_official 579:53297373a894 1509 } vec; /*!< Structure used for vec access */
mbed_official 579:53297373a894 1510 uint16_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 1511 } TCC_PATTB_Type;
mbed_official 579:53297373a894 1512 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 1513
mbed_official 579:53297373a894 1514 #define TCC_PATTB_OFFSET 0x64 /**< \brief (TCC_PATTB offset) Pattern Buffer */
mbed_official 579:53297373a894 1515 #define TCC_PATTB_RESETVALUE 0x0000ul /**< \brief (TCC_PATTB reset_value) Pattern Buffer */
mbed_official 579:53297373a894 1516
mbed_official 579:53297373a894 1517 #define TCC_PATTB_PGEB0_Pos 0 /**< \brief (TCC_PATTB) Pattern Generator 0 Output Enable Buffer */
mbed_official 579:53297373a894 1518 #define TCC_PATTB_PGEB0 (1 << TCC_PATTB_PGEB0_Pos)
mbed_official 579:53297373a894 1519 #define TCC_PATTB_PGEB1_Pos 1 /**< \brief (TCC_PATTB) Pattern Generator 1 Output Enable Buffer */
mbed_official 579:53297373a894 1520 #define TCC_PATTB_PGEB1 (1 << TCC_PATTB_PGEB1_Pos)
mbed_official 579:53297373a894 1521 #define TCC_PATTB_PGEB2_Pos 2 /**< \brief (TCC_PATTB) Pattern Generator 2 Output Enable Buffer */
mbed_official 579:53297373a894 1522 #define TCC_PATTB_PGEB2 (1 << TCC_PATTB_PGEB2_Pos)
mbed_official 579:53297373a894 1523 #define TCC_PATTB_PGEB3_Pos 3 /**< \brief (TCC_PATTB) Pattern Generator 3 Output Enable Buffer */
mbed_official 579:53297373a894 1524 #define TCC_PATTB_PGEB3 (1 << TCC_PATTB_PGEB3_Pos)
mbed_official 579:53297373a894 1525 #define TCC_PATTB_PGEB4_Pos 4 /**< \brief (TCC_PATTB) Pattern Generator 4 Output Enable Buffer */
mbed_official 579:53297373a894 1526 #define TCC_PATTB_PGEB4 (1 << TCC_PATTB_PGEB4_Pos)
mbed_official 579:53297373a894 1527 #define TCC_PATTB_PGEB5_Pos 5 /**< \brief (TCC_PATTB) Pattern Generator 5 Output Enable Buffer */
mbed_official 579:53297373a894 1528 #define TCC_PATTB_PGEB5 (1 << TCC_PATTB_PGEB5_Pos)
mbed_official 579:53297373a894 1529 #define TCC_PATTB_PGEB6_Pos 6 /**< \brief (TCC_PATTB) Pattern Generator 6 Output Enable Buffer */
mbed_official 579:53297373a894 1530 #define TCC_PATTB_PGEB6 (1 << TCC_PATTB_PGEB6_Pos)
mbed_official 579:53297373a894 1531 #define TCC_PATTB_PGEB7_Pos 7 /**< \brief (TCC_PATTB) Pattern Generator 7 Output Enable Buffer */
mbed_official 579:53297373a894 1532 #define TCC_PATTB_PGEB7 (1 << TCC_PATTB_PGEB7_Pos)
mbed_official 579:53297373a894 1533 #define TCC_PATTB_PGEB_Pos 0 /**< \brief (TCC_PATTB) Pattern Generator x Output Enable Buffer */
mbed_official 579:53297373a894 1534 #define TCC_PATTB_PGEB_Msk (0xFFul << TCC_PATTB_PGEB_Pos)
mbed_official 579:53297373a894 1535 #define TCC_PATTB_PGEB(value) ((TCC_PATTB_PGEB_Msk & ((value) << TCC_PATTB_PGEB_Pos)))
mbed_official 579:53297373a894 1536 #define TCC_PATTB_PGVB0_Pos 8 /**< \brief (TCC_PATTB) Pattern Generator 0 Output Enable */
mbed_official 579:53297373a894 1537 #define TCC_PATTB_PGVB0 (1 << TCC_PATTB_PGVB0_Pos)
mbed_official 579:53297373a894 1538 #define TCC_PATTB_PGVB1_Pos 9 /**< \brief (TCC_PATTB) Pattern Generator 1 Output Enable */
mbed_official 579:53297373a894 1539 #define TCC_PATTB_PGVB1 (1 << TCC_PATTB_PGVB1_Pos)
mbed_official 579:53297373a894 1540 #define TCC_PATTB_PGVB2_Pos 10 /**< \brief (TCC_PATTB) Pattern Generator 2 Output Enable */
mbed_official 579:53297373a894 1541 #define TCC_PATTB_PGVB2 (1 << TCC_PATTB_PGVB2_Pos)
mbed_official 579:53297373a894 1542 #define TCC_PATTB_PGVB3_Pos 11 /**< \brief (TCC_PATTB) Pattern Generator 3 Output Enable */
mbed_official 579:53297373a894 1543 #define TCC_PATTB_PGVB3 (1 << TCC_PATTB_PGVB3_Pos)
mbed_official 579:53297373a894 1544 #define TCC_PATTB_PGVB4_Pos 12 /**< \brief (TCC_PATTB) Pattern Generator 4 Output Enable */
mbed_official 579:53297373a894 1545 #define TCC_PATTB_PGVB4 (1 << TCC_PATTB_PGVB4_Pos)
mbed_official 579:53297373a894 1546 #define TCC_PATTB_PGVB5_Pos 13 /**< \brief (TCC_PATTB) Pattern Generator 5 Output Enable */
mbed_official 579:53297373a894 1547 #define TCC_PATTB_PGVB5 (1 << TCC_PATTB_PGVB5_Pos)
mbed_official 579:53297373a894 1548 #define TCC_PATTB_PGVB6_Pos 14 /**< \brief (TCC_PATTB) Pattern Generator 6 Output Enable */
mbed_official 579:53297373a894 1549 #define TCC_PATTB_PGVB6 (1 << TCC_PATTB_PGVB6_Pos)
mbed_official 579:53297373a894 1550 #define TCC_PATTB_PGVB7_Pos 15 /**< \brief (TCC_PATTB) Pattern Generator 7 Output Enable */
mbed_official 579:53297373a894 1551 #define TCC_PATTB_PGVB7 (1 << TCC_PATTB_PGVB7_Pos)
mbed_official 579:53297373a894 1552 #define TCC_PATTB_PGVB_Pos 8 /**< \brief (TCC_PATTB) Pattern Generator x Output Enable */
mbed_official 579:53297373a894 1553 #define TCC_PATTB_PGVB_Msk (0xFFul << TCC_PATTB_PGVB_Pos)
mbed_official 579:53297373a894 1554 #define TCC_PATTB_PGVB(value) ((TCC_PATTB_PGVB_Msk & ((value) << TCC_PATTB_PGVB_Pos)))
mbed_official 579:53297373a894 1555 #define TCC_PATTB_MASK 0xFFFFul /**< \brief (TCC_PATTB) MASK Register */
mbed_official 579:53297373a894 1556
mbed_official 579:53297373a894 1557 /* -------- TCC_WAVEB : (TCC Offset: 0x68) (R/W 32) Waveform Control Buffer -------- */
mbed_official 579:53297373a894 1558 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 1559 typedef union {
mbed_official 579:53297373a894 1560 struct {
mbed_official 579:53297373a894 1561 uint32_t WAVEGENB:3; /*!< bit: 0.. 2 Waveform Generation Buffer */
mbed_official 579:53297373a894 1562 uint32_t :1; /*!< bit: 3 Reserved */
mbed_official 579:53297373a894 1563 uint32_t RAMPB:2; /*!< bit: 4.. 5 Ramp Mode Buffer */
mbed_official 579:53297373a894 1564 uint32_t :1; /*!< bit: 6 Reserved */
mbed_official 579:53297373a894 1565 uint32_t CIPERENB:1; /*!< bit: 7 Circular Period Enable Buffer */
mbed_official 579:53297373a894 1566 uint32_t CICCENB0:1; /*!< bit: 8 Circular Channel 0 Enable Buffer */
mbed_official 579:53297373a894 1567 uint32_t CICCENB1:1; /*!< bit: 9 Circular Channel 1 Enable Buffer */
mbed_official 579:53297373a894 1568 uint32_t CICCENB2:1; /*!< bit: 10 Circular Channel 2 Enable Buffer */
mbed_official 579:53297373a894 1569 uint32_t CICCENB3:1; /*!< bit: 11 Circular Channel 3 Enable Buffer */
mbed_official 579:53297373a894 1570 uint32_t :4; /*!< bit: 12..15 Reserved */
mbed_official 579:53297373a894 1571 uint32_t POLB0:1; /*!< bit: 16 Channel 0 Polarity Buffer */
mbed_official 579:53297373a894 1572 uint32_t POLB1:1; /*!< bit: 17 Channel 1 Polarity Buffer */
mbed_official 579:53297373a894 1573 uint32_t POLB2:1; /*!< bit: 18 Channel 2 Polarity Buffer */
mbed_official 579:53297373a894 1574 uint32_t POLB3:1; /*!< bit: 19 Channel 3 Polarity Buffer */
mbed_official 579:53297373a894 1575 uint32_t :4; /*!< bit: 20..23 Reserved */
mbed_official 579:53297373a894 1576 uint32_t SWAPB0:1; /*!< bit: 24 Swap DTI Output Pair 0 Buffer */
mbed_official 579:53297373a894 1577 uint32_t SWAPB1:1; /*!< bit: 25 Swap DTI Output Pair 1 Buffer */
mbed_official 579:53297373a894 1578 uint32_t SWAPB2:1; /*!< bit: 26 Swap DTI Output Pair 2 Buffer */
mbed_official 579:53297373a894 1579 uint32_t SWAPB3:1; /*!< bit: 27 Swap DTI Output Pair 3 Buffer */
mbed_official 579:53297373a894 1580 uint32_t :4; /*!< bit: 28..31 Reserved */
mbed_official 579:53297373a894 1581 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 1582 struct {
mbed_official 579:53297373a894 1583 uint32_t :8; /*!< bit: 0.. 7 Reserved */
mbed_official 579:53297373a894 1584 uint32_t CICCENB:4; /*!< bit: 8..11 Circular Channel x Enable Buffer */
mbed_official 579:53297373a894 1585 uint32_t :4; /*!< bit: 12..15 Reserved */
mbed_official 579:53297373a894 1586 uint32_t POLB:4; /*!< bit: 16..19 Channel x Polarity Buffer */
mbed_official 579:53297373a894 1587 uint32_t :4; /*!< bit: 20..23 Reserved */
mbed_official 579:53297373a894 1588 uint32_t SWAPB:4; /*!< bit: 24..27 Swap DTI Output Pair x Buffer */
mbed_official 579:53297373a894 1589 uint32_t :4; /*!< bit: 28..31 Reserved */
mbed_official 579:53297373a894 1590 } vec; /*!< Structure used for vec access */
mbed_official 579:53297373a894 1591 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 1592 } TCC_WAVEB_Type;
mbed_official 579:53297373a894 1593 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 1594
mbed_official 579:53297373a894 1595 #define TCC_WAVEB_OFFSET 0x68 /**< \brief (TCC_WAVEB offset) Waveform Control Buffer */
mbed_official 579:53297373a894 1596 #define TCC_WAVEB_RESETVALUE 0x00000000ul /**< \brief (TCC_WAVEB reset_value) Waveform Control Buffer */
mbed_official 579:53297373a894 1597
mbed_official 579:53297373a894 1598 #define TCC_WAVEB_WAVEGENB_Pos 0 /**< \brief (TCC_WAVEB) Waveform Generation Buffer */
mbed_official 579:53297373a894 1599 #define TCC_WAVEB_WAVEGENB_Msk (0x7ul << TCC_WAVEB_WAVEGENB_Pos)
mbed_official 579:53297373a894 1600 #define TCC_WAVEB_WAVEGENB(value) ((TCC_WAVEB_WAVEGENB_Msk & ((value) << TCC_WAVEB_WAVEGENB_Pos)))
mbed_official 579:53297373a894 1601 #define TCC_WAVEB_WAVEGENB_NFRQ_Val 0x0ul /**< \brief (TCC_WAVEB) Normal frequency */
mbed_official 579:53297373a894 1602 #define TCC_WAVEB_WAVEGENB_MFRQ_Val 0x1ul /**< \brief (TCC_WAVEB) Match frequency */
mbed_official 579:53297373a894 1603 #define TCC_WAVEB_WAVEGENB_NPWM_Val 0x2ul /**< \brief (TCC_WAVEB) Normal PWM */
mbed_official 579:53297373a894 1604 #define TCC_WAVEB_WAVEGENB_DSCRITICAL_Val 0x4ul /**< \brief (TCC_WAVEB) Dual-slope critical */
mbed_official 579:53297373a894 1605 #define TCC_WAVEB_WAVEGENB_DSBOTTOM_Val 0x5ul /**< \brief (TCC_WAVEB) Dual-slope with interrupt/event condition when COUNT reaches ZERO */
mbed_official 579:53297373a894 1606 #define TCC_WAVEB_WAVEGENB_DSBOTH_Val 0x6ul /**< \brief (TCC_WAVEB) Dual-slope with interrupt/event condition when COUNT reaches ZERO or TOP */
mbed_official 579:53297373a894 1607 #define TCC_WAVEB_WAVEGENB_DSTOP_Val 0x7ul /**< \brief (TCC_WAVEB) Dual-slope with interrupt/event condition when COUNT reaches TOP */
mbed_official 579:53297373a894 1608 #define TCC_WAVEB_WAVEGENB_NFRQ (TCC_WAVEB_WAVEGENB_NFRQ_Val << TCC_WAVEB_WAVEGENB_Pos)
mbed_official 579:53297373a894 1609 #define TCC_WAVEB_WAVEGENB_MFRQ (TCC_WAVEB_WAVEGENB_MFRQ_Val << TCC_WAVEB_WAVEGENB_Pos)
mbed_official 579:53297373a894 1610 #define TCC_WAVEB_WAVEGENB_NPWM (TCC_WAVEB_WAVEGENB_NPWM_Val << TCC_WAVEB_WAVEGENB_Pos)
mbed_official 579:53297373a894 1611 #define TCC_WAVEB_WAVEGENB_DSCRITICAL (TCC_WAVEB_WAVEGENB_DSCRITICAL_Val << TCC_WAVEB_WAVEGENB_Pos)
mbed_official 579:53297373a894 1612 #define TCC_WAVEB_WAVEGENB_DSBOTTOM (TCC_WAVEB_WAVEGENB_DSBOTTOM_Val << TCC_WAVEB_WAVEGENB_Pos)
mbed_official 579:53297373a894 1613 #define TCC_WAVEB_WAVEGENB_DSBOTH (TCC_WAVEB_WAVEGENB_DSBOTH_Val << TCC_WAVEB_WAVEGENB_Pos)
mbed_official 579:53297373a894 1614 #define TCC_WAVEB_WAVEGENB_DSTOP (TCC_WAVEB_WAVEGENB_DSTOP_Val << TCC_WAVEB_WAVEGENB_Pos)
mbed_official 579:53297373a894 1615 #define TCC_WAVEB_RAMPB_Pos 4 /**< \brief (TCC_WAVEB) Ramp Mode Buffer */
mbed_official 579:53297373a894 1616 #define TCC_WAVEB_RAMPB_Msk (0x3ul << TCC_WAVEB_RAMPB_Pos)
mbed_official 579:53297373a894 1617 #define TCC_WAVEB_RAMPB(value) ((TCC_WAVEB_RAMPB_Msk & ((value) << TCC_WAVEB_RAMPB_Pos)))
mbed_official 579:53297373a894 1618 #define TCC_WAVEB_RAMPB_RAMP1_Val 0x0ul /**< \brief (TCC_WAVEB) RAMP1 operation */
mbed_official 579:53297373a894 1619 #define TCC_WAVEB_RAMPB_RAMP2A_Val 0x1ul /**< \brief (TCC_WAVEB) Alternative RAMP2 operation */
mbed_official 579:53297373a894 1620 #define TCC_WAVEB_RAMPB_RAMP2_Val 0x2ul /**< \brief (TCC_WAVEB) RAMP2 operation */
mbed_official 579:53297373a894 1621 #define TCC_WAVEB_RAMPB_RAMP1 (TCC_WAVEB_RAMPB_RAMP1_Val << TCC_WAVEB_RAMPB_Pos)
mbed_official 579:53297373a894 1622 #define TCC_WAVEB_RAMPB_RAMP2A (TCC_WAVEB_RAMPB_RAMP2A_Val << TCC_WAVEB_RAMPB_Pos)
mbed_official 579:53297373a894 1623 #define TCC_WAVEB_RAMPB_RAMP2 (TCC_WAVEB_RAMPB_RAMP2_Val << TCC_WAVEB_RAMPB_Pos)
mbed_official 579:53297373a894 1624 #define TCC_WAVEB_CIPERENB_Pos 7 /**< \brief (TCC_WAVEB) Circular Period Enable Buffer */
mbed_official 579:53297373a894 1625 #define TCC_WAVEB_CIPERENB (0x1ul << TCC_WAVEB_CIPERENB_Pos)
mbed_official 579:53297373a894 1626 #define TCC_WAVEB_CICCENB0_Pos 8 /**< \brief (TCC_WAVEB) Circular Channel 0 Enable Buffer */
mbed_official 579:53297373a894 1627 #define TCC_WAVEB_CICCENB0 (1 << TCC_WAVEB_CICCENB0_Pos)
mbed_official 579:53297373a894 1628 #define TCC_WAVEB_CICCENB1_Pos 9 /**< \brief (TCC_WAVEB) Circular Channel 1 Enable Buffer */
mbed_official 579:53297373a894 1629 #define TCC_WAVEB_CICCENB1 (1 << TCC_WAVEB_CICCENB1_Pos)
mbed_official 579:53297373a894 1630 #define TCC_WAVEB_CICCENB2_Pos 10 /**< \brief (TCC_WAVEB) Circular Channel 2 Enable Buffer */
mbed_official 579:53297373a894 1631 #define TCC_WAVEB_CICCENB2 (1 << TCC_WAVEB_CICCENB2_Pos)
mbed_official 579:53297373a894 1632 #define TCC_WAVEB_CICCENB3_Pos 11 /**< \brief (TCC_WAVEB) Circular Channel 3 Enable Buffer */
mbed_official 579:53297373a894 1633 #define TCC_WAVEB_CICCENB3 (1 << TCC_WAVEB_CICCENB3_Pos)
mbed_official 579:53297373a894 1634 #define TCC_WAVEB_CICCENB_Pos 8 /**< \brief (TCC_WAVEB) Circular Channel x Enable Buffer */
mbed_official 579:53297373a894 1635 #define TCC_WAVEB_CICCENB_Msk (0xFul << TCC_WAVEB_CICCENB_Pos)
mbed_official 579:53297373a894 1636 #define TCC_WAVEB_CICCENB(value) ((TCC_WAVEB_CICCENB_Msk & ((value) << TCC_WAVEB_CICCENB_Pos)))
mbed_official 579:53297373a894 1637 #define TCC_WAVEB_POLB0_Pos 16 /**< \brief (TCC_WAVEB) Channel 0 Polarity Buffer */
mbed_official 579:53297373a894 1638 #define TCC_WAVEB_POLB0 (1 << TCC_WAVEB_POLB0_Pos)
mbed_official 579:53297373a894 1639 #define TCC_WAVEB_POLB1_Pos 17 /**< \brief (TCC_WAVEB) Channel 1 Polarity Buffer */
mbed_official 579:53297373a894 1640 #define TCC_WAVEB_POLB1 (1 << TCC_WAVEB_POLB1_Pos)
mbed_official 579:53297373a894 1641 #define TCC_WAVEB_POLB2_Pos 18 /**< \brief (TCC_WAVEB) Channel 2 Polarity Buffer */
mbed_official 579:53297373a894 1642 #define TCC_WAVEB_POLB2 (1 << TCC_WAVEB_POLB2_Pos)
mbed_official 579:53297373a894 1643 #define TCC_WAVEB_POLB3_Pos 19 /**< \brief (TCC_WAVEB) Channel 3 Polarity Buffer */
mbed_official 579:53297373a894 1644 #define TCC_WAVEB_POLB3 (1 << TCC_WAVEB_POLB3_Pos)
mbed_official 579:53297373a894 1645 #define TCC_WAVEB_POLB_Pos 16 /**< \brief (TCC_WAVEB) Channel x Polarity Buffer */
mbed_official 579:53297373a894 1646 #define TCC_WAVEB_POLB_Msk (0xFul << TCC_WAVEB_POLB_Pos)
mbed_official 579:53297373a894 1647 #define TCC_WAVEB_POLB(value) ((TCC_WAVEB_POLB_Msk & ((value) << TCC_WAVEB_POLB_Pos)))
mbed_official 579:53297373a894 1648 #define TCC_WAVEB_SWAPB0_Pos 24 /**< \brief (TCC_WAVEB) Swap DTI Output Pair 0 Buffer */
mbed_official 579:53297373a894 1649 #define TCC_WAVEB_SWAPB0 (1 << TCC_WAVEB_SWAPB0_Pos)
mbed_official 579:53297373a894 1650 #define TCC_WAVEB_SWAPB1_Pos 25 /**< \brief (TCC_WAVEB) Swap DTI Output Pair 1 Buffer */
mbed_official 579:53297373a894 1651 #define TCC_WAVEB_SWAPB1 (1 << TCC_WAVEB_SWAPB1_Pos)
mbed_official 579:53297373a894 1652 #define TCC_WAVEB_SWAPB2_Pos 26 /**< \brief (TCC_WAVEB) Swap DTI Output Pair 2 Buffer */
mbed_official 579:53297373a894 1653 #define TCC_WAVEB_SWAPB2 (1 << TCC_WAVEB_SWAPB2_Pos)
mbed_official 579:53297373a894 1654 #define TCC_WAVEB_SWAPB3_Pos 27 /**< \brief (TCC_WAVEB) Swap DTI Output Pair 3 Buffer */
mbed_official 579:53297373a894 1655 #define TCC_WAVEB_SWAPB3 (1 << TCC_WAVEB_SWAPB3_Pos)
mbed_official 579:53297373a894 1656 #define TCC_WAVEB_SWAPB_Pos 24 /**< \brief (TCC_WAVEB) Swap DTI Output Pair x Buffer */
mbed_official 579:53297373a894 1657 #define TCC_WAVEB_SWAPB_Msk (0xFul << TCC_WAVEB_SWAPB_Pos)
mbed_official 579:53297373a894 1658 #define TCC_WAVEB_SWAPB(value) ((TCC_WAVEB_SWAPB_Msk & ((value) << TCC_WAVEB_SWAPB_Pos)))
mbed_official 579:53297373a894 1659 #define TCC_WAVEB_MASK 0x0F0F0FB7ul /**< \brief (TCC_WAVEB) MASK Register */
mbed_official 579:53297373a894 1660
mbed_official 579:53297373a894 1661 /* -------- TCC_PERB : (TCC Offset: 0x6C) (R/W 32) Period Buffer -------- */
mbed_official 579:53297373a894 1662 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 1663 typedef union {
mbed_official 579:53297373a894 1664 struct { // DITH4 mode
mbed_official 579:53297373a894 1665 uint32_t DITHERCYB:4; /*!< bit: 0.. 3 Dithering Buffer Cycle Number */
mbed_official 579:53297373a894 1666 uint32_t PERB:20; /*!< bit: 4..23 Period Buffer Value */
mbed_official 579:53297373a894 1667 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1668 } DITH4; /*!< Structure used for DITH4 */
mbed_official 579:53297373a894 1669 struct { // DITH5 mode
mbed_official 579:53297373a894 1670 uint32_t DITHERCYB:5; /*!< bit: 0.. 4 Dithering Buffer Cycle Number */
mbed_official 579:53297373a894 1671 uint32_t PERB:19; /*!< bit: 5..23 Period Buffer Value */
mbed_official 579:53297373a894 1672 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1673 } DITH5; /*!< Structure used for DITH5 */
mbed_official 579:53297373a894 1674 struct { // DITH6 mode
mbed_official 579:53297373a894 1675 uint32_t DITHERCYB:6; /*!< bit: 0.. 5 Dithering Buffer Cycle Number */
mbed_official 579:53297373a894 1676 uint32_t PERB:18; /*!< bit: 6..23 Period Buffer Value */
mbed_official 579:53297373a894 1677 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1678 } DITH6; /*!< Structure used for DITH6 */
mbed_official 579:53297373a894 1679 struct {
mbed_official 579:53297373a894 1680 uint32_t PERB:24; /*!< bit: 0..23 Period Buffer Value */
mbed_official 579:53297373a894 1681 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1682 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 1683 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 1684 } TCC_PERB_Type;
mbed_official 579:53297373a894 1685 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 1686
mbed_official 579:53297373a894 1687 #define TCC_PERB_OFFSET 0x6C /**< \brief (TCC_PERB offset) Period Buffer */
mbed_official 579:53297373a894 1688 #define TCC_PERB_RESETVALUE 0xFFFFFFFFul /**< \brief (TCC_PERB reset_value) Period Buffer */
mbed_official 579:53297373a894 1689
mbed_official 579:53297373a894 1690 // DITH4 mode
mbed_official 579:53297373a894 1691 #define TCC_PERB_DITH4_DITHERCYB_Pos 0 /**< \brief (TCC_PERB_DITH4) Dithering Buffer Cycle Number */
mbed_official 579:53297373a894 1692 #define TCC_PERB_DITH4_DITHERCYB_Msk (0xFul << TCC_PERB_DITH4_DITHERCYB_Pos)
mbed_official 579:53297373a894 1693 #define TCC_PERB_DITH4_DITHERCYB(value) ((TCC_PERB_DITH4_DITHERCYB_Msk & ((value) << TCC_PERB_DITH4_DITHERCYB_Pos)))
mbed_official 579:53297373a894 1694 #define TCC_PERB_DITH4_PERB_Pos 4 /**< \brief (TCC_PERB_DITH4) Period Buffer Value */
mbed_official 579:53297373a894 1695 #define TCC_PERB_DITH4_PERB_Msk (0xFFFFFul << TCC_PERB_DITH4_PERB_Pos)
mbed_official 579:53297373a894 1696 #define TCC_PERB_DITH4_PERB(value) ((TCC_PERB_DITH4_PERB_Msk & ((value) << TCC_PERB_DITH4_PERB_Pos)))
mbed_official 579:53297373a894 1697 #define TCC_PERB_DITH4_MASK 0x00FFFFFFul /**< \brief (TCC_PERB_DITH4) MASK Register */
mbed_official 579:53297373a894 1698
mbed_official 579:53297373a894 1699 // DITH5 mode
mbed_official 579:53297373a894 1700 #define TCC_PERB_DITH5_DITHERCYB_Pos 0 /**< \brief (TCC_PERB_DITH5) Dithering Buffer Cycle Number */
mbed_official 579:53297373a894 1701 #define TCC_PERB_DITH5_DITHERCYB_Msk (0x1Ful << TCC_PERB_DITH5_DITHERCYB_Pos)
mbed_official 579:53297373a894 1702 #define TCC_PERB_DITH5_DITHERCYB(value) ((TCC_PERB_DITH5_DITHERCYB_Msk & ((value) << TCC_PERB_DITH5_DITHERCYB_Pos)))
mbed_official 579:53297373a894 1703 #define TCC_PERB_DITH5_PERB_Pos 5 /**< \brief (TCC_PERB_DITH5) Period Buffer Value */
mbed_official 579:53297373a894 1704 #define TCC_PERB_DITH5_PERB_Msk (0x7FFFFul << TCC_PERB_DITH5_PERB_Pos)
mbed_official 579:53297373a894 1705 #define TCC_PERB_DITH5_PERB(value) ((TCC_PERB_DITH5_PERB_Msk & ((value) << TCC_PERB_DITH5_PERB_Pos)))
mbed_official 579:53297373a894 1706 #define TCC_PERB_DITH5_MASK 0x00FFFFFFul /**< \brief (TCC_PERB_DITH5) MASK Register */
mbed_official 579:53297373a894 1707
mbed_official 579:53297373a894 1708 // DITH6 mode
mbed_official 579:53297373a894 1709 #define TCC_PERB_DITH6_DITHERCYB_Pos 0 /**< \brief (TCC_PERB_DITH6) Dithering Buffer Cycle Number */
mbed_official 579:53297373a894 1710 #define TCC_PERB_DITH6_DITHERCYB_Msk (0x3Ful << TCC_PERB_DITH6_DITHERCYB_Pos)
mbed_official 579:53297373a894 1711 #define TCC_PERB_DITH6_DITHERCYB(value) ((TCC_PERB_DITH6_DITHERCYB_Msk & ((value) << TCC_PERB_DITH6_DITHERCYB_Pos)))
mbed_official 579:53297373a894 1712 #define TCC_PERB_DITH6_PERB_Pos 6 /**< \brief (TCC_PERB_DITH6) Period Buffer Value */
mbed_official 579:53297373a894 1713 #define TCC_PERB_DITH6_PERB_Msk (0x3FFFFul << TCC_PERB_DITH6_PERB_Pos)
mbed_official 579:53297373a894 1714 #define TCC_PERB_DITH6_PERB(value) ((TCC_PERB_DITH6_PERB_Msk & ((value) << TCC_PERB_DITH6_PERB_Pos)))
mbed_official 579:53297373a894 1715 #define TCC_PERB_DITH6_MASK 0x00FFFFFFul /**< \brief (TCC_PERB_DITH6) MASK Register */
mbed_official 579:53297373a894 1716
mbed_official 579:53297373a894 1717 #define TCC_PERB_PERB_Pos 0 /**< \brief (TCC_PERB) Period Buffer Value */
mbed_official 579:53297373a894 1718 #define TCC_PERB_PERB_Msk (0xFFFFFFul << TCC_PERB_PERB_Pos)
mbed_official 579:53297373a894 1719 #define TCC_PERB_PERB(value) ((TCC_PERB_PERB_Msk & ((value) << TCC_PERB_PERB_Pos)))
mbed_official 579:53297373a894 1720 #define TCC_PERB_MASK 0x00FFFFFFul /**< \brief (TCC_PERB) MASK Register */
mbed_official 579:53297373a894 1721
mbed_official 579:53297373a894 1722 /* -------- TCC_CCB : (TCC Offset: 0x70) (R/W 32) Compare and Capture Buffer -------- */
mbed_official 579:53297373a894 1723 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 1724 typedef union {
mbed_official 579:53297373a894 1725 struct { // DITH4 mode
mbed_official 579:53297373a894 1726 uint32_t DITHERCYB:4; /*!< bit: 0.. 3 Dithering Buffer Cycle Number */
mbed_official 579:53297373a894 1727 uint32_t CCB:20; /*!< bit: 4..23 Channel Compare/Capture Buffer Value */
mbed_official 579:53297373a894 1728 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1729 } DITH4; /*!< Structure used for DITH4 */
mbed_official 579:53297373a894 1730 struct { // DITH5 mode
mbed_official 579:53297373a894 1731 uint32_t DITHERCYB:5; /*!< bit: 0.. 4 Dithering Buffer Cycle Number */
mbed_official 579:53297373a894 1732 uint32_t CCB:19; /*!< bit: 5..23 Channel Compare/Capture Buffer Value */
mbed_official 579:53297373a894 1733 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1734 } DITH5; /*!< Structure used for DITH5 */
mbed_official 579:53297373a894 1735 struct { // DITH6 mode
mbed_official 579:53297373a894 1736 uint32_t DITHERCYB:6; /*!< bit: 0.. 5 Dithering Buffer Cycle Number */
mbed_official 579:53297373a894 1737 uint32_t CCB:18; /*!< bit: 6..23 Channel Compare/Capture Buffer Value */
mbed_official 579:53297373a894 1738 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1739 } DITH6; /*!< Structure used for DITH6 */
mbed_official 579:53297373a894 1740 struct {
mbed_official 579:53297373a894 1741 uint32_t CCB:24; /*!< bit: 0..23 Channel Compare/Capture Buffer Value */
mbed_official 579:53297373a894 1742 uint32_t :8; /*!< bit: 24..31 Reserved */
mbed_official 579:53297373a894 1743 } bit; /*!< Structure used for bit access */
mbed_official 579:53297373a894 1744 uint32_t reg; /*!< Type used for register access */
mbed_official 579:53297373a894 1745 } TCC_CCB_Type;
mbed_official 579:53297373a894 1746 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 1747
mbed_official 579:53297373a894 1748 #define TCC_CCB_OFFSET 0x70 /**< \brief (TCC_CCB offset) Compare and Capture Buffer */
mbed_official 579:53297373a894 1749 #define TCC_CCB_RESETVALUE 0x00000000ul /**< \brief (TCC_CCB reset_value) Compare and Capture Buffer */
mbed_official 579:53297373a894 1750
mbed_official 579:53297373a894 1751 // DITH4 mode
mbed_official 579:53297373a894 1752 #define TCC_CCB_DITH4_DITHERCYB_Pos 0 /**< \brief (TCC_CCB_DITH4) Dithering Buffer Cycle Number */
mbed_official 579:53297373a894 1753 #define TCC_CCB_DITH4_DITHERCYB_Msk (0xFul << TCC_CCB_DITH4_DITHERCYB_Pos)
mbed_official 579:53297373a894 1754 #define TCC_CCB_DITH4_DITHERCYB(value) ((TCC_CCB_DITH4_DITHERCYB_Msk & ((value) << TCC_CCB_DITH4_DITHERCYB_Pos)))
mbed_official 579:53297373a894 1755 #define TCC_CCB_DITH4_CCB_Pos 4 /**< \brief (TCC_CCB_DITH4) Channel Compare/Capture Buffer Value */
mbed_official 579:53297373a894 1756 #define TCC_CCB_DITH4_CCB_Msk (0xFFFFFul << TCC_CCB_DITH4_CCB_Pos)
mbed_official 579:53297373a894 1757 #define TCC_CCB_DITH4_CCB(value) ((TCC_CCB_DITH4_CCB_Msk & ((value) << TCC_CCB_DITH4_CCB_Pos)))
mbed_official 579:53297373a894 1758 #define TCC_CCB_DITH4_MASK 0x00FFFFFFul /**< \brief (TCC_CCB_DITH4) MASK Register */
mbed_official 579:53297373a894 1759
mbed_official 579:53297373a894 1760 // DITH5 mode
mbed_official 579:53297373a894 1761 #define TCC_CCB_DITH5_DITHERCYB_Pos 0 /**< \brief (TCC_CCB_DITH5) Dithering Buffer Cycle Number */
mbed_official 579:53297373a894 1762 #define TCC_CCB_DITH5_DITHERCYB_Msk (0x1Ful << TCC_CCB_DITH5_DITHERCYB_Pos)
mbed_official 579:53297373a894 1763 #define TCC_CCB_DITH5_DITHERCYB(value) ((TCC_CCB_DITH5_DITHERCYB_Msk & ((value) << TCC_CCB_DITH5_DITHERCYB_Pos)))
mbed_official 579:53297373a894 1764 #define TCC_CCB_DITH5_CCB_Pos 5 /**< \brief (TCC_CCB_DITH5) Channel Compare/Capture Buffer Value */
mbed_official 579:53297373a894 1765 #define TCC_CCB_DITH5_CCB_Msk (0x7FFFFul << TCC_CCB_DITH5_CCB_Pos)
mbed_official 579:53297373a894 1766 #define TCC_CCB_DITH5_CCB(value) ((TCC_CCB_DITH5_CCB_Msk & ((value) << TCC_CCB_DITH5_CCB_Pos)))
mbed_official 579:53297373a894 1767 #define TCC_CCB_DITH5_MASK 0x00FFFFFFul /**< \brief (TCC_CCB_DITH5) MASK Register */
mbed_official 579:53297373a894 1768
mbed_official 579:53297373a894 1769 // DITH6 mode
mbed_official 579:53297373a894 1770 #define TCC_CCB_DITH6_DITHERCYB_Pos 0 /**< \brief (TCC_CCB_DITH6) Dithering Buffer Cycle Number */
mbed_official 579:53297373a894 1771 #define TCC_CCB_DITH6_DITHERCYB_Msk (0x3Ful << TCC_CCB_DITH6_DITHERCYB_Pos)
mbed_official 579:53297373a894 1772 #define TCC_CCB_DITH6_DITHERCYB(value) ((TCC_CCB_DITH6_DITHERCYB_Msk & ((value) << TCC_CCB_DITH6_DITHERCYB_Pos)))
mbed_official 579:53297373a894 1773 #define TCC_CCB_DITH6_CCB_Pos 6 /**< \brief (TCC_CCB_DITH6) Channel Compare/Capture Buffer Value */
mbed_official 579:53297373a894 1774 #define TCC_CCB_DITH6_CCB_Msk (0x3FFFFul << TCC_CCB_DITH6_CCB_Pos)
mbed_official 579:53297373a894 1775 #define TCC_CCB_DITH6_CCB(value) ((TCC_CCB_DITH6_CCB_Msk & ((value) << TCC_CCB_DITH6_CCB_Pos)))
mbed_official 579:53297373a894 1776 #define TCC_CCB_DITH6_MASK 0x00FFFFFFul /**< \brief (TCC_CCB_DITH6) MASK Register */
mbed_official 579:53297373a894 1777
mbed_official 579:53297373a894 1778 #define TCC_CCB_CCB_Pos 0 /**< \brief (TCC_CCB) Channel Compare/Capture Buffer Value */
mbed_official 579:53297373a894 1779 #define TCC_CCB_CCB_Msk (0xFFFFFFul << TCC_CCB_CCB_Pos)
mbed_official 579:53297373a894 1780 #define TCC_CCB_CCB(value) ((TCC_CCB_CCB_Msk & ((value) << TCC_CCB_CCB_Pos)))
mbed_official 579:53297373a894 1781 #define TCC_CCB_MASK 0x00FFFFFFul /**< \brief (TCC_CCB) MASK Register */
mbed_official 579:53297373a894 1782
mbed_official 579:53297373a894 1783 /** \brief TCC hardware registers */
mbed_official 579:53297373a894 1784 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 1785 typedef struct {
mbed_official 579:53297373a894 1786 __IO TCC_CTRLA_Type CTRLA; /**< \brief Offset: 0x00 (R/W 32) Control A */
mbed_official 579:53297373a894 1787 __IO TCC_CTRLBCLR_Type CTRLBCLR; /**< \brief Offset: 0x04 (R/W 8) Control B Clear */
mbed_official 579:53297373a894 1788 __IO TCC_CTRLBSET_Type CTRLBSET; /**< \brief Offset: 0x05 (R/W 8) Control B Set */
mbed_official 579:53297373a894 1789 RoReg8 Reserved1[0x2];
mbed_official 579:53297373a894 1790 __I TCC_SYNCBUSY_Type SYNCBUSY; /**< \brief Offset: 0x08 (R/ 32) Synchronization Busy */
mbed_official 579:53297373a894 1791 __IO TCC_FCTRLA_Type FCTRLA; /**< \brief Offset: 0x0C (R/W 32) Recoverable Fault A Configuration */
mbed_official 579:53297373a894 1792 __IO TCC_FCTRLB_Type FCTRLB; /**< \brief Offset: 0x10 (R/W 32) Recoverable Fault B Configuration */
mbed_official 579:53297373a894 1793 __IO TCC_WEXCTRL_Type WEXCTRL; /**< \brief Offset: 0x14 (R/W 32) Waveform Extension Configuration */
mbed_official 579:53297373a894 1794 __IO TCC_DRVCTRL_Type DRVCTRL; /**< \brief Offset: 0x18 (R/W 32) Driver Control */
mbed_official 579:53297373a894 1795 RoReg8 Reserved2[0x2];
mbed_official 579:53297373a894 1796 __IO TCC_DBGCTRL_Type DBGCTRL; /**< \brief Offset: 0x1E (R/W 8) Debug Control */
mbed_official 579:53297373a894 1797 RoReg8 Reserved3[0x1];
mbed_official 579:53297373a894 1798 __IO TCC_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x20 (R/W 32) Event Control */
mbed_official 579:53297373a894 1799 __IO TCC_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x24 (R/W 32) Interrupt Enable Clear */
mbed_official 579:53297373a894 1800 __IO TCC_INTENSET_Type INTENSET; /**< \brief Offset: 0x28 (R/W 32) Interrupt Enable Set */
mbed_official 579:53297373a894 1801 __IO TCC_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x2C (R/W 32) Interrupt Flag Status and Clear */
mbed_official 579:53297373a894 1802 __IO TCC_STATUS_Type STATUS; /**< \brief Offset: 0x30 (R/W 32) Status */
mbed_official 579:53297373a894 1803 __IO TCC_COUNT_Type COUNT; /**< \brief Offset: 0x34 (R/W 32) Count */
mbed_official 579:53297373a894 1804 __IO TCC_PATT_Type PATT; /**< \brief Offset: 0x38 (R/W 16) Pattern */
mbed_official 579:53297373a894 1805 RoReg8 Reserved4[0x2];
mbed_official 579:53297373a894 1806 __IO TCC_WAVE_Type WAVE; /**< \brief Offset: 0x3C (R/W 32) Waveform Control */
mbed_official 579:53297373a894 1807 __IO TCC_PER_Type PER; /**< \brief Offset: 0x40 (R/W 32) Period */
mbed_official 579:53297373a894 1808 __IO TCC_CC_Type CC[4]; /**< \brief Offset: 0x44 (R/W 32) Compare and Capture */
mbed_official 579:53297373a894 1809 RoReg8 Reserved5[0x10];
mbed_official 579:53297373a894 1810 __IO TCC_PATTB_Type PATTB; /**< \brief Offset: 0x64 (R/W 16) Pattern Buffer */
mbed_official 579:53297373a894 1811 RoReg8 Reserved6[0x2];
mbed_official 579:53297373a894 1812 __IO TCC_WAVEB_Type WAVEB; /**< \brief Offset: 0x68 (R/W 32) Waveform Control Buffer */
mbed_official 579:53297373a894 1813 __IO TCC_PERB_Type PERB; /**< \brief Offset: 0x6C (R/W 32) Period Buffer */
mbed_official 579:53297373a894 1814 __IO TCC_CCB_Type CCB[4]; /**< \brief Offset: 0x70 (R/W 32) Compare and Capture Buffer */
mbed_official 579:53297373a894 1815 } Tcc;
mbed_official 579:53297373a894 1816 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 1817
mbed_official 579:53297373a894 1818 /*@}*/
mbed_official 579:53297373a894 1819
mbed_official 579:53297373a894 1820 #endif /* _SAMD21_TCC_COMPONENT_ */