1 /**************************************************************************//** 2 * @file timer_reg.h 3 * @version V1.00 4 * @brief TIMER register definition header file 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 * @copyright (C) 2017-2020 Nuvoton Technology Corp. All rights reserved. 8 *****************************************************************************/ 9 #ifndef __TIMER_REG_H__ 10 #define __TIMER_REG_H__ 11 12 #if defined ( __CC_ARM ) 13 #pragma anon_unions 14 #endif 15 16 /** 17 @addtogroup REGISTER Control Register 18 @{ 19 */ 20 21 /*---------------------- Timer Controller -------------------------*/ 22 /** 23 @addtogroup TIMER Timer Controller (TIMER) 24 Memory Mapped Structure for CRC Controller 25 @{ 26 */ 27 28 typedef struct 29 { 30 31 32 /** 33 * @var TIMER_T::CTL 34 * Offset: 0x00 Timer Control Register 35 * --------------------------------------------------------------------------------------------------- 36 * |Bits |Field |Descriptions 37 * | :----: | :----: | :---- | 38 * |[7:0] |PSC |Prescale Counter 39 * | | |Timer input clock or event source is divided by (PSC+1) before it is fed to the timer up counter 40 * | | |If this field is 0 (PSC = 0), then there is no scaling. 41 * | | |Note: Update prescale counter value will reset internal 8-bit prescale counter and 24-bit up counter value. 42 * |[19] |INTRGEN |Inter-timer Trigger Mode Enable Control 43 * | | |Setting this bit will enable the inter-timer trigger capture function. 44 * | | |The Timer0/2 will be in event counter mode and counting with external clock source or event 45 * | | |Also, Timer1/3 will be in trigger-counting mode of capture function. 46 * | | |0 = Inter-Timer Trigger Capture mode Disabled. 47 * | | |1 = Inter-Timer Trigger Capture mode Enabled. 48 * | | |Note: For Timer1/3, this bit is ignored and the read back value is always 0. 49 * |[20] |PERIOSEL |Periodic Mode Behavior Selection Enable Bit 50 * | | |0 = The behavior selection in periodic mode is Disabled. 51 * | | |When user updates CMPDAT while timer is running in periodic mode, 52 * | | |CNT will be reset to default value. 53 * | | |1 = The behavior selection in periodic mode is Enabled. 54 * | | |When user update CMPDAT while timer is running in periodic mode, the limitations as bellows list, 55 * | | |If updated CMPDAT value > CNT, CMPDAT will be updated and CNT keep running continually. 56 * | | |If updated CMPDAT value = CNT, timer time-out interrupt will be asserted immediately. 57 * | | |If updated CMPDAT value < CNT, CNT will be reset to default value. 58 * |[21] |TGLPINSEL |Toggle-output Pin Select 59 * | | |0 = Toggle mode output to TMx (Timer Event Counter Pin). 60 * | | |1 = Toggle mode output to TMx_EXT (Timer External Capture Pin). 61 * |[22] |CAPSRC |Capture Pin Source Selection 62 * | | |0 = Capture Function source is from TMx_EXT (x= 0~3) pin. 63 * | | |1 = Capture Function source is from internal ACMP output signal 64 * | | |User can set ACMPSSEL (TIMERx_EXTCTL[8]) to decide which internal ACMP output signal as timer capture source. 65 * |[23] |WKEN |Wake-up Function Enable Bit 66 * | | |If this bit is set to 1, while timer interrupt flag TIF (TIMERx_INTSTS[0]) is 1 and INTEN (TIMERx_CTL[29]) is enabled, the timer interrupt signal will generate a wake-up trigger event to CPU. 67 * | | |0 = Wake-up function Disabled if timer interrupt signal generated. 68 * | | |1 = Wake-up function Enabled if timer interrupt signal generated. 69 * |[24] |EXTCNTEN |Event Counter Mode Enable Bit 70 * | | |This bit is for external counting pin function enabled. 71 * | | |0 = Event counter mode Disabled. 72 * | | |1 = Event counter mode Enabled. 73 * | | |Note: When timer is used as an event counter, this bit should be set to 1 and select PCLK as timer clock source. 74 * |[25] |ACTSTS |Timer Active Status Bit (Read Only) 75 * | | |This bit indicates the 24-bit up counter status. 76 * | | |0 = 24-bit up counter is not active. 77 * | | |1 = 24-bit up counter is active. 78 * | | |Note: This bit may active when CNT 0 transition to CNT 1. 79 * |[28:27] |OPMODE |Timer Counting Mode Select 80 * | | |00 = The Timer controller is operated in One-shot mode. 81 * | | |01 = The Timer controller is operated in Periodic mode. 82 * | | |10 = The Timer controller is operated in Toggle-output mode. 83 * | | |11 = The Timer controller is operated in Continuous Counting mode. 84 * |[29] |INTEN |Timer Interrupt Enable Bit 85 * | | |0 = Timer time-out interrupt Disabled. 86 * | | |1 = Timer time-out interrupt Enabled. 87 * | | |Note: If this bit is enabled, when the timer time-out interrupt flag TIF is set to 1, the timer interrupt signal is generated and inform to CPU. 88 * |[30] |CNTEN |Timer Counting Enable Bit 89 * | | |0 = Stops/Suspends counting. 90 * | | |1 = Starts counting. 91 * | | |Note1: In stop status, and then set CNTEN to 1 will enable the 24-bit up counter to keep counting from the last stop counting value. 92 * | | |Note2: This bit is auto-cleared by hardware in one-shot mode (TIMER_CTL[28:27] = 00) when the timer time-out interrupt flag TIF (TIMERx_INTSTS[0]) is generated. 93 * | | |Note3: Set enable/disable this bit needs 2 * TMR_CLK period to become active, user can read ACTSTS (TIMERx_CTL[25]) to check enable/disable command is completed or not. 94 * |[31] |ICEDEBUG |ICE Debug Mode Acknowledge Disable Control (Write Protect) 95 * | | |0 = ICE debug mode acknowledgement effects TIMER counting. 96 * | | |TIMER counter will be held while CPU is held by ICE. 97 * | | |1 = ICE debug mode acknowledgement Disabled. 98 * | | |TIMER counter will keep going no matter CPU is held by ICE or not. 99 * | | |Note: This bit is write protected. Refer to the SYS_REGLCTL register. 100 * @var TIMER_T::CMP 101 * Offset: 0x04 Timer Comparator Register 102 * --------------------------------------------------------------------------------------------------- 103 * |Bits |Field |Descriptions 104 * | :----: | :----: | :---- | 105 * |[23:0] |CMPDAT |Timer Comparator Value 106 * | | |CMPDAT is a 24-bit compared value register 107 * | | |When the internal 24-bit up counter value is equal to CMPDAT value, the TIF (TIMERx_INTSTS[0] Timer Interrupt Flag) will set to 1. 108 * | | |Time-out period = (Period of timer clock input) * (8-bit PSC + 1) * (24-bit CMPDAT). 109 * | | |Note1: Never write 0x0 or 0x1 in CMPDAT field, or the core will run into unknown state. 110 * | | |Note2: When timer is operating at continuous counting mode, the 24-bit up counter will keep counting continuously even if user writes a new value into CMPDAT field 111 * | | |But if timer is operating at other modes, the 24-bit up counter will restart counting from 0 and using newest CMPDAT value to be the timer compared value while user writes a new value into CMPDAT field. 112 * @var TIMER_T::INTSTS 113 * Offset: 0x08 Timer Interrupt Status Register 114 * --------------------------------------------------------------------------------------------------- 115 * |Bits |Field |Descriptions 116 * | :----: | :----: | :---- | 117 * |[0] |TIF |Timer Interrupt Flag 118 * | | |This bit indicates the interrupt flag status of Timer while 24-bit timer up counter CNT (TIMERx_CNT[23:0]) value reaches to CMPDAT (TIMERx_CMP[23:0]) value. 119 * | | |0 = No effect. 120 * | | |1 = CNT value matches the CMPDAT value. 121 * | | |Note: This bit is cleared by writing 1 to it. 122 * |[1] |TWKF |Timer Wake-up Flag 123 * | | |This bit indicates the interrupt wake-up flag status of timer. 124 * | | |0 = Timer does not cause CPU wake-up. 125 * | | |1 = CPU wake-up from Idle or Power-down mode if timer time-out interrupt signal generated. 126 * | | |Note: This bit is cleared by writing 1 to it. 127 * @var TIMER_T::CNT 128 * Offset: 0x0C Timer Data Register 129 * --------------------------------------------------------------------------------------------------- 130 * |Bits |Field |Descriptions 131 * | :----: | :----: | :---- | 132 * |[23:0] |CNT |Timer Data Register 133 * | | |Read operation. 134 * | | |Read this register to get CNT value. For example: 135 * | | |If EXTCNTEN (TIMERx_CTL[24] ) is 0, user can read CNT value for getting current 24-bit counter value. 136 * | | |If EXTCNTEN (TIMERx_CTL[24] ) is 1, user can read CNT value for getting current 24-bit event input counter value. 137 * | | |Write operation. 138 * | | |Writing any value to this register will reset current CNT value to 0 and reload internal 8-bit prescale counter. 139 * |[31] |RSTACT |Timer Data Register Reset Active (Read Only) 140 * | | |This bit indicates if the counter reset operation active. 141 * | | |When user writes this CNT register, timer starts to reset its internal 24-bit timer up-counter to 0 and reload 8-bit pre-scale counter 142 * | | |At the same time, timer set this flag to 1 to indicate the counter reset operation is in progress 143 * | | |Once the counter reset operation done, timer clear this bit to 0 automatically. 144 * | | |0 = Reset operation is done. 145 * | | |1 = Reset operation triggered by writing TIMERx_CNT is in progress. 146 * | | |Note: This bit is read only. 147 * @var TIMER_T::CAP 148 * Offset: 0x10 Timer Capture Data Register 149 * --------------------------------------------------------------------------------------------------- 150 * |Bits |Field |Descriptions 151 * | :----: | :----: | :---- | 152 * |[23:0] |CAPDAT |Timer Capture Data Register 153 * | | |When CAPEN (TIMERx_EXTCTL[3]) bit is set, CAPFUNCS (TIMERx_EXTCTL[4]) bit is 0, and a transition on TMx_EXT pin matched the CAPEDGE (TIMERx_EXTCTL[14:12]) setting, CAPIF (TIMERx_EINTSTS[0]) will set to 1 and the current timer counter value CNT (TIMERx_CNT[23:0]) will be auto-loaded into this CAPDAT field. 154 * @var TIMER_T::EXTCTL 155 * Offset: 0x14 Timer External Control Register 156 * --------------------------------------------------------------------------------------------------- 157 * |Bits |Field |Descriptions 158 * | :----: | :----: | :---- | 159 * |[0] |CNTPHASE |Timer External Count Phase 160 * | | |This bit indicates the detection phase of external counting pin TMx (x= 0~3). 161 * | | |0 = A falling edge of external counting pin will be counted. 162 * | | |1 = A rising edge of external counting pin will be counted. 163 * |[3] |CAPEN |Timer External Capture Pin Enable Bit 164 * | | |This bit enables the TMx_EXT capture pin input function. 165 * | | |0 =TMx_EXT (x= 0~3) pin Disabled. 166 * | | |1 =TMx_EXT (x= 0~3) pin Enabled. 167 * |[4] |CAPFUNCS |Capture Function Selection 168 * | | |0 = External Capture Mode Enabled. 169 * | | |1 = External Reset Mode Enabled. 170 * | | |Note1: When CAPFUNCS is 0, transition on TMx_EXT (x= 0~3) pin is using to save current 24-bit timer counter value (CNT value) to CAPDAT field. 171 * | | |Note2: When CAPFUNCS is 1, transition on TMx_EXT (x= 0~3) pin is using to save current 24-bit timer counter value (CNT value) to CAPDAT field then CNT value will be reset immediately. 172 * |[5] |CAPIEN |Timer External Capture Interrupt Enable Bit 173 * | | |0 = TMx_EXT (x= 0~3) pin detection Interrupt Disabled. 174 * | | |1 = TMx_EXT (x= 0~3) pin detection Interrupt Enabled. 175 * | | |Note: CAPIEN is used to enable timer external interrupt 176 * | | |If CAPIEN enabled, timer will rise an interrupt when CAPIF (TIMERx_EINTSTS[0]) is 1. 177 * | | |For example, while CAPIEN = 1, CAPEN = 1, and CAPEDGE = 00, a 1 to 0 transition on the TMx_EXT pin will cause the CAPIF to be set then the interrupt signal is generated and sent to NVIC to inform CPU. 178 * |[6] |CAPDBEN |Timer External Capture Pin De-bounce Enable Bit 179 * | | |0 = TMx_EXT (x= 0~3) pin de-bounce or ACMP output de-bounce Disabled. 180 * | | |1 = TMx_EXT (x= 0~3) pin de-bounce or ACMP output de-bounce Enabled. 181 * | | |Note: If this bit is enabled, the edge detection of TMx_EXT pin or ACMP output is detected with de-bounce circuit. 182 * |[7] |CNTDBEN |Timer Counter Pin De-bounce Enable Bit 183 * | | |0 = TMx (x= 0~3) pin de-bounce Disabled. 184 * | | |1 = TMx (x= 0~3) pin de-bounce Enabled. 185 * | | |Note: If this bit is enabled, the edge detection of TMx pin is detected with de-bounce circuit. 186 * |[8:10] |ICAPSEL |Internal Capture Source Select 187 * | | |000 = Capture Function source is from internal ACMP0 output signal. 188 * | | |001 = Capture Function source is from internal ACMP1 output signal. 189 * | | |010 = Capture Function source is from HXT. 190 * | | |011 = Capture Function source is from LXT. 191 * | | |100 = Capture Function source is from HIRC. 192 * | | |101 = Capture Function source is from LIRC. 193 * | | |110 = Reserved. 194 * | | |111 = Reserved. 195 * | | |Note: these bits only available when CAPSRC (TIMERx_CTL[22]) is 1. 196 * |[14:12] |CAPEDGE |Timer External Capture Pin Edge Detect 197 * | | |When first capture event is generated, the CNT (TIMERx_CNT[23:0]) will be reset to 0 and first CAPDAT (TIMERx_CAP[23:0]) should be to 0. 198 * | | |000 = Capture event occurred when detect falling edge transfer on TMx_EXT (x= 0~3) pin. 199 * | | |001 = Capture event occurred when detect rising edge transfer on TMx_EXT (x= 0~3) pin. 200 * | | |010 = Capture event occurred when detect both falling and rising edge transfer on TMx_EXT (x= 0~3) pin, and first capture event occurred at falling edge transfer. 201 * | | |011 = Capture event occurred when detect both rising and falling edge transfer on TMx_EXT (x= 0~3) pin, and first capture event occurred at rising edge transfer.. 202 * | | |110 = First capture event occurred at falling edge, follows capture events are at rising edge transfer on TMx_EXT (x= 0~3) pin. 203 * | | |111 = First capture event occurred at rising edge, follows capture events are at falling edge transfer on TMx_EXT (x= 0~3) pin. 204 * | | |100, 101 = Reserved. 205 * |[16] |ECNTSSEL |Event Counter Source Selection to Trigger Event Counter Function 206 * | | |0 = Event Counter input source is from TMx (x= 0~3) pin. 207 * | | |1 = Event Counter input source is from USB internal SOF output signal. 208 * |[31:28] |CAPDIVSCL |Timer Capture Source Divider 209 * | | |This bits indicate the divide scale for capture source divider 210 * | | |0000 = Capture source/1. 211 * | | |0001 = Capture source/2. 212 * | | |0010 = Capture source/4. 213 * | | |0011 = Capture source/8. 214 * | | |0100 = Capture source/16. 215 * | | |0101 = Capture source/32. 216 * | | |0110 = Capture source/64. 217 * | | |0111 = Capture source/128. 218 * | | |1000 = Capture source/256. 219 * | | |1001~1111 = Reserved. 220 * | | |Note: Sets INTERCAPSEL (TIMERx_EXTCTL[10:8]) and CAPSRC (TIMERx_CTL[22]) to select capture source. * @var TIMER_T::EINTSTS 221 * Offset: 0x18 Timer External Interrupt Status Register 222 * --------------------------------------------------------------------------------------------------- 223 * |Bits |Field |Descriptions 224 * | :----: | :----: | :---- | 225 * |[0] |CAPIF |Timer External Capture Interrupt Flag 226 * | | |This bit indicates the timer external capture interrupt flag status. 227 * | | |0 = TMx_EXT (x= 0~3) pin interrupt did not occur. 228 * | | |1 = TMx_EXT (x= 0~3) pin interrupt occurred. 229 * | | |Note1: This bit is cleared by writing 1 to it. 230 * | | |Note2: When CAPEN (TIMERx_EXTCTL[3]) bit is set, CAPFUNCS (TIMERx_EXTCTL[4]) bit is 0, and a transition on TMx_EXT (x= 0~3) pin matched the CAPEDGE (TIMERx_EXTCTL[2:1]) setting, this bit will set to 1 by hardware. 231 * | | |Note3: There is a new incoming capture event detected before CPU clearing the CAPIF status 232 * | | |If the above condition occurred, the Timer will keep register TIMERx_CAP unchanged and drop the new capture value. 233 * @var TIMER_T::TRGCTL 234 * Offset: 0x1C Timer Trigger Control Register 235 * --------------------------------------------------------------------------------------------------- 236 * |Bits |Field |Descriptions 237 * | :----: | :----: | :---- | 238 * |[0] |TRGSSEL |Trigger Source Select Bit 239 * | | |This bit is used to select internal trigger source is form timer time-out interrupt signal or 240 * | | |capture interrupt signal. 241 * | | |0 = Time-out interrupt signal is used to internal trigger EPWM, BPWM, PDMA, DAC, and EADC. 242 * | | |1 = Capture interrupt signal is used to internal trigger EPWM, BPWM, PDMA, DAC, and EADC. 243 * |[1] |TRGPWM |Trigger EPWM and BPWM Enable Bit 244 * | | |If this bit is set to 1, each timer time-out event or capture event can be as EPWM and BPWM counter clock source. 245 * | | |0 = Timer interrupt trigger EPWM and BPWM Disabled. 246 * | | |1 = Timer interrupt trigger EPWM and BPWM Enabled. 247 * | | |Note: If TRGSSEL (TIMERx_TRGCTL[0]) = 0, time-out interrupt signal as EPWM and BPWM counter clock source. 248 * | | |If TRGSSEL (TIMERx_TRGCTL[0]) = 1, capture interrupt signal as EPWM and BPWM counter clock source. 249 * |[2] |TRGEADC |Trigger EADC Enable Bit 250 * | | |If this bit is set to 1, each timer time-out event or capture event can be triggered EADC conversion. 251 * | | |0 = Timer interrupt trigger EADC Disabled. 252 * | | |1 = Timer interrupt trigger EADC Enabled. 253 * | | |Note: If TRGSSEL (TIMERx_TRGCTL[0]) = 0, time-out interrupt signal will trigger EADC conversion. 254 * | | |If TRGSSEL (TIMERx_TRGCTL[0]) = 1, capture interrupt signal will trigger EADC conversion. 255 * |[3] |TRGDAC |Trigger DAC Enable Bit 256 * | | |If this bit is set to 1, timer time-out interrupt or capture interrupt can be triggered DAC. 257 * | | |0 = Timer interrupt trigger DAC Disabled. 258 * | | |1 = Timer interrupt trigger DAC Enabled. 259 * | | |Note: If TRGSSEL (TIMERx_TRGCTL[0]) = 0, time-out interrupt signal will trigger DAC. 260 * | | |If TRGSSEL (TIMERx_TRGCTL[0]) = 1, capture interrupt signal will trigger DAC. 261 * |[4] |TRGPDMA |Trigger PDMA Enable Bit 262 * | | |If this bit is set to 1, each timer time-out event or capture event can be triggered PDMA transfer. 263 * | | |0 = Timer interrupt trigger PDMA Disabled. 264 * | | |1 = Timer interrupt trigger PDMA Enabled. 265 * | | |Note: If TRGSSEL (TIMERx_TRGCTL[0]) = 0, time-out interrupt signal will trigger PDMA transfer. 266 * | | |If TRGSSEL (TIMERx_TRGCTL[0]) = 1, capture interrupt signal will trigger PDMA transfer. 267 * @var TIMER_T::ALTCTL 268 * Offset: 0x20 Timer Alternative Control Register 269 * --------------------------------------------------------------------------------------------------- 270 * |Bits |Field |Descriptions 271 * | :----: | :----: | :---- | 272 * |[0] |FUNCSEL |Function Selection 273 * | | |0 = Timer controller is used as timer function. 274 * | | |1 = Timer controller is used as PWM function. 275 * | | |Note: When timer is used as PWM, the clock source of time controller will be forced to PCLKx automatically. 276 * @var TIMER_T::CAPNF 277 * Offset: 0x24 Timer Capture Input Noise Filter Register 278 * --------------------------------------------------------------------------------------------------- 279 * |Bits |Field |Descriptions 280 * | :----: | :----: | :---- | 281 * |[0] |CAPNFEN |Capture Noise Filter Enable 282 * | | |0 = Capture Noise Filter function Disabled. 283 * | | |1 = Capture Noise Filter function Enabled. 284 * |[6:4] |CAPNFSEL |Capture Edge Detector Noise Filter Clock Selection 285 * | | |000 = Noise filter clock is PCLKx. 286 * | | |001 = Noise filter clock is PCLKx/2. 287 * | | |010 = Noise filter clock is PCLKx/4. 288 * | | |011 = Noise filter clock is PCLKx/8. 289 * | | |100 = Noise filter clock is PCLKx/16. 290 * | | |101 = Noise filter clock is PCLKx/32. 291 * | | |110 = Noise filter clock is PCLKx/64. 292 * | | |111 = Noise filter clock is PCLKx/128. 293 * |[10:8] |CAPNFCNT |Capture Edge Detector Noise Filter Count 294 * | | |These bits control the capture filter counter to count from 0 to CAPNFCNT. 295 * @var TIMER_T::PWMCTL 296 * Offset: 0x40 Timer PWM Control Register 297 * --------------------------------------------------------------------------------------------------- 298 * |Bits |Field |Descriptions 299 * | :----: | :----: | :---- | 300 * |[0] |CNTEN |PWM Counter Enable Bit 301 * | | |0 = PWM counter and clock prescale Stop Running. 302 * | | |1 = PWM counter and clock prescale Start Running. 303 * |[2:1] |CNTTYPE |PWM Counter Behavior Type 304 * | | |00 = Up count type. 305 * | | |01 = Down count type. 306 * | | |10 = Up-down count type. 307 * | | |11 = Reserved. 308 * |[3] |CNTMODE |PWM Counter Mode 309 * | | |0 = Auto-reload mode. 310 * | | |1 = One-shot mode. 311 * |[8] |CTRLD |Center Re-load 312 * | | |In up-down count type, PERIOD will load to PBUF when current PWM period is completed always and CMP will load to CMPBUF at the center point of current period. 313 * |[9] |IMMLDEN |Immediately Load Enable Bit 314 * | | |0 = PERIOD will load to PBUF when current PWM period is completed no matter CTRLD is enabled/disabled 315 * | | |If CTRLD is disabled, CMP will load to CMPBUF when current PWM period is completed; if CTRLD is enabled in up-down count type, CMP will load to CMPBUF at the center point of current period. 316 * | | |1 = PERIOD/CMP will load to PBUF/CMPBUF immediately when user update PERIOD/CMP. 317 * | | |Note: If IMMLDEN is enabled, CTRLD will be invalid. 318 * |[16] |OUTMODE |PWM Output Mode 319 * | | |This bit controls the output mode of corresponding PWM channel. 320 * | | |0 = PWM independent mode. 321 * | | |1 = PWM complementary mode. 322 * |[30] |DBGHALT |ICE Debug Mode Counter Halt (Write Protect) 323 * | | |If debug mode counter halt is enabled, PWM counter will keep current value until exit ICE debug mode. 324 * | | |0 = ICE debug mode counter halt disable. 325 * | | |1 = ICE debug mode counter halt enable. 326 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 327 * |[31] |DBGTRIOFF |ICE Debug Mode Acknowledge Disable Bit (Write Protect) 328 * | | |0 = ICE debug mode acknowledgement effects PWM output. 329 * | | |PWM output pin will be forced as tri-state while ICE debug mode acknowledged. 330 * | | |1 = ICE debug mode acknowledgement disabled. 331 * | | |PWM output pin will keep output no matter ICE debug mode acknowledged or not. 332 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 333 * @var TIMER_T::PWMCLKSRC 334 * Offset: 0x44 Timer PWM Counter Clock Source Register 335 * --------------------------------------------------------------------------------------------------- 336 * |Bits |Field |Descriptions 337 * | :----: | :----: | :---- | 338 * |[2:0] |CLKSRC |PWM Counter Clock Source Select 339 * | | |The PWM counter clock source can be selected from TMRx_CLK or internal timer time-out or capture event. 340 * | | |000 = TMRx_CLK. 341 * | | |001 = Internal TIMER0 time-out or capture event. 342 * | | |010 = Internal TIMER1 time-out or capture event. 343 * | | |011 = Internal TIMER2 time-out or capture event. 344 * | | |100 = Internal TIMER3 time-out or capture event. 345 * | | |Others = Reserved. 346 * | | |Note: If TIMER0 PWM function is enabled, the PWM counter clock source can be selected from TMR0_CLK, TIMER1 interrupt events, TIMER2 interrupt events, or TIMER3 interrupt events. 347 * @var TIMER_T::PWMCLKPSC 348 * Offset: 0x48 Timer PWM Counter Clock Pre-scale Register 349 * --------------------------------------------------------------------------------------------------- 350 * |Bits |Field |Descriptions 351 * | :----: | :----: | :---- | 352 * |[11:0] |CLKPSC |PWM Counter Clock Pre-scale 353 * | | |The active clock of PWM counter is decided by counter clock prescale and divided by (CLKPSC + 1) 354 * | | |If CLKPSC is 0, then there is no scaling in PWM counter clock source. 355 * @var TIMER_T::PWMCNTCLR 356 * Offset: 0x4C Timer PWM Clear Counter Register 357 * --------------------------------------------------------------------------------------------------- 358 * |Bits |Field |Descriptions 359 * | :----: | :----: | :---- | 360 * |[0] |CNTCLR |Clear PWM Counter Control Bit 361 * | | |It is automatically cleared by hardware. 362 * | | |0 = No effect. 363 * | | |1 = Clear 16-bit PWM counter to 0x10000 in up and up-down count type and reset counter value to PERIOD in down count type. 364 * @var TIMER_T::PWMPERIOD 365 * Offset: 0x50 Timer PWM Period Register 366 * --------------------------------------------------------------------------------------------------- 367 * |Bits |Field |Descriptions 368 * | :----: | :----: | :---- | 369 * |[15:0] |PERIOD |PWM Period Register 370 * | | |In up count type: PWM counter counts from 0 to PERIOD, and restarts from 0. 371 * | | |In down count type: PWM counter counts from PERIOD to 0, and restarts from PERIOD. 372 * | | |In up-down count type: PWM counter counts from 0 to PERIOD, then decrements to 0 and repeats again. 373 * | | |In up and down count type: 374 * | | |PWM period time = (PERIOD + 1) * (CLKPSC + 1) * TMRx_PWMCLK. 375 * | | |In up-down count type: 376 * | | |PWM period time = 2 * PERIOD * (CLKPSC+ 1) * TMRx_PWMCLK. 377 * | | |Note: User should take care DIRF (TIMERx_PWMCNT[16]) bit in up/down/up-down count type to monitor current counter direction in each count type. 378 * @var TIMER_T::PWMCMPDAT 379 * Offset: 0x54 Timer PWM Comparator Register 380 * --------------------------------------------------------------------------------------------------- 381 * |Bits |Field |Descriptions 382 * | :----: | :----: | :---- | 383 * |[15:0] |CMP |PWM Comparator Register 384 * | | |PWM CMP is used to compare with PWM CNT to generate PWM output waveform, interrupt events and trigger ADC to start convert. 385 * @var TIMER_T::PWMDTCTL 386 * Offset: 0x58 Timer PWM Dead-Time Control Register 387 * --------------------------------------------------------------------------------------------------- 388 * |Bits |Field |Descriptions 389 * | :----: | :----: | :---- | 390 * |[11:0] |DTCNT |Dead-time Counter (Write Protect) 391 * | | |The dead-time can be calculated from the following two formulas: 392 * | | |Dead-time = (DTCNT[11:0] + 1) * TMRx_PWMCLK, if DTCKSEL is 0. 393 * | | |Dead-time = (DTCNT[11:0] + 1) * TMRx_PWMCLK * (CLKPSC + 1), if DTCKSEL is 1. 394 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 395 * |[16] |DTEN |Enable Dead-time Insertion for PWMx_CH0 and PWMx_CH1 (Write Protect) 396 * | | |Dead-time insertion function is only active when PWM complementary mode is enabled 397 * | | |If dead- time insertion is inactive, the outputs of PWMx_CH0 and PWMx_CH1 are complementary without any delay. 398 * | | |0 = Dead-time insertion Disabled on the pin pair. 399 * | | |1 = Dead-time insertion Enabled on the pin pair. 400 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 401 * |[24] |DTCKSEL |Dead-time Clock Select (Write Protect) 402 * | | |0 = Dead-time clock source from TMRx_PWMCLK without counter clock prescale. 403 * | | |1 = Dead-time clock source from TMRx_PWMCLK with counter clock prescale. 404 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 405 * @var TIMER_T::PWMCNT 406 * Offset: 0x5C Timer PWM Counter Register 407 * --------------------------------------------------------------------------------------------------- 408 * |Bits |Field |Descriptions 409 * | :----: | :----: | :---- | 410 * |[15:0] |CNT |PWM Counter Value Register (Read Only) 411 * | | |User can monitor CNT to know the current counter value in 16-bit period counter. 412 * |[16] |DIRF |PWM Counter Direction Indicator Flag (Read Only) 413 * | | |0 = Counter is active in down count. 414 * | | |1 = Counter is active up count. 415 * @var TIMER_T::PWMMSKEN 416 * Offset: 0x60 Timer PWM Output Mask Enable Register 417 * --------------------------------------------------------------------------------------------------- 418 * |Bits |Field |Descriptions 419 * | :----: | :----: | :---- | 420 * |[0] |MSKEN0 |PWMx_CH0 Output Mask Enable Bit 421 * | | |The PWMx_CH0 output signal will be masked when this bit is enabled 422 * | | |The PWMx_CH0 will output MSKDAT0 (TIMER_PWMMSK[0]) data. 423 * | | |0 = PWMx_CH0 output signal is non-masked. 424 * | | |1 = PWMx_CH0 output signal is masked and output MSKDAT0 data. 425 * |[1] |MSKEN1 |PWMx_CH1 Output Mask Enable Bit 426 * | | |The PWMx_CH1 output signal will be masked when this bit is enabled 427 * | | |The PWMx_CH1 will output MSKDAT1 (TIMER_PWMMSK[1]) data. 428 * | | |0 = PWMx_CH1 output signal is non-masked. 429 * | | |1 = PWMx_CH1 output signal is masked and output MSKDAT1 data. 430 * @var TIMER_T::PWMMSK 431 * Offset: 0x64 Timer PWM Output Mask Data Control Register 432 * --------------------------------------------------------------------------------------------------- 433 * |Bits |Field |Descriptions 434 * | :----: | :----: | :---- | 435 * |[0] |MSKDAT0 |PWMx_CH0 Output Mask Data Control Bit 436 * | | |This bit is used to control the output state of PWMx_CH0 pin when PWMx_CH0 output mask function is enabled (MSKEN0 = 1). 437 * | | |0 = Output logic Low to PWMx_CH0. 438 * | | |1 = Output logic High to PWMx_CH0. 439 * |[1] |MSKDAT1 |PWMx_CH1 Output Mask Data Control Bit 440 * | | |This bit is used to control the output state of PWMx_CH1 pin when PWMx_CH1 output mask function is enabled (MSKEN1 = 1). 441 * | | |0 = Output logic Low to PWMx_CH1. 442 * | | |1 = Output logic High to PWMx_CH1. 443 * @var TIMER_T::PWMBNF 444 * Offset: 0x68 Timer PWM Brake Pin Noise Filter Register 445 * --------------------------------------------------------------------------------------------------- 446 * |Bits |Field |Descriptions 447 * | :----: | :----: | :---- | 448 * |[0] |BRKNFEN |Brake Pin Noise Filter Enable Bit 449 * | | |0 = Pin noise filter detect of PWMx_BRAKEy Disabled. 450 * | | |1 = Pin noise filter detect of PWMx_BRAKEy Enabled. 451 * |[3:1] |BRKNFSEL |Brake Pin Noise Filter Clock Selection 452 * | | |000 = Noise filter clock is PCLKx. 453 * | | |001 = Noise filter clock is PCLKx/2. 454 * | | |010 = Noise filter clock is PCLKx/4. 455 * | | |011 = Noise filter clock is PCLKx/8. 456 * | | |100 = Noise filter clock is PCLKx/16. 457 * | | |101 = Noise filter clock is PCLKx/32. 458 * | | |110 = Noise filter clock is PCLKx/64. 459 * | | |111 = Noise filter clock is PCLKx/128. 460 * |[6:4] |BRKFCNT |Brake Pin Noise Filter Count 461 * | | |The fields is used to control the active noise filter sample time. 462 * | | |Once noise filter sample time = (Period time of BRKDBCS) * BRKFCNT. 463 * |[7] |BRKPINV |Brake Pin Detection Control Bit 464 * | | |0 = Brake pin event will be detected if PWMx_BRAKEy pin status transfer from low to high in edge-detect, or pin status is high in level-detect. 465 * | | |1 = Brake pin event will be detected if PWMx_BRAKEy pin status transfer from high to low in edge-detect, or pin status is low in level-detect . 466 * |[17:16] |BKPINSRC |Brake Pin Source Select 467 * | | |00 = Brake pin source comes from PWM0_BRAKE0 pin. 468 * | | |01 = Brake pin source comes from PWM0_BRAKE1 pin. 469 * | | |10 = Brake pin source comes from PWM1_BRAKE0 pin. 470 * | | |11 = Brake pin source comes from PWM1_BRAKE1 pin. 471 * @var TIMER_T::PWMFAILBRK 472 * Offset: 0x6C Timer PWM System Fail Brake Control Register 473 * --------------------------------------------------------------------------------------------------- 474 * |Bits |Field |Descriptions 475 * | :----: | :----: | :---- | 476 * |[0] |CSSBRKEN |Clock Security System Detection Trigger PWM Brake Function Enable Bit 477 * | | |0 = Brake Function triggered by clock fail detection Disabled. 478 * | | |1 = Brake Function triggered by clock fail detection Enabled. 479 * |[1] |BODBRKEN |Brown-out Detection Trigger PWM Brake Function Enable Bit 480 * | | |0 = Brake Function triggered by BOD event Disabled. 481 * | | |1 = Brake Function triggered by BOD event Enabled. 482 * |[2] |RAMBRKEN |SRAM Parity Error Detection Trigger PWM Brake Function Enable Bit 483 * | | |0 = Brake Function triggered by SRAM parity error detection Disabled. 484 * | | |1 = Brake Function triggered by SRAM parity error detection Enabled. 485 * |[3] |CORBRKEN |Core Lockup Detection Trigger PWM Brake Function Enable Bit 486 * | | |0 = Brake Function triggered by core lockup event Disabled. 487 * | | |1 = Brake Function triggered by core lockup event Enabled. 488 * @var TIMER_T::PWMBRKCTL 489 * Offset: 0x70 Timer PWM Brake Control Register 490 * --------------------------------------------------------------------------------------------------- 491 * |Bits |Field |Descriptions 492 * | :----: | :----: | :---- | 493 * |[0] |CPO0EBEN |Enable Internal ACMP0_O Digital Output As Edge-detect Brake Source (Write Protect) 494 * | | |0 = Internal ACMP0_O signal as edge-detect brake source Disabled. 495 * | | |1 = Internal ACMP0_O signal as edge-detect brake source Enabled. 496 * | | |Note1: Only internal ACMP0_O signal from low to high will be detected as brake event. 497 * | | |Note2: This register is write protected. Refer toSYS_REGLCTL register. 498 * |[1] |CPO1EBEN |Enable Internal ACMP1_O Digital Output As Edge-detect Brake Source (Write Protect) 499 * | | |0 = Internal ACMP1_O signal as edge-detect brake source Disabled. 500 * | | |1 = Internal ACMP1_O signal as edge-detect brake source Enabled. 501 * | | |Note1: Only internal ACMP1_O signal from low to high will be detected as brake event. 502 * | | |Note2: This register is write protected. Refer toSYS_REGLCTL register. 503 * |[4] |BRKPEEN |Enable TM_BRAKEx Pin As Edge-detect Brake Source (Write Protect) 504 * | | |0 = PWMx_BRAKEy pin event as edge-detect brake source Disabled. 505 * | | |1 = PWMx_BRAKEy pin event as edge-detect brake source Enabled. 506 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 507 * |[7] |SYSEBEN |Enable System Fail As Edge-detect Brake Source (Write Protect) 508 * | | |0 = System fail condition as edge-detect brake source Disabled. 509 * | | |1 = System fail condition as edge-detect brake source Enabled. 510 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 511 * |[8] |CPO0LBEN |Enable Internal ACMP0_O Digital Output As Level-detect Brake Source (Write Protect) 512 * | | |0 = Internal ACMP0_O signal as level-detect brake source Disabled. 513 * | | |1 = Internal ACMP0_O signal as level-detect brake source Enabled. 514 * | | |Note1: Only internal ACMP0_O signal from low to high will be detected as brake event. 515 * | | |Note2: This register is write protected. Refer toSYS_REGLCTL register. 516 * |[9] |CPO1LBEN |Enable Internal ACMP1_O Digital Output As Level-detect Brake Source (Write Protect) 517 * | | |0 = Internal ACMP1_O signal as level-detect brake source Disabled. 518 * | | |1 = Internal ACMP1_O signal as level-detect brake source Enabled. 519 * | | |Note1: Only internal ACMP1_O signal from low to high will be detected as brake event. 520 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 521 * |[12] |BRKPLEN |Enable TM_BRAKEx Pin As Level-detect Brake Source (Write Protect) 522 * | | |0 = PWMx_BRAKEy pin event as level-detect brake source Disabled. 523 * | | |1 = PWMx_BRAKEy pin event as level-detect brake source Enabled. 524 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 525 * |[15] |SYSLBEN |Enable System Fail As Level-detect Brake Source (Write Protect) 526 * | | |0 = System fail condition as level-detect brake source Disabled. 527 * | | |1 = System fail condition as level-detect brake source Enabled. 528 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 529 * |[17:16] |BRKAEVEN |PWM Brake Action Select for PWMx_CH0 (Write Protect) 530 * | | |00 = PWMx_BRAKEy brake event will not affect PWMx_CH0 output. 531 * | | |01 = PWMx_CH0 output tri-state when PWMx_BRAKEy brake event happened. 532 * | | |10 = PWMx_CH0 output low level when PWMx_BRAKEy brake event happened. 533 * | | |11 = PWMx_CH0 output high level when PWMx_BRAKEy brake event happened. 534 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 535 * |[19:18] |BRKAODD |PWM Brake Action Select for PWMx_CH1 (Write Protect) 536 * | | |00 = PWMx_BRAKEy brake event will not affect PWMx_CH1 output. 537 * | | |01 = PWMx_CH1 output tri-state when PWMx_BRAKEy brake event happened. 538 * | | |10 = PWMx_CH1 output low level when PWMx_BRAKEy brake event happened. 539 * | | |11 = PWMx_CH1 output high level when PWMx_BRAKEy brake event happened. 540 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 541 * @var TIMER_T::PWMPOLCTL 542 * Offset: 0x74 Timer PWM Pin Output Polar Control Register 543 * --------------------------------------------------------------------------------------------------- 544 * |Bits |Field |Descriptions 545 * | :----: | :----: | :---- | 546 * |[0] |PINV0 |PWMx_CH0 Output Pin Polar Control Bit 547 * | | |The bit is used to control polarity state of PWMx_CH0 output pin. 548 * | | |0 = PWMx_CH0 output pin polar inverse Disabled. 549 * | | |1 = PWMx_CH0 output pin polar inverse Enabled. 550 * |[1] |PINV1 |PWMx_CH1 Output Pin Polar Control Bit 551 * | | |The bit is used to control polarity state of PWMx_CH1 output pin. 552 * | | |0 = PWMx_CH1 output pin polar inverse Disabled. 553 * | | |1 = PWMx_CH1 output pin polar inverse Enabled. 554 * @var TIMER_T::PWMPOEN 555 * Offset: 0x78 Timer PWM Pin Output Enable Register 556 * --------------------------------------------------------------------------------------------------- 557 * |Bits |Field |Descriptions 558 * | :----: | :----: | :---- | 559 * |[0] |POEN0 |PWMx_CH0 Output Pin Enable Bit 560 * | | |0 = PWMx_CH0 pin at tri-state mode. 561 * | | |1 = PWMx_CH0 pin in output mode. 562 * |[1] |POEN1 |PWMx_CH1 Output Pin Enable Bit 563 * | | |0 = PWMx_CH1 pin at tri-state mode. 564 * | | |1 = PWMx_CH1 pin in output mode. 565 * @var TIMER_T::PWMSWBRK 566 * Offset: 0x7C Timer PWM Software Trigger Brake Control Register 567 * --------------------------------------------------------------------------------------------------- 568 * |Bits |Field |Descriptions 569 * | :----: | :----: | :---- | 570 * |[0] |BRKETRG |Software Trigger Edge-detect Brake Source (Write Only) (Write Protect) 571 * | | |Write 1 to this bit will trigger PWM edge-detect brake source, then BRKEIF0 and BRKEIF1 will set to 1 automatically in TIMERx_PWMINTSTS1 register. 572 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 573 * |[8] |BRKLTRG |Software Trigger Level-detect Brake Source (Write Only) (Write Protect) 574 * | | |Write 1 to this bit will trigger PWM level-detect brake source, then BRKLIF0 and BRKLIF1 will set to 1 automatically in TIMERx_PWMINTSTS1 register. 575 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 576 * @var TIMER_T::PWMINTEN0 577 * Offset: 0x80 Timer PWM Interrupt Enable Register 0 578 * --------------------------------------------------------------------------------------------------- 579 * |Bits |Field |Descriptions 580 * | :----: | :----: | :---- | 581 * |[0] |ZIEN |PWM Zero Point Interrupt Enable Bit 582 * | | |0 = Zero point interrupt Disabled. 583 * | | |1 = Zero point interrupt Enabled. 584 * |[1] |PIEN |PWM Period Point Interrupt Enable Bit 585 * | | |0 = Period point interrupt Disabled. 586 * | | |1 = Period point interrupt Enabled. 587 * | | |Note: When in up-down count type, period point means the center point of current PWM period. 588 * |[2] |CMPUIEN |PWM Compare Up Count Interrupt Enable Bit 589 * | | |0 = Compare up count interrupt Disabled. 590 * | | |1 = Compare up count interrupt Enabled. 591 * |[3] |CMPDIEN |PWM Compare Down Count Interrupt Enable Bit 592 * | | |0 = Compare down count interrupt Disabled. 593 * | | |1 = Compare down count interrupt Enabled. 594 * @var TIMER_T::PWMINTEN1 595 * Offset: 0x84 Timer PWM Interrupt Enable Register 1 596 * --------------------------------------------------------------------------------------------------- 597 * |Bits |Field |Descriptions 598 * | :----: | :----: | :---- | 599 * |[0] |BRKEIEN |PWM Edge-detect Brake Interrupt Enable (Write Protect) 600 * | | |0 = PWM edge-detect brake interrupt Disabled. 601 * | | |1 = PWM edge-detect brake interrupt Enabled. 602 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 603 * |[8] |BRKLIEN |PWM Level-detect Brake Interrupt Enable (Write Protect) 604 * | | |0 = PWM level-detect brake interrupt Disabled. 605 * | | |1 = PWM level-detect brake interrupt Enabled. 606 * | | |Note: This register is write protected. Refer toSYS_REGLCTL register. 607 * @var TIMER_T::PWMINTSTS0 608 * Offset: 0x88 Timer PWM Interrupt Status Register 0 609 * --------------------------------------------------------------------------------------------------- 610 * |Bits |Field |Descriptions 611 * | :----: | :----: | :---- | 612 * |[0] |ZIF |PWM Zero Point Interrupt Flag 613 * | | |This bit is set by hardware when TIMERx_PWM counter reaches zero. 614 * | | |Note: This bit is cleared by writing 1 to it. 615 * |[1] |PIF |PWM Period Point Interrupt Flag 616 * | | |This bit is set by hardware when TIMERx_PWM counter reaches PERIOD. 617 * | | |Note1: When in up-down count type, PIF flag means the center point flag of current PWM period. 618 * | | |Note2: This bit is cleared by writing 1 to it. 619 * |[2] |CMPUIF |PWM Compare Up Count Interrupt Flag 620 * | | |This bit is set by hardware when TIMERx_PWM counter in up count direction and reaches CMP. 621 * | | |Note1: If CMP equal to PERIOD, there is no CMPUIF flag in up count type and up-down count type. 622 * | | |Note2: This bit is cleared by writing 1 to it. 623 * |[3] |CMPDIF |PWM Compare Down Count Interrupt Flag 624 * | | |This bit is set by hardware when TIMERx_PWM counter in down count direction and reaches CMP. 625 * | | |Note1: If CMP equal to PERIOD, there is no CMPDIF flag in down count type. 626 * | | |Note2: This bit is cleared by writing 1 to it. 627 * @var TIMER_T::PWMINTSTS1 628 * Offset: 0x8C Timer PWM Interrupt Status Register 1 629 * --------------------------------------------------------------------------------------------------- 630 * |Bits |Field |Descriptions 631 * | :----: | :----: | :---- | 632 * |[0] |BRKEIF0 |Edge-detect Brake Interrupt Flag on PWMx_CH0 (Write Protect) 633 * | | |0 = PWMx_CH0 edge-detect brake event do not happened. 634 * | | |1 = PWMx_CH0 edge-detect brake event happened. 635 * | | |Note1: This bit is cleared by writing 1 to it. 636 * | | |Note2: This register is write protected. Refer toSYS_REGLCTL register. 637 * |[1] |BRKEIF1 |Edge-detect Brake Interrupt Flag PWMx_CH1 (Write Protect) 638 * | | |0 = PWMx_CH1 edge-detect brake event do not happened. 639 * | | |1 = PWMx_CH1 edge-detect brake event happened. 640 * | | |Note1: This bit is cleared by writing 1 to it. 641 * | | |Note2: This register is write protected. Refer toSYS_REGLCTL register. 642 * |[8] |BRKLIF0 |Level-detect Brake Interrupt Flag on PWMx_CH0 (Write Protect) 643 * | | |0 = PWMx_CH0 level-detect brake event do not happened. 644 * | | |1 = PWMx_CH0 level-detect brake event happened. 645 * | | |Note1: This bit is cleared by writing 1 to it. 646 * | | |Note2: This register is write protected. Refer toSYS_REGLCTL register. 647 * |[9] |BRKLIF1 |Level-detect Brake Interrupt Flag on PWMx_CH1 (Write Protect) 648 * | | |0 = PWMx_CH1 level-detect brake event do not happened. 649 * | | |1 = PWMx_CH1 level-detect brake event happened. 650 * | | |Note1: This bit is cleared by writing 1 to it. 651 * | | |Note2: This register is write protected. Refer toSYS_REGLCTL register. 652 * |[16] |BRKESTS0 |Edge -detect Brake Status of PWMx_CH0 (Read Only) 653 * | | |0 = PWMx_CH0 edge-detect brake state is released. 654 * | | |1 = PWMx_CH0 at edge-detect brake state. 655 * | | |Note: User can set BRKEIF0 1 to clear BRKEIF0 flag and PWMx_CH0 will release brake state when current PWM period finished and resume PWMx_CH0 output waveform start from next full PWM period. 656 * |[17] |BRKESTS1 |Edge-detect Brake Status of PWMx_CH1 (Read Only) 657 * | | |0 = PWMx_CH1 edge-detect brake state is released. 658 * | | |1 = PWMx_CH1 at edge-detect brake state. 659 * | | |Note: User can set BRKEIF1 1 to clear BRKEIF1 flag and PWMx_CH1 will release brake state when current PWM period finished and resume PWMx_CH1 output waveform start from next full PWM period. 660 * |[24] |BRKLSTS0 |Level-detect Brake Status of PWMx_CH0 (Read Only) 661 * | | |0 = PWMx_CH0 level-detect brake state is released. 662 * | | |1 = PWMx_CH0 at level-detect brake state. 663 * | | |Note: If TIMERx_PWM level-detect brake source has released, both PWMx_CH0 and PWMx_CH1 will release brake state when current PWM period finished and resume PWMx_CH0 and PWMx_CH1 output waveform start from next full PWM period. 664 * |[25] |BRKLSTS1 |Level-detect Brake Status of PWMx_CH1 (Read Only) 665 * | | |0 = PWMx_CH1 level-detect brake state is released. 666 * | | |1 = PWMx_CH1 at level-detect brake state. 667 * | | |Note: If TIMERx_PWM level-detect brake source has released, both PWMx_CH0 and PWMx_CH1 will release brake state when current PWM period finished and resume PWMx_CH0 and PWMx_CH1 output waveform start from next full PWM period. 668 * @var TIMER_T::PWMTRGCTL 669 * Offset: 0x90 Timer PWM Trigger Control Register 670 * --------------------------------------------------------------------------------------------------- 671 * |Bits |Field |Descriptions 672 * | :----: | :----: | :---- | 673 * |[2:0] |TRGSEL |PWM Counter Event Source Select to Trigger Conversion 674 * | | |000 = Trigger conversion at zero point (ZIF). 675 * | | |001 = Trigger conversion at period point (PIF). 676 * | | |010 = Trigger conversion at zero or period point (ZIF or PIF). 677 * | | |011 = Trigger conversion at compare up count point (CMPUIF). 678 * | | |100 = Trigger conversion at compare down count point (CMPDIF). 679 * | | |Others = Reserved. 680 * |[7] |TRGEADC |PWM Counter Event Trigger EADC Conversion Enable Bit 681 * | | |0 = PWM counter event trigger EADC conversion Disabled. 682 * | | |1 = PWM counter event trigger EADC conversion Enabled. 683 * @var TIMER_T::PWMSCTL 684 * Offset: 0x94 Timer PWM Synchronous Control Register 685 * --------------------------------------------------------------------------------------------------- 686 * |Bits |Field |Descriptions 687 * | :----: | :----: | :---- | 688 * |[1:0] |SYNCMODE |PWM Synchronous Mode Enable Select 689 * | | |00 = PWM synchronous function Disabled. 690 * | | |01 = PWM synchronous counter start function Enabled. 691 * | | |10 = Reserved. 692 * | | |11 = PWM synchronous counter clear function Enabled. 693 * |[8] |SYNCSRC |PWM Synchronous Counter Start/Clear Source Select 694 * | | |0 = Counter synchronous start/clear by trigger TIMER0_PWMSTRG STRGEN. 695 * | | |1 = Counter synchronous start/clear by trigger TIMER2_PWMSTRG STRGEN. 696 * | | |Note1: If TIMER0/1/2/3 PWM counter synchronous source are from TIMER0, TIMER0_PWMSCTL[8], TIMER1_PWMSCTL[8], TIMER2_PWMSCTL[8] and TIMER3_PWMSCTL[8] should be 0. 697 * | | |Note2: If TIMER0/1/ PWM counter synchronous source are from TIMER0, TIMER0_PWMSCTL[8] and TIMER1_PWMSCTL[8] should be set 0, and TIMER2/3/ PWM counter synchronous source are from TIMER2, TIME2_PWMSCTL[8] and TIMER3_PWMSCTL[8] should be set 1. 698 * @var TIMER_T::PWMSTRG 699 * Offset: 0x98 Timer PWM Synchronous Trigger Register 700 * --------------------------------------------------------------------------------------------------- 701 * |Bits |Field |Descriptions 702 * | :----: | :----: | :---- | 703 * |[0] |STRGEN |PWM Counter Synchronous Trigger Enable Bit (Write Only) 704 * | | |PMW counter synchronous function is used to make selected PWM channels (include TIMER0/1/2/3 PWM, TIMER0/1 PWM and TIMER2/3 PWM) start counting or clear counter at the same time according to TIMERx_PWMSCTL setting. 705 * | | |Note: This bit is only available in TIMER0 and TIMER2. 706 * @var TIMER_T::PWMSTATUS 707 * Offset: 0x9C Timer PWM Status Register 708 * --------------------------------------------------------------------------------------------------- 709 * |Bits |Field |Descriptions 710 * | :----: | :----: | :---- | 711 * |[0] |CNTMAXF |PWM Counter Equal to 0xFFFF Flag 712 * | | |0 = Indicates the PWM counter value never reached its maximum value 0xFFFF. 713 * | | |1 = Indicates the PWM counter value has reached its maximum value. 714 * | | |Note: This bit is cleared by writing 1 to it. 715 * |[16] |EADCTRGF |Trigger EADC Start Conversion Flag 716 * | | |0 = PWM counter event trigger EADC start conversion is not occurred. 717 * | | |1 = PWM counter event trigger EADC start conversion has occurred. 718 * | | |Note: This bit is cleared by writing 1 to it. 719 * @var TIMER_T::PWMPBUF 720 * Offset: 0xA0 Timer PWM Period Buffer Register 721 * --------------------------------------------------------------------------------------------------- 722 * |Bits |Field |Descriptions 723 * | :----: | :----: | :---- | 724 * |[15:0] |PBUF |PWM Period Buffer Register (Read Only) 725 * | | |Used as PERIOD active register. 726 * @var TIMER_T::PWMCMPBUF 727 * Offset: 0xA4 Timer PWM Comparator Buffer Register 728 * --------------------------------------------------------------------------------------------------- 729 * |Bits |Field |Descriptions 730 * | :----: | :----: | :---- | 731 * |[15:0] |CMPBUF |PWM Comparator Buffer Register (Read Only) 732 * | | |Used as CMP active register. 733 * @var TIMER_T::PWMIFA 734 * Offset: 0xA8 Timer PWM Interrupt Flag Accumulator Register 735 * --------------------------------------------------------------------------------------------------- 736 * |Bits |Field |Descriptions 737 * | :----: | :----: | :---- | 738 * |[15:0] |IFACNT |PWM Interrupt Flag Accumulator Counter 739 * | | |This field sets the count number which defines (IFACNT+1) times of specify PWM interrupt occurs to set IFAIF bit to request the PWM accumulator interrupt. 740 * | | |PWM accumulator flag (IFAIF) will be set in every (IFACNT+1) times during the the PWM counter operation. 741 * |[24] |STPMOD |PWM Accumulator Stop Mode Enable Bit 742 * | | |0 = PWM interrupt accumulator event to stop counting Disabled. 743 * | | |1 = PWM interrupt accumulator event to stop counting Enabled. 744 * |[29:28] |IFASEL |PWM Interrupt Flag Accumulator Source Select 745 * | | |00 = Accumulate at each PWM zero point. 746 * | | |01 = Accumulate at each PWM period point. 747 * | | |10 = Accumulate at each PWM up-count compared point. 748 * | | |11 = Accumulate at each PWM down-count compared point. 749 * |[31] |IFAEN |PWM Interrupt Flag Accumulator Enable Bit 750 * | | |0 = PWM interrupt flag accumulator function Disabled. 751 * | | |1 = PWM interrupt flag accumulator function Enabled. 752 * @var TIMER_T::PWMAINTSTS 753 * Offset: 0xAC Timer PWM Accumulator Interrupt Status Register 754 * --------------------------------------------------------------------------------------------------- 755 * |Bits |Field |Descriptions 756 * | :----: | :----: | :---- | 757 * |[0] |IFAIF |PWM Interrupt Flag Accumulator Interrupt Flag 758 * | | |This bit is set by hardware when the accumulator value reaches (IFACNT+1). 759 * | | |Note 1: This bit is cleared by writing 1 to it. 760 * | | |Note 2: If APDMAEN (TIMERx_PWMAPDMACTL[0]) is set, this bit will be auto clear after PDMA transfer done. 761 * @var TIMER_T::PWMAINTEN 762 * Offset: 0xB0 Timer PWM Accumulator Interrupt Enable Register 763 * --------------------------------------------------------------------------------------------------- 764 * |Bits |Field |Descriptions 765 * | :----: | :----: | :---- | 766 * |[0] |IFAIEN |PWM Interrupt Flag Accumulator Interrupt Enable Bit 767 * | | |0 = Interrupt Flag Accumulator interrupt Disabled. 768 * | | |1 = Interrupt Flag Accumulator interrupt Enabled. 769 * @var TIMER_T::PWMAPDMACTL 770 * Offset: 0xB4 Timer PWM Accumulator PDMA Control Register 771 * --------------------------------------------------------------------------------------------------- 772 * |Bits |Field |Descriptions 773 * | :----: | :----: | :---- | 774 * |[0] |APDMAEN |PWM Accumulator PDMA Enable Bit 775 * | | |0 = PWM interrupt accumulator event to trigger PDMA transfer Disabled. 776 * | | |1 = PWM interrupt accumulator event to trigger PDMA transfer Enabled. 777 * @var TIMER_T::PWMEXTETCTL 778 * Offset: 0xB8 Timer PWM External Event Trigger Control Register 779 * --------------------------------------------------------------------------------------------------- 780 * |Bits |Field |Descriptions 781 * | :----: | :----: | :---- | 782 * |[0] |EXTETEN |External Pin Event Trigger Enable Bit 783 * | | |0 = External pin event trigger function Disabled. 784 * | | |1 = External pin event trigger function Enabled. 785 * |[5:4] |CNTACTS |Counter Action Selection 786 * | | |00 = External pin event to trigger PWM counter reset. 787 * | | |01 = External pin event to trigger PWM counter start. 788 * | | |10 = External pin event to trigger PWM counter reset and start. 789 * | | |11 = Reserved. 790 * |[11:8] |EXTTRGS |External Trigger Pin Selection 791 * | | |0000 = Trigger source form INT0 pin. 792 * | | |0001 = Trigger source form INT1 pin. 793 * | | |0010 = Trigger source form INT2 pin. 794 * | | |0011 = Trigger source form INT3 pin. 795 * | | |0100 = Trigger source form INT4 pin. 796 * | | |0101 = Trigger source form INT5 pin. 797 * | | |0110 = Trigger source form INT6 pin. 798 * | | |0111 = Trigger source form INT7 pin. 799 * | | |Other = Reserved. 800 */ 801 __IO uint32_t CTL; /*!< [0x0000] Timer Control Register */ 802 __IO uint32_t CMP; /*!< [0x0004] Timer Comparator Register */ 803 __IO uint32_t INTSTS; /*!< [0x0008] Timer Interrupt Status Register */ 804 __IO uint32_t CNT; /*!< [0x000c] Timer Data Register */ 805 __I uint32_t CAP; /*!< [0x0010] Timer Capture Data Register */ 806 __IO uint32_t EXTCTL; /*!< [0x0014] Timer External Control Register */ 807 __IO uint32_t EINTSTS; /*!< [0x0018] Timer External Interrupt Status Register */ 808 __IO uint32_t TRGCTL; /*!< [0x001c] Timer Trigger Control Register */ 809 __IO uint32_t ALTCTL; /*!< [0x0020] Timer Alternative Control Register */ 810 __IO uint32_t CAPNF; /*!< [0x0024] Timer Capture Input Noise Filter Register */ 811 /** @cond HIDDEN_SYMBOLS */ 812 __I uint32_t RESERVE0[6]; 813 /** @endcond */ 814 __IO uint32_t PWMCTL; /*!< [0x0040] Timer PWM Control Register */ 815 __IO uint32_t PWMCLKSRC; /*!< [0x0044] Timer PWM Counter Clock Source Register */ 816 __IO uint32_t PWMCLKPSC; /*!< [0x0048] Timer PWM Counter Clock Pre-scale Register */ 817 __IO uint32_t PWMCNTCLR; /*!< [0x004c] Timer PWM Clear Counter Register */ 818 __IO uint32_t PWMPERIOD; /*!< [0x0050] Timer PWM Period Register */ 819 __IO uint32_t PWMCMPDAT; /*!< [0x0054] Timer PWM Comparator Register */ 820 __IO uint32_t PWMDTCTL; /*!< [0x0058] Timer PWM Dead-Time Control Register */ 821 __I uint32_t PWMCNT; /*!< [0x005c] Timer PWM Counter Register */ 822 __IO uint32_t PWMMSKEN; /*!< [0x0060] Timer PWM Output Mask Enable Register */ 823 __IO uint32_t PWMMSK; /*!< [0x0064] Timer PWM Output Mask Data Control Register */ 824 __IO uint32_t PWMBNF; /*!< [0x0068] Timer PWM Brake Pin Noise Filter Register */ 825 __IO uint32_t PWMFAILBRK; /*!< [0x006c] Timer PWM System Fail Brake Control Register */ 826 __IO uint32_t PWMBRKCTL; /*!< [0x0070] Timer PWM Brake Control Register */ 827 __IO uint32_t PWMPOLCTL; /*!< [0x0074] Timer PWM Pin Output Polar Control Register */ 828 __IO uint32_t PWMPOEN; /*!< [0x0078] Timer PWM Pin Output Enable Register */ 829 __O uint32_t PWMSWBRK; /*!< [0x007c] Timer PWM Software Trigger Brake Control Register */ 830 __IO uint32_t PWMINTEN0; /*!< [0x0080] Timer PWM Interrupt Enable Register 0 */ 831 __IO uint32_t PWMINTEN1; /*!< [0x0084] Timer PWM Interrupt Enable Register 1 */ 832 __IO uint32_t PWMINTSTS0; /*!< [0x0088] Timer PWM Interrupt Status Register 0 */ 833 __IO uint32_t PWMINTSTS1; /*!< [0x008c] Timer PWM Interrupt Status Register 1 */ 834 __IO uint32_t PWMTRGCTL; /*!< [0x0090] Timer PWM Trigger Control Register */ 835 __IO uint32_t PWMSCTL; /*!< [0x0094] Timer PWM Synchronous Control Register */ 836 __O uint32_t PWMSTRG; /*!< [0x0098] Timer PWM Synchronous Trigger Register */ 837 __IO uint32_t PWMSTATUS; /*!< [0x009c] Timer PWM Status Register */ 838 __I uint32_t PWMPBUF; /*!< [0x00a0] Timer PWM Period Buffer Register */ 839 __I uint32_t PWMCMPBUF; /*!< [0x00a4] Timer PWM Comparator Buffer Register */ 840 __IO uint32_t PWMIFA; /*!< [0x00a8] Timer PWM Interrupt Flag Accumulator Register */ 841 __IO uint32_t PWMAINTSTS; /*!< [0x00ac] Timer PWM Accumulator Interrupt Flag Register */ 842 __IO uint32_t PWMAINTEN; /*!< [0x00b0] Timer PWM Accumulator Interrupt Enable Register */ 843 __IO uint32_t PWMAPDMACTL; /*!< [0x00b4] Timer PWM Accumulator PDMA Control Register */ 844 __IO uint32_t PWMEXTETCTL; /*!< [0x00b8] Timer PWM External Event Trigger Control Register */ 845 846 } TIMER_T; 847 848 /** 849 @addtogroup TIMER_CONST TIMER Bit Field Definition 850 Constant Definitions for TIMER Controller 851 @{ */ 852 853 #define TIMER_CTL_PSC_Pos (0) /*!< TIMER_T::CTL: PSC Position */ 854 #define TIMER_CTL_PSC_Msk (0xfful << TIMER_CTL_PSC_Pos) /*!< TIMER_T::CTL: PSC Mask */ 855 856 #define TIMER_CTL_INTRGEN_Pos (19) /*!< TIMER_T::CTL: INTRGEN Position */ 857 #define TIMER_CTL_INTRGEN_Msk (0x1ul << TIMER_CTL_INTRGEN_Pos) /*!< TIMER_T::CTL: INTRGEN Mask */ 858 859 #define TIMER_CTL_PERIOSEL_Pos (20) /*!< TIMER_T::CTL: PERIOSEL Position */ 860 #define TIMER_CTL_PERIOSEL_Msk (0x1ul << TIMER_CTL_PERIOSEL_Pos) /*!< TIMER_T::CTL: PERIOSEL Mask */ 861 862 #define TIMER_CTL_TGLPINSEL_Pos (21) /*!< TIMER_T::CTL: TGLPINSEL Position */ 863 #define TIMER_CTL_TGLPINSEL_Msk (0x1ul << TIMER_CTL_TGLPINSEL_Pos) /*!< TIMER_T::CTL: TGLPINSEL Mask */ 864 865 #define TIMER_CTL_CAPSRC_Pos (22) /*!< TIMER_T::CTL: CAPSRC Position */ 866 #define TIMER_CTL_CAPSRC_Msk (0x1ul << TIMER_CTL_CAPSRC_Pos) /*!< TIMER_T::CTL: CAPSRC Mask */ 867 868 #define TIMER_CTL_WKEN_Pos (23) /*!< TIMER_T::CTL: WKEN Position */ 869 #define TIMER_CTL_WKEN_Msk (0x1ul << TIMER_CTL_WKEN_Pos) /*!< TIMER_T::CTL: WKEN Mask */ 870 871 #define TIMER_CTL_EXTCNTEN_Pos (24) /*!< TIMER_T::CTL: EXTCNTEN Position */ 872 #define TIMER_CTL_EXTCNTEN_Msk (0x1ul << TIMER_CTL_EXTCNTEN_Pos) /*!< TIMER_T::CTL: EXTCNTEN Mask */ 873 874 #define TIMER_CTL_ACTSTS_Pos (25) /*!< TIMER_T::CTL: ACTSTS Position */ 875 #define TIMER_CTL_ACTSTS_Msk (0x1ul << TIMER_CTL_ACTSTS_Pos) /*!< TIMER_T::CTL: ACTSTS Mask */ 876 877 #define TIMER_CTL_OPMODE_Pos (27) /*!< TIMER_T::CTL: OPMODE Position */ 878 #define TIMER_CTL_OPMODE_Msk (0x3ul << TIMER_CTL_OPMODE_Pos) /*!< TIMER_T::CTL: OPMODE Mask */ 879 880 #define TIMER_CTL_INTEN_Pos (29) /*!< TIMER_T::CTL: INTEN Position */ 881 #define TIMER_CTL_INTEN_Msk (0x1ul << TIMER_CTL_INTEN_Pos) /*!< TIMER_T::CTL: INTEN Mask */ 882 883 #define TIMER_CTL_CNTEN_Pos (30) /*!< TIMER_T::CTL: CNTEN Position */ 884 #define TIMER_CTL_CNTEN_Msk (0x1ul << TIMER_CTL_CNTEN_Pos) /*!< TIMER_T::CTL: CNTEN Mask */ 885 886 #define TIMER_CTL_ICEDEBUG_Pos (31) /*!< TIMER_T::CTL: ICEDEBUG Position */ 887 #define TIMER_CTL_ICEDEBUG_Msk (0x1ul << TIMER_CTL_ICEDEBUG_Pos) /*!< TIMER_T::CTL: ICEDEBUG Mask */ 888 889 #define TIMER_CMP_CMPDAT_Pos (0) /*!< TIMER_T::CMP: CMPDAT Position */ 890 #define TIMER_CMP_CMPDAT_Msk (0xfffffful << TIMER_CMP_CMPDAT_Pos) /*!< TIMER_T::CMP: CMPDAT Mask */ 891 892 #define TIMER_INTSTS_TIF_Pos (0) /*!< TIMER_T::INTSTS: TIF Position */ 893 #define TIMER_INTSTS_TIF_Msk (0x1ul << TIMER_INTSTS_TIF_Pos) /*!< TIMER_T::INTSTS: TIF Mask */ 894 895 #define TIMER_INTSTS_TWKF_Pos (1) /*!< TIMER_T::INTSTS: TWKF Position */ 896 #define TIMER_INTSTS_TWKF_Msk (0x1ul << TIMER_INTSTS_TWKF_Pos) /*!< TIMER_T::INTSTS: TWKF Mask */ 897 898 #define TIMER_CNT_CNT_Pos (0) /*!< TIMER_T::CNT: CNT Position */ 899 #define TIMER_CNT_CNT_Msk (0xfffffful << TIMER_CNT_CNT_Pos) /*!< TIMER_T::CNT: CNT Mask */ 900 901 #define TIMER_CNT_RSTACT_Pos (31) /*!< TIMER_T::CNT: RSTACT Position */ 902 #define TIMER_CNT_RSTACT_Msk (0x1ul << TIMER_CNT_RSTACT_Pos) /*!< TIMER_T::CNT: RSTACT Mask */ 903 904 #define TIMER_CAP_CAPDAT_Pos (0) /*!< TIMER_T::CAP: CAPDAT Position */ 905 #define TIMER_CAP_CAPDAT_Msk (0xfffffful << TIMER_CAP_CAPDAT_Pos) /*!< TIMER_T::CAP: CAPDAT Mask */ 906 907 #define TIMER_EXTCTL_CNTPHASE_Pos (0) /*!< TIMER_T::EXTCTL: CNTPHASE Position */ 908 #define TIMER_EXTCTL_CNTPHASE_Msk (0x1ul << TIMER_EXTCTL_CNTPHASE_Pos) /*!< TIMER_T::EXTCTL: CNTPHASE Mask */ 909 910 #define TIMER_EXTCTL_CAPEN_Pos (3) /*!< TIMER_T::EXTCTL: CAPEN Position */ 911 #define TIMER_EXTCTL_CAPEN_Msk (0x1ul << TIMER_EXTCTL_CAPEN_Pos) /*!< TIMER_T::EXTCTL: CAPEN Mask */ 912 913 #define TIMER_EXTCTL_CAPFUNCS_Pos (4) /*!< TIMER_T::EXTCTL: CAPFUNCS Position */ 914 #define TIMER_EXTCTL_CAPFUNCS_Msk (0x1ul << TIMER_EXTCTL_CAPFUNCS_Pos) /*!< TIMER_T::EXTCTL: CAPFUNCS Mask */ 915 916 #define TIMER_EXTCTL_CAPIEN_Pos (5) /*!< TIMER_T::EXTCTL: CAPIEN Position */ 917 #define TIMER_EXTCTL_CAPIEN_Msk (0x1ul << TIMER_EXTCTL_CAPIEN_Pos) /*!< TIMER_T::EXTCTL: CAPIEN Mask */ 918 919 #define TIMER_EXTCTL_CAPDBEN_Pos (6) /*!< TIMER_T::EXTCTL: CAPDBEN Position */ 920 #define TIMER_EXTCTL_CAPDBEN_Msk (0x1ul << TIMER_EXTCTL_CAPDBEN_Pos) /*!< TIMER_T::EXTCTL: CAPDBEN Mask */ 921 922 #define TIMER_EXTCTL_CNTDBEN_Pos (7) /*!< TIMER_T::EXTCTL: CNTDBEN Position */ 923 #define TIMER_EXTCTL_CNTDBEN_Msk (0x1ul << TIMER_EXTCTL_CNTDBEN_Pos) /*!< TIMER_T::EXTCTL: CNTDBEN Mask */ 924 925 #define TIMER_EXTCTL_ICAPSEL_Pos (8) /*!< TIMER_T::EXTCTL: ICAPSEL Position */ 926 #define TIMER_EXTCTL_ICAPSEL_Msk (0x7ul << TIMER_EXTCTL_ICAPSEL_Pos) /*!< TIMER_T::EXTCTL: ICAPSEL Mask */ 927 928 #define TIMER_EXTCTL_CAPEDGE_Pos (12) /*!< TIMER_T::EXTCTL: CAPEDGE Position */ 929 #define TIMER_EXTCTL_CAPEDGE_Msk (0x7ul << TIMER_EXTCTL_CAPEDGE_Pos) /*!< TIMER_T::EXTCTL: CAPEDGE Mask */ 930 931 #define TIMER_EXTCTL_ECNTSSEL_Pos (16) /*!< TIMER_T::EXTCTL: ECNTSSEL Position */ 932 #define TIMER_EXTCTL_ECNTSSEL_Msk (0x3ul << TIMER_EXTCTL_ECNTSSEL_Pos) /*!< TIMER_T::EXTCTL: ECNTSSEL Mask */ 933 934 #define TIMER_EXTCTL_CAPDIVSCL_Pos (28) /*!< TIMER_T::EXTCTL: CAPDIVSCL Position */ 935 #define TIMER_EXTCTL_CAPDIVSCL_Msk (0xful << TIMER_EXTCTL_CAPDIVSCL_Pos) /*!< TIMER_T::EXTCTL: CAPDIVSCL Mask */ 936 937 #define TIMER_EINTSTS_CAPIF_Pos (0) /*!< TIMER_T::EINTSTS: CAPIF Position */ 938 #define TIMER_EINTSTS_CAPIF_Msk (0x1ul << TIMER_EINTSTS_CAPIF_Pos) /*!< TIMER_T::EINTSTS: CAPIF Mask */ 939 940 #define TIMER_EINTSTS_CAPIFOV_Pos (1) /*!< TIMER_T::EINTSTS: CAPIFOV Position */ 941 #define TIMER_EINTSTS_CAPIFOV_Msk (0x1ul << TIMER_EINTSTS_CAPIFOV_Pos) /*!< TIMER_T::EINTSTS: CAPIFOV Mask */ 942 943 #define TIMER_TRGCTL_TRGSSEL_Pos (0) /*!< TIMER_T::TRGCTL: TRGSSEL Position */ 944 #define TIMER_TRGCTL_TRGSSEL_Msk (0x1ul << TIMER_TRGCTL_TRGSSEL_Pos) /*!< TIMER_T::TRGCTL: TRGSSEL Mask */ 945 946 #define TIMER_TRGCTL_TRGPWM_Pos (1) /*!< TIMER_T::TRGCTL: TRGPWM Position */ 947 #define TIMER_TRGCTL_TRGPWM_Msk (0x1ul << TIMER_TRGCTL_TRGPWM_Pos) /*!< TIMER_T::TRGCTL: TRGPWM Mask */ 948 949 #define TIMER_TRGCTL_TRGEADC_Pos (2) /*!< TIMER_T::TRGCTL: TRGEADC Position */ 950 #define TIMER_TRGCTL_TRGEADC_Msk (0x1ul << TIMER_TRGCTL_TRGEADC_Pos) /*!< TIMER_T::TRGCTL: TRGEADC Mask */ 951 952 #define TIMER_TRGCTL_TRGDAC_Pos (3) /*!< TIMER_T::TRGCTL: TRGDAC Position */ 953 #define TIMER_TRGCTL_TRGDAC_Msk (0x1ul << TIMER_TRGCTL_TRGDAC_Pos) /*!< TIMER_T::TRGCTL: TRGDAC Mask */ 954 955 #define TIMER_TRGCTL_TRGPDMA_Pos (4) /*!< TIMER_T::TRGCTL: TRGPDMA Position */ 956 #define TIMER_TRGCTL_TRGPDMA_Msk (0x1ul << TIMER_TRGCTL_TRGPDMA_Pos) /*!< TIMER_T::TRGCTL: TRGPDMA Mask */ 957 958 #define TIMER_ALTCTL_FUNCSEL_Pos (0) /*!< TIMER_T::ALTCTL: FUNCSEL Position */ 959 #define TIMER_ALTCTL_FUNCSEL_Msk (0x1ul << TIMER_ALTCTL_FUNCSEL_Pos) /*!< TIMER_T::ALTCTL: FUNCSEL Mask */ 960 961 #define TIMER_CAPNF_CAPNFEN_Pos (0) /*!< TIMER_T::CAPNF: CAPNFEN Position */ 962 #define TIMER_CAPNF_CAPNFEN_Msk (0x1ul << TIMER_CAPNF_CAPNFEN_Pos) /*!< TIMER_T::CAPNF: CAPNFEN Mask */ 963 964 #define TIMER_CAPNF_CAPNFSEL_Pos (4) /*!< TIMER_T::CAPNF: CAPNFSEL Position */ 965 #define TIMER_CAPNF_CAPNFSEL_Msk (0x7ul << TIMER_CAPNF_CAPNFSEL_Pos) /*!< TIMER_T::CAPNF: CAPNFSEL Mask */ 966 967 #define TIMER_CAPNF_CAPNFCNT_Pos (8) /*!< TIMER_T::CAPNF: CAPNFCNT Position */ 968 #define TIMER_CAPNF_CAPNFCNT_Msk (0x7ul << TIMER_CAPNF_CAPNFCNT_Pos) /*!< TIMER_T::CAPNF: CAPNFCNT Mask */ 969 970 #define TIMER_PWMCTL_CNTEN_Pos (0) /*!< TIMER_T::PWMCTL: CNTEN Position */ 971 #define TIMER_PWMCTL_CNTEN_Msk (0x1ul << TIMER_PWMCTL_CNTEN_Pos) /*!< TIMER_T::PWMCTL: CNTEN Mask */ 972 973 #define TIMER_PWMCTL_CNTTYPE_Pos (1) /*!< TIMER_T::PWMCTL: CNTTYPE Position */ 974 #define TIMER_PWMCTL_CNTTYPE_Msk (0x3ul << TIMER_PWMCTL_CNTTYPE_Pos) /*!< TIMER_T::PWMCTL: CNTTYPE Mask */ 975 976 #define TIMER_PWMCTL_CNTMODE_Pos (3) /*!< TIMER_T::PWMCTL: CNTMODE Position */ 977 #define TIMER_PWMCTL_CNTMODE_Msk (0x1ul << TIMER_PWMCTL_CNTMODE_Pos) /*!< TIMER_T::PWMCTL: CNTMODE Mask */ 978 979 #define TIMER_PWMCTL_CTRLD_Pos (8) /*!< TIMER_T::PWMCTL: CTRLD Position */ 980 #define TIMER_PWMCTL_CTRLD_Msk (0x1ul << TIMER_PWMCTL_CTRLD_Pos) /*!< TIMER_T::PWMCTL: CTRLD Mask */ 981 982 #define TIMER_PWMCTL_IMMLDEN_Pos (9) /*!< TIMER_T::PWMCTL: IMMLDEN Position */ 983 #define TIMER_PWMCTL_IMMLDEN_Msk (0x1ul << TIMER_PWMCTL_IMMLDEN_Pos) /*!< TIMER_T::PWMCTL: IMMLDEN Mask */ 984 985 #define TIMER_PWMCTL_OUTMODE_Pos (16) /*!< TIMER_T::PWMCTL: OUTMODE Position */ 986 #define TIMER_PWMCTL_OUTMODE_Msk (0x1ul << TIMER_PWMCTL_OUTMODE_Pos) /*!< TIMER_T::PWMCTL: OUTMODE Mask */ 987 988 #define TIMER_PWMCTL_DBGHALT_Pos (30) /*!< TIMER_T::PWMCTL: DBGHALT Position */ 989 #define TIMER_PWMCTL_DBGHALT_Msk (0x1ul << TIMER_PWMCTL_DBGHALT_Pos) /*!< TIMER_T::PWMCTL: DBGHALT Mask */ 990 991 #define TIMER_PWMCTL_DBGTRIOFF_Pos (31) /*!< TIMER_T::PWMCTL: DBGTRIOFF Position */ 992 #define TIMER_PWMCTL_DBGTRIOFF_Msk (0x1ul << TIMER_PWMCTL_DBGTRIOFF_Pos) /*!< TIMER_T::PWMCTL: DBGTRIOFF Mask */ 993 994 #define TIMER_PWMCLKSRC_CLKSRC_Pos (0) /*!< TIMER_T::PWMCLKSRC: CLKSRC Position */ 995 #define TIMER_PWMCLKSRC_CLKSRC_Msk (0x7ul << TIMER_PWMCLKSRC_CLKSRC_Pos) /*!< TIMER_T::PWMCLKSRC: CLKSRC Mask */ 996 997 #define TIMER_PWMCLKPSC_CLKPSC_Pos (0) /*!< TIMER_T::PWMCLKPSC: CLKPSC Position */ 998 #define TIMER_PWMCLKPSC_CLKPSC_Msk (0xffful << TIMER_PWMCLKPSC_CLKPSC_Pos) /*!< TIMER_T::PWMCLKPSC: CLKPSC Mask */ 999 1000 #define TIMER_PWMCNTCLR_CNTCLR_Pos (0) /*!< TIMER_T::PWMCNTCLR: CNTCLR Position */ 1001 #define TIMER_PWMCNTCLR_CNTCLR_Msk (0x1ul << TIMER_PWMCNTCLR_CNTCLR_Pos) /*!< TIMER_T::PWMCNTCLR: CNTCLR Mask */ 1002 1003 #define TIMER_PWMPERIOD_PERIOD_Pos (0) /*!< TIMER_T::PWMPERIOD: PERIOD Position */ 1004 #define TIMER_PWMPERIOD_PERIOD_Msk (0xfffful << TIMER_PWMPERIOD_PERIOD_Pos) /*!< TIMER_T::PWMPERIOD: PERIOD Mask */ 1005 1006 #define TIMER_PWMCMPDAT_CMP_Pos (0) /*!< TIMER_T::PWMCMPDAT: CMP Position */ 1007 #define TIMER_PWMCMPDAT_CMP_Msk (0xfffful << TIMER_PWMCMPDAT_CMP_Pos) /*!< TIMER_T::PWMCMPDAT: CMP Mask */ 1008 1009 #define TIMER_PWMDTCTL_DTCNT_Pos (0) /*!< TIMER_T::PWMDTCTL: DTCNT Position */ 1010 #define TIMER_PWMDTCTL_DTCNT_Msk (0xffful << TIMER_PWMDTCTL_DTCNT_Pos) /*!< TIMER_T::PWMDTCTL: DTCNT Mask */ 1011 1012 #define TIMER_PWMDTCTL_DTEN_Pos (16) /*!< TIMER_T::PWMDTCTL: DTEN Position */ 1013 #define TIMER_PWMDTCTL_DTEN_Msk (0x1ul << TIMER_PWMDTCTL_DTEN_Pos) /*!< TIMER_T::PWMDTCTL: DTEN Mask */ 1014 1015 #define TIMER_PWMDTCTL_DTCKSEL_Pos (24) /*!< TIMER_T::PWMDTCTL: DTCKSEL Position */ 1016 #define TIMER_PWMDTCTL_DTCKSEL_Msk (0x1ul << TIMER_PWMDTCTL_DTCKSEL_Pos) /*!< TIMER_T::PWMDTCTL: DTCKSEL Mask */ 1017 1018 #define TIMER_PWMCNT_CNT_Pos (0) /*!< TIMER_T::PWMCNT: CNT Position */ 1019 #define TIMER_PWMCNT_CNT_Msk (0xfffful << TIMER_PWMCNT_CNT_Pos) /*!< TIMER_T::PWMCNT: CNT Mask */ 1020 1021 #define TIMER_PWMCNT_DIRF_Pos (16) /*!< TIMER_T::PWMCNT: DIRF Position */ 1022 #define TIMER_PWMCNT_DIRF_Msk (0x1ul << TIMER_PWMCNT_DIRF_Pos) /*!< TIMER_T::PWMCNT: DIRF Mask */ 1023 1024 #define TIMER_PWMMSKEN_MSKEN0_Pos (0) /*!< TIMER_T::PWMMSKEN: MSKEN0 Position */ 1025 #define TIMER_PWMMSKEN_MSKEN0_Msk (0x1ul << TIMER_PWMMSKEN_MSKEN0_Pos) /*!< TIMER_T::PWMMSKEN: MSKEN0 Mask */ 1026 1027 #define TIMER_PWMMSKEN_MSKEN1_Pos (1) /*!< TIMER_T::PWMMSKEN: MSKEN1 Position */ 1028 #define TIMER_PWMMSKEN_MSKEN1_Msk (0x1ul << TIMER_PWMMSKEN_MSKEN1_Pos) /*!< TIMER_T::PWMMSKEN: MSKEN1 Mask */ 1029 1030 #define TIMER_PWMMSK_MSKDAT0_Pos (0) /*!< TIMER_T::PWMMSK: MSKDAT0 Position */ 1031 #define TIMER_PWMMSK_MSKDAT0_Msk (0x1ul << TIMER_PWMMSK_MSKDAT0_Pos) /*!< TIMER_T::PWMMSK: MSKDAT0 Mask */ 1032 1033 #define TIMER_PWMMSK_MSKDAT1_Pos (1) /*!< TIMER_T::PWMMSK: MSKDAT1 Position */ 1034 #define TIMER_PWMMSK_MSKDAT1_Msk (0x1ul << TIMER_PWMMSK_MSKDAT1_Pos) /*!< TIMER_T::PWMMSK: MSKDAT1 Mask */ 1035 1036 #define TIMER_PWMBNF_BRKNFEN_Pos (0) /*!< TIMER_T::PWMBNF: BRKNFEN Position */ 1037 #define TIMER_PWMBNF_BRKNFEN_Msk (0x1ul << TIMER_PWMBNF_BRKNFEN_Pos) /*!< TIMER_T::PWMBNF: BRKNFEN Mask */ 1038 1039 #define TIMER_PWMBNF_BRKNFSEL_Pos (1) /*!< TIMER_T::PWMBNF: BRKNFSEL Position */ 1040 #define TIMER_PWMBNF_BRKNFSEL_Msk (0x7ul << TIMER_PWMBNF_BRKNFSEL_Pos) /*!< TIMER_T::PWMBNF: BRKNFSEL Mask */ 1041 1042 #define TIMER_PWMBNF_BRKFCNT_Pos (4) /*!< TIMER_T::PWMBNF: BRKFCNT Position */ 1043 #define TIMER_PWMBNF_BRKFCNT_Msk (0x7ul << TIMER_PWMBNF_BRKFCNT_Pos) /*!< TIMER_T::PWMBNF: BRKFCNT Mask */ 1044 1045 #define TIMER_PWMBNF_BRKPINV_Pos (7) /*!< TIMER_T::PWMBNF: BRKPINV Position */ 1046 #define TIMER_PWMBNF_BRKPINV_Msk (0x1ul << TIMER_PWMBNF_BRKPINV_Pos) /*!< TIMER_T::PWMBNF: BRKPINV Mask */ 1047 1048 #define TIMER_PWMBNF_BKPINSRC_Pos (16) /*!< TIMER_T::PWMBNF: BKPINSRC Position */ 1049 #define TIMER_PWMBNF_BKPINSRC_Msk (0x3ul << TIMER_PWMBNF_BKPINSRC_Pos) /*!< TIMER_T::PWMBNF: BKPINSRC Mask */ 1050 1051 #define TIMER_PWMFAILBRK_CSSBRKEN_Pos (0) /*!< TIMER_T::PWMFAILBRK: CSSBRKEN Position */ 1052 #define TIMER_PWMFAILBRK_CSSBRKEN_Msk (0x1ul << TIMER_PWMFAILBRK_CSSBRKEN_Pos) /*!< TIMER_T::PWMFAILBRK: CSSBRKEN Mask */ 1053 1054 #define TIMER_PWMFAILBRK_BODBRKEN_Pos (1) /*!< TIMER_T::PWMFAILBRK: BODBRKEN Position */ 1055 #define TIMER_PWMFAILBRK_BODBRKEN_Msk (0x1ul << TIMER_PWMFAILBRK_BODBRKEN_Pos) /*!< TIMER_T::PWMFAILBRK: BODBRKEN Mask */ 1056 1057 #define TIMER_PWMFAILBRK_RAMBRKEN_Pos (2) /*!< TIMER_T::PWMFAILBRK: RAMBRKEN Position */ 1058 #define TIMER_PWMFAILBRK_RAMBRKEN_Msk (0x1ul << TIMER_PWMFAILBRK_RAMBRKEN_Pos) /*!< TIMER_T::PWMFAILBRK: RAMBRKEN Mask */ 1059 1060 #define TIMER_PWMFAILBRK_CORBRKEN_Pos (3) /*!< TIMER_T::PWMFAILBRK: CORBRKEN Position */ 1061 #define TIMER_PWMFAILBRK_CORBRKEN_Msk (0x1ul << TIMER_PWMFAILBRK_CORBRKEN_Pos) /*!< TIMER_T::PWMFAILBRK: CORBRKEN Mask */ 1062 1063 #define TIMER_PWMBRKCTL_CPO0EBEN_Pos (0) /*!< TIMER_T::PWMBRKCTL: CPO0EBEN Position */ 1064 #define TIMER_PWMBRKCTL_CPO0EBEN_Msk (0x1ul << TIMER_PWMBRKCTL_CPO0EBEN_Pos) /*!< TIMER_T::PWMBRKCTL: CPO0EBEN Mask */ 1065 1066 #define TIMER_PWMBRKCTL_CPO1EBEN_Pos (1) /*!< TIMER_T::PWMBRKCTL: CPO1EBEN Position */ 1067 #define TIMER_PWMBRKCTL_CPO1EBEN_Msk (0x1ul << TIMER_PWMBRKCTL_CPO1EBEN_Pos) /*!< TIMER_T::PWMBRKCTL: CPO1EBEN Mask */ 1068 1069 #define TIMER_PWMBRKCTL_BRKPEEN_Pos (4) /*!< TIMER_T::PWMBRKCTL: BRKPEEN Position */ 1070 #define TIMER_PWMBRKCTL_BRKPEEN_Msk (0x1ul << TIMER_PWMBRKCTL_BRKPEEN_Pos) /*!< TIMER_T::PWMBRKCTL: BRKPEEN Mask */ 1071 1072 #define TIMER_PWMBRKCTL_SYSEBEN_Pos (7) /*!< TIMER_T::PWMBRKCTL: SYSEBEN Position */ 1073 #define TIMER_PWMBRKCTL_SYSEBEN_Msk (0x1ul << TIMER_PWMBRKCTL_SYSEBEN_Pos) /*!< TIMER_T::PWMBRKCTL: SYSEBEN Mask */ 1074 1075 #define TIMER_PWMBRKCTL_CPO0LBEN_Pos (8) /*!< TIMER_T::PWMBRKCTL: CPO0LBEN Position */ 1076 #define TIMER_PWMBRKCTL_CPO0LBEN_Msk (0x1ul << TIMER_PWMBRKCTL_CPO0LBEN_Pos) /*!< TIMER_T::PWMBRKCTL: CPO0LBEN Mask */ 1077 1078 #define TIMER_PWMBRKCTL_CPO1LBEN_Pos (9) /*!< TIMER_T::PWMBRKCTL: CPO1LBEN Position */ 1079 #define TIMER_PWMBRKCTL_CPO1LBEN_Msk (0x1ul << TIMER_PWMBRKCTL_CPO1LBEN_Pos) /*!< TIMER_T::PWMBRKCTL: CPO1LBEN Mask */ 1080 1081 #define TIMER_PWMBRKCTL_BRKPLEN_Pos (12) /*!< TIMER_T::PWMBRKCTL: BRKPLEN Position */ 1082 #define TIMER_PWMBRKCTL_BRKPLEN_Msk (0x1ul << TIMER_PWMBRKCTL_BRKPLEN_Pos) /*!< TIMER_T::PWMBRKCTL: BRKPLEN Mask */ 1083 1084 #define TIMER_PWMBRKCTL_SYSLBEN_Pos (15) /*!< TIMER_T::PWMBRKCTL: SYSLBEN Position */ 1085 #define TIMER_PWMBRKCTL_SYSLBEN_Msk (0x1ul << TIMER_PWMBRKCTL_SYSLBEN_Pos) /*!< TIMER_T::PWMBRKCTL: SYSLBEN Mask */ 1086 1087 #define TIMER_PWMBRKCTL_BRKAEVEN_Pos (16) /*!< TIMER_T::PWMBRKCTL: BRKAEVEN Position */ 1088 #define TIMER_PWMBRKCTL_BRKAEVEN_Msk (0x3ul << TIMER_PWMBRKCTL_BRKAEVEN_Pos) /*!< TIMER_T::PWMBRKCTL: BRKAEVEN Mask */ 1089 1090 #define TIMER_PWMBRKCTL_BRKAODD_Pos (18) /*!< TIMER_T::PWMBRKCTL: BRKAODD Position */ 1091 #define TIMER_PWMBRKCTL_BRKAODD_Msk (0x3ul << TIMER_PWMBRKCTL_BRKAODD_Pos) /*!< TIMER_T::PWMBRKCTL: BRKAODD Mask */ 1092 1093 #define TIMER_PWMPOLCTL_PINV0_Pos (0) /*!< TIMER_T::PWMPOLCTL: PINV0 Position */ 1094 #define TIMER_PWMPOLCTL_PINV0_Msk (0x1ul << TIMER_PWMPOLCTL_PINV0_Pos) /*!< TIMER_T::PWMPOLCTL: PINV0 Mask */ 1095 1096 #define TIMER_PWMPOLCTL_PINV1_Pos (1) /*!< TIMER_T::PWMPOLCTL: PINV1 Position */ 1097 #define TIMER_PWMPOLCTL_PINV1_Msk (0x1ul << TIMER_PWMPOLCTL_PINV1_Pos) /*!< TIMER_T::PWMPOLCTL: PINV1 Mask */ 1098 1099 #define TIMER_PWMPOEN_POEN0_Pos (0) /*!< TIMER_T::PWMPOEN: POEN0 Position */ 1100 #define TIMER_PWMPOEN_POEN0_Msk (0x1ul << TIMER_PWMPOEN_POEN0_Pos) /*!< TIMER_T::PWMPOEN: POEN0 Mask */ 1101 1102 #define TIMER_PWMPOEN_POEN1_Pos (1) /*!< TIMER_T::PWMPOEN: POEN1 Position */ 1103 #define TIMER_PWMPOEN_POEN1_Msk (0x1ul << TIMER_PWMPOEN_POEN1_Pos) /*!< TIMER_T::PWMPOEN: POEN1 Mask */ 1104 1105 #define TIMER_PWMSWBRK_BRKETRG_Pos (0) /*!< TIMER_T::PWMSWBRK: BRKETRG Position */ 1106 #define TIMER_PWMSWBRK_BRKETRG_Msk (0x1ul << TIMER_PWMSWBRK_BRKETRG_Pos) /*!< TIMER_T::PWMSWBRK: BRKETRG Mask */ 1107 1108 #define TIMER_PWMSWBRK_BRKLTRG_Pos (8) /*!< TIMER_T::PWMSWBRK: BRKLTRG Position */ 1109 #define TIMER_PWMSWBRK_BRKLTRG_Msk (0x1ul << TIMER_PWMSWBRK_BRKLTRG_Pos) /*!< TIMER_T::PWMSWBRK: BRKLTRG Mask */ 1110 1111 #define TIMER_PWMINTEN0_ZIEN_Pos (0) /*!< TIMER_T::PWMINTEN0: ZIEN Position */ 1112 #define TIMER_PWMINTEN0_ZIEN_Msk (0x1ul << TIMER_PWMINTEN0_ZIEN_Pos) /*!< TIMER_T::PWMINTEN0: ZIEN Mask */ 1113 1114 #define TIMER_PWMINTEN0_PIEN_Pos (1) /*!< TIMER_T::PWMINTEN0: PIEN Position */ 1115 #define TIMER_PWMINTEN0_PIEN_Msk (0x1ul << TIMER_PWMINTEN0_PIEN_Pos) /*!< TIMER_T::PWMINTEN0: PIEN Mask */ 1116 1117 #define TIMER_PWMINTEN0_CMPUIEN_Pos (2) /*!< TIMER_T::PWMINTEN0: CMPUIEN Position */ 1118 #define TIMER_PWMINTEN0_CMPUIEN_Msk (0x1ul << TIMER_PWMINTEN0_CMPUIEN_Pos) /*!< TIMER_T::PWMINTEN0: CMPUIEN Mask */ 1119 1120 #define TIMER_PWMINTEN0_CMPDIEN_Pos (3) /*!< TIMER_T::PWMINTEN0: CMPDIEN Position */ 1121 #define TIMER_PWMINTEN0_CMPDIEN_Msk (0x1ul << TIMER_PWMINTEN0_CMPDIEN_Pos) /*!< TIMER_T::PWMINTEN0: CMPDIEN Mask */ 1122 1123 #define TIMER_PWMINTEN1_BRKEIEN_Pos (0) /*!< TIMER_T::PWMINTEN1: BRKEIEN Position */ 1124 #define TIMER_PWMINTEN1_BRKEIEN_Msk (0x1ul << TIMER_PWMINTEN1_BRKEIEN_Pos) /*!< TIMER_T::PWMINTEN1: BRKEIEN Mask */ 1125 1126 #define TIMER_PWMINTEN1_BRKLIEN_Pos (8) /*!< TIMER_T::PWMINTEN1: BRKLIEN Position */ 1127 #define TIMER_PWMINTEN1_BRKLIEN_Msk (0x1ul << TIMER_PWMINTEN1_BRKLIEN_Pos) /*!< TIMER_T::PWMINTEN1: BRKLIEN Mask */ 1128 1129 #define TIMER_PWMINTSTS0_ZIF_Pos (0) /*!< TIMER_T::PWMINTSTS0: ZIF Position */ 1130 #define TIMER_PWMINTSTS0_ZIF_Msk (0x1ul << TIMER_PWMINTSTS0_ZIF_Pos) /*!< TIMER_T::PWMINTSTS0: ZIF Mask */ 1131 1132 #define TIMER_PWMINTSTS0_PIF_Pos (1) /*!< TIMER_T::PWMINTSTS0: PIF Position */ 1133 #define TIMER_PWMINTSTS0_PIF_Msk (0x1ul << TIMER_PWMINTSTS0_PIF_Pos) /*!< TIMER_T::PWMINTSTS0: PIF Mask */ 1134 1135 #define TIMER_PWMINTSTS0_CMPUIF_Pos (2) /*!< TIMER_T::PWMINTSTS0: CMPUIF Position */ 1136 #define TIMER_PWMINTSTS0_CMPUIF_Msk (0x1ul << TIMER_PWMINTSTS0_CMPUIF_Pos) /*!< TIMER_T::PWMINTSTS0: CMPUIF Mask */ 1137 1138 #define TIMER_PWMINTSTS0_CMPDIF_Pos (3) /*!< TIMER_T::PWMINTSTS0: CMPDIF Position */ 1139 #define TIMER_PWMINTSTS0_CMPDIF_Msk (0x1ul << TIMER_PWMINTSTS0_CMPDIF_Pos) /*!< TIMER_T::PWMINTSTS0: CMPDIF Mask */ 1140 1141 #define TIMER_PWMINTSTS1_BRKEIF0_Pos (0) /*!< TIMER_T::PWMINTSTS1: BRKEIF0 Position */ 1142 #define TIMER_PWMINTSTS1_BRKEIF0_Msk (0x1ul << TIMER_PWMINTSTS1_BRKEIF0_Pos) /*!< TIMER_T::PWMINTSTS1: BRKEIF0 Mask */ 1143 1144 #define TIMER_PWMINTSTS1_BRKEIF1_Pos (1) /*!< TIMER_T::PWMINTSTS1: BRKEIF1 Position */ 1145 #define TIMER_PWMINTSTS1_BRKEIF1_Msk (0x1ul << TIMER_PWMINTSTS1_BRKEIF1_Pos) /*!< TIMER_T::PWMINTSTS1: BRKEIF1 Mask */ 1146 1147 #define TIMER_PWMINTSTS1_BRKLIF0_Pos (8) /*!< TIMER_T::PWMINTSTS1: BRKLIF0 Position */ 1148 #define TIMER_PWMINTSTS1_BRKLIF0_Msk (0x1ul << TIMER_PWMINTSTS1_BRKLIF0_Pos) /*!< TIMER_T::PWMINTSTS1: BRKLIF0 Mask */ 1149 1150 #define TIMER_PWMINTSTS1_BRKLIF1_Pos (9) /*!< TIMER_T::PWMINTSTS1: BRKLIF1 Position */ 1151 #define TIMER_PWMINTSTS1_BRKLIF1_Msk (0x1ul << TIMER_PWMINTSTS1_BRKLIF1_Pos) /*!< TIMER_T::PWMINTSTS1: BRKLIF1 Mask */ 1152 1153 #define TIMER_PWMINTSTS1_BRKESTS0_Pos (16) /*!< TIMER_T::PWMINTSTS1: BRKESTS0 Position */ 1154 #define TIMER_PWMINTSTS1_BRKESTS0_Msk (0x1ul << TIMER_PWMINTSTS1_BRKESTS0_Pos) /*!< TIMER_T::PWMINTSTS1: BRKESTS0 Mask */ 1155 1156 #define TIMER_PWMINTSTS1_BRKESTS1_Pos (17) /*!< TIMER_T::PWMINTSTS1: BRKESTS1 Position */ 1157 #define TIMER_PWMINTSTS1_BRKESTS1_Msk (0x1ul << TIMER_PWMINTSTS1_BRKESTS1_Pos) /*!< TIMER_T::PWMINTSTS1: BRKESTS1 Mask */ 1158 1159 #define TIMER_PWMINTSTS1_BRKLSTS0_Pos (24) /*!< TIMER_T::PWMINTSTS1: BRKLSTS0 Position */ 1160 #define TIMER_PWMINTSTS1_BRKLSTS0_Msk (0x1ul << TIMER_PWMINTSTS1_BRKLSTS0_Pos) /*!< TIMER_T::PWMINTSTS1: BRKLSTS0 Mask */ 1161 1162 #define TIMER_PWMINTSTS1_BRKLSTS1_Pos (25) /*!< TIMER_T::PWMINTSTS1: BRKLSTS1 Position */ 1163 #define TIMER_PWMINTSTS1_BRKLSTS1_Msk (0x1ul << TIMER_PWMINTSTS1_BRKLSTS1_Pos) /*!< TIMER_T::PWMINTSTS1: BRKLSTS1 Mask */ 1164 1165 #define TIMER_PWMTRGCTL_TRGSEL_Pos (0) /*!< TIMER_T::PWMTRGCTL: TRGSEL Position */ 1166 #define TIMER_PWMTRGCTL_TRGSEL_Msk (0x7ul << TIMER_PWMTRGCTL_TRGSEL_Pos) /*!< TIMER_T::PWMTRGCTL: TRGSEL Mask */ 1167 1168 #define TIMER_PWMTRGCTL_TRGEADC_Pos (7) /*!< TIMER_T::PWMTRGCTL: TRGEADC Position */ 1169 #define TIMER_PWMTRGCTL_TRGEADC_Msk (0x1ul << TIMER_PWMTRGCTL_TRGEADC_Pos) /*!< TIMER_T::PWMTRGCTL: TRGEADC Mask */ 1170 1171 #define TIMER_PWMSCTL_SYNCMODE_Pos (0) /*!< TIMER_T::PWMSCTL: SYNCMODE Position */ 1172 #define TIMER_PWMSCTL_SYNCMODE_Msk (0x3ul << TIMER_PWMSCTL_SYNCMODE_Pos) /*!< TIMER_T::PWMSCTL: SYNCMODE Mask */ 1173 1174 #define TIMER_PWMSCTL_SYNCSRC_Pos (8) /*!< TIMER_T::PWMSCTL: SYNCSRC Position */ 1175 #define TIMER_PWMSCTL_SYNCSRC_Msk (0x1ul << TIMER_PWMSCTL_SYNCSRC_Pos) /*!< TIMER_T::PWMSCTL: SYNCSRC Mask */ 1176 1177 #define TIMER_PWMSTRG_STRGEN_Pos (0) /*!< TIMER_T::PWMSTRG: STRGEN Position */ 1178 #define TIMER_PWMSTRG_STRGEN_Msk (0x1ul << TIMER_PWMSTRG_STRGEN_Pos) /*!< TIMER_T::PWMSTRG: STRGEN Mask */ 1179 1180 #define TIMER_PWMSTATUS_CNTMAXF_Pos (0) /*!< TIMER_T::PWMSTATUS: CNTMAXF Position */ 1181 #define TIMER_PWMSTATUS_CNTMAXF_Msk (0x1ul << TIMER_PWMSTATUS_CNTMAXF_Pos) /*!< TIMER_T::PWMSTATUS: CNTMAXF Mask */ 1182 1183 #define TIMER_PWMSTATUS_EADCTRGF_Pos (16) /*!< TIMER_T::PWMSTATUS: EADCTRGF Position */ 1184 #define TIMER_PWMSTATUS_EADCTRGF_Msk (0x1ul << TIMER_PWMSTATUS_EADCTRGF_Pos) /*!< TIMER_T::PWMSTATUS: EADCTRGF Mask */ 1185 1186 #define TIMER_PWMPBUF_PBUF_Pos (0) /*!< TIMER_T::PWMPBUF: PBUF Position */ 1187 #define TIMER_PWMPBUF_PBUF_Msk (0xfffful << TIMER_PWMPBUF_PBUF_Pos) /*!< TIMER_T::PWMPBUF: PBUF Mask */ 1188 1189 #define TIMER_PWMCMPBUF_CMPBUF_Pos (0) /*!< TIMER_T::PWMCMPBUF: CMPBUF Position */ 1190 #define TIMER_PWMCMPBUF_CMPBUF_Msk (0xfffful << TIMER_PWMCMPBUF_CMPBUF_Pos) /*!< TIMER_T::PWMCMPBUF: CMPBUF Mask */ 1191 1192 #define TIMER_PWMIFA_IFACNT_Pos (0) /*!< TIMER_T::PWMIFA: IFACNT Position */ 1193 #define TIMER_PWMIFA_IFACNT_Msk (0xfffful << TIMER_PWMIFA_IFACNT_Pos) /*!< TIMER_T::PWMIFA: IFACNT Mask */ 1194 1195 #define TIMER_PWMIFA_STPMOD_Pos (24) /*!< TIMER_T::PWMIFA: STPMOD Position */ 1196 #define TIMER_PWMIFA_STPMOD_Msk (0x1ul << TIMER_PWMIFA_STPMOD_Pos) /*!< TIMER_T::PWMIFA: STPMOD Mask */ 1197 1198 #define TIMER_PWMIFA_IFASEL_Pos (28) /*!< TIMER_T::PWMIFA: IFASEL Position */ 1199 #define TIMER_PWMIFA_IFASEL_Msk (0x3ul << TIMER_PWMIFA_IFASEL_Pos) /*!< TIMER_T::PWMIFA: IFASEL Mask */ 1200 1201 #define TIMER_PWMIFA_IFAEN_Pos (31) /*!< TIMER_T::PWMIFA: IFAEN Position */ 1202 #define TIMER_PWMIFA_IFAEN_Msk (0x1ul << TIMER_PWMIFA_IFAEN_Pos) /*!< TIMER_T::PWMIFA: IFAEN Mask */ 1203 1204 #define TIMER_PWMAINTSTS_IFAIF_Pos (0) /*!< TIMER_T::PWMAINTSTS: IFAIF Position */ 1205 #define TIMER_PWMAINTSTS_IFAIF_Msk (0x1ul << TIMER_PWMAINTSTS_IFAIF_Pos) /*!< TIMER_T::PWMAINTSTS: IFAIF Mask */ 1206 1207 #define TIMER_PWMAINTEN_IFAIEN_Pos (0) /*!< TIMER_T::PWMAINTEN: IFAIEN Position */ 1208 #define TIMER_PWMAINTEN_IFAIEN_Msk (0x1ul << TIMER_PWMAINTEN_IFAIEN_Pos) /*!< TIMER_T::PWMAINTEN: IFAIEN Mask */ 1209 1210 #define TIMER_PWMAPDMACTL_APDMAEN_Pos (0) /*!< TIMER_T::PWMAPDMACTL: APDMAEN Position */ 1211 #define TIMER_PWMAPDMACTL_APDMAEN_Msk (0x1ul << TIMER_PWMAPDMACTL_APDMAEN_Pos) /*!< TIMER_T::PWMAPDMACTL: APDMAEN Mask */ 1212 1213 #define TIMER_PWMEXTETCTL_EXTETEN_Pos (0) /*!< TIMER_T::PWMEXTETCTL: EXTETEN Position */ 1214 #define TIMER_PWMEXTETCTL_EXTETEN_Msk (0x1ul << TIMER_PWMEXTETCTL_EXTETEN_Pos) /*!< TIMER_T::PWMEXTETCTL: EXTETEN Mask */ 1215 1216 #define TIMER_PWMEXTETCTL_CNTACTS_Pos (4) /*!< TIMER_T::PWMEXTETCTL: CNTACTS Position */ 1217 #define TIMER_PWMEXTETCTL_CNTACTS_Msk (0x3ul << TIMER_PWMEXTETCTL_CNTACTS_Pos) /*!< TIMER_T::PWMEXTETCTL: CNTACTS Mask */ 1218 1219 #define TIMER_PWMEXTETCTL_EXTTRGS_Pos (8) /*!< TIMER_T::PWMEXTETCTL: EXTTRGS Position */ 1220 #define TIMER_PWMEXTETCTL_EXTTRGS_Msk (0xful << TIMER_PWMEXTETCTL_EXTTRGS_Pos) /*!< TIMER_T::PWMEXTETCTL: EXTTRGS Mask */ 1221 1222 1223 /**@}*/ /* TIMER_CONST */ 1224 /**@}*/ /* end of TIMER register group */ 1225 /**@}*/ /* end of REGISTER group */ 1226 1227 #if defined ( __CC_ARM ) 1228 #pragma no_anon_unions 1229 #endif 1230 1231 #endif /* __TIMER_REG_H__ */ 1232