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