timer_reg.h 89 KB

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