hw_epwm.h 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248
  1. //###########################################################################
  2. //
  3. // FILE: hw_epwm.h
  4. //
  5. // TITLE: Definitions for the C28x EPWM registers.
  6. //
  7. //###########################################################################
  8. // $TI Release: F2837xD Support Library v3.05.00.00 $
  9. // $Release Date: Tue Jun 26 03:15:23 CDT 2018 $
  10. // $Copyright:
  11. // Copyright (C) 2013-2018 Texas Instruments Incorporated - http://www.ti.com/
  12. //
  13. // Redistribution and use in source and binary forms, with or without
  14. // modification, are permitted provided that the following conditions
  15. // are met:
  16. //
  17. // Redistributions of source code must retain the above copyright
  18. // notice, this list of conditions and the following disclaimer.
  19. //
  20. // Redistributions in binary form must reproduce the above copyright
  21. // notice, this list of conditions and the following disclaimer in the
  22. // documentation and/or other materials provided with the
  23. // distribution.
  24. //
  25. // Neither the name of Texas Instruments Incorporated nor the names of
  26. // its contributors may be used to endorse or promote products derived
  27. // from this software without specific prior written permission.
  28. //
  29. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  30. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  31. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  32. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  33. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  34. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  35. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  36. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  37. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  38. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  39. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  40. // $
  41. //###########################################################################
  42. #ifndef __HW_EPWM_H__
  43. #define __HW_EPWM_H__
  44. //*****************************************************************************
  45. //
  46. // The following are defines for the EPWM register offsets
  47. //
  48. //*****************************************************************************
  49. #define EPWM_O_TBCTL 0x0 // Time Base Control Register
  50. #define EPWM_O_TBCTL2 0x1 // Time Base Control Register 2
  51. #define EPWM_O_TBCTR 0x4 // Time Base Counter Register
  52. #define EPWM_O_TBSTS 0x5 // Time Base Status Register
  53. #define EPWM_O_CMPCTL 0x8 // Counter Compare Control
  54. // Register
  55. #define EPWM_O_CMPCTL2 0x9 // Counter Compare Control
  56. // Register 2
  57. #define EPWM_O_DBCTL 0xC // Dead-Band Generator Control
  58. // Register
  59. #define EPWM_O_DBCTL2 0xD // Dead-Band Generator Control
  60. // Register 2
  61. #define EPWM_O_AQCTL 0x10 // Action Qualifier Control
  62. // Register
  63. #define EPWM_O_AQTSRCSEL 0x11 // Action Qualifier Trigger Event
  64. // Source Select Register
  65. #define EPWM_O_PCCTL 0x14 // PWM Chopper Control Register
  66. #define EPWM_O_HRCNFG 0x20 // HRPWM Configuration Register
  67. #define EPWM_O_HRPWR 0x21 // HRPWM Power Register
  68. #define EPWM_O_HRMSTEP 0x26 // HRPWM MEP Step Register
  69. #define EPWM_O_HRPCTL 0x2D // High Resolution Period Control
  70. // Register
  71. #define EPWM_O_GLDCTL 0x34 // Global PWM Load Control
  72. // Register
  73. #define EPWM_O_GLDCFG 0x35 // Global PWM Load Config Register
  74. #define EPWM_O_XLINK 0x38 // EPWMx Link Register
  75. #define EPWM_O_AQCTLA 0x40 // Action Qualifier Control
  76. // Register For Output A
  77. #define EPWM_O_AQCTLA2 0x41 // Additional Action Qualifier
  78. // Control Register For Output A
  79. #define EPWM_O_AQCTLB 0x42 // Action Qualifier Control
  80. // Register For Output B
  81. #define EPWM_O_AQCTLB2 0x43 // Additional Action Qualifier
  82. // Control Register For Output B
  83. #define EPWM_O_AQSFRC 0x47 // Action Qualifier Software Force
  84. // Register
  85. #define EPWM_O_AQCSFRC 0x49 // Action Qualifier Continuous S/W
  86. // Force Register
  87. #define EPWM_O_DBREDHR 0x50 // Dead-Band Generator Rising Edge
  88. // Delay High Resolution Mirror
  89. // Register
  90. #define EPWM_O_DBRED 0x51 // Dead-Band Generator Rising Edge
  91. // Delay High Resolution Mirror
  92. // Register
  93. #define EPWM_O_DBFEDHR 0x52 // Dead-Band Generator Falling
  94. // Edge Delay High Resolution
  95. // Register
  96. #define EPWM_O_DBFED 0x53 // Dead-Band Generator Falling
  97. // Edge Delay Count Register
  98. #define EPWM_O_TBPHS 0x60 // Time Base Phase High
  99. #define EPWM_O_TBPRDHR 0x62 // Time Base Period High
  100. // Resolution Register
  101. #define EPWM_O_TBPRD 0x63 // Time Base Period Register
  102. #define EPWM_O_CMPA 0x6A // Counter Compare A Register
  103. #define EPWM_O_CMPB 0x6C // Compare B Register
  104. #define EPWM_O_CMPC 0x6F // Counter Compare C Register
  105. #define EPWM_O_CMPD 0x71 // Counter Compare D Register
  106. #define EPWM_O_GLDCTL2 0x74 // Global PWM Load Control
  107. // Register 2
  108. #define EPWM_O_TZSEL 0x80 // Trip Zone Select Register
  109. #define EPWM_O_TZDCSEL 0x82 // Trip Zone Digital Comparator
  110. // Select Register
  111. #define EPWM_O_TZCTL 0x84 // Trip Zone Control Register
  112. #define EPWM_O_TZCTL2 0x85 // Additional Trip Zone Control
  113. // Register
  114. #define EPWM_O_TZCTLDCA 0x86 // Trip Zone Control Register
  115. // Digital Compare A
  116. #define EPWM_O_TZCTLDCB 0x87 // Trip Zone Control Register
  117. // Digital Compare B
  118. #define EPWM_O_TZEINT 0x8D // Trip Zone Enable Interrupt
  119. // Register
  120. #define EPWM_O_TZFLG 0x93 // Trip Zone Flag Register
  121. #define EPWM_O_TZCBCFLG 0x94 // Trip Zone CBC Flag Register
  122. #define EPWM_O_TZOSTFLG 0x95 // Trip Zone OST Flag Register
  123. #define EPWM_O_TZCLR 0x97 // Trip Zone Clear Register
  124. #define EPWM_O_TZCBCCLR 0x98 // Trip Zone CBC Clear Register
  125. #define EPWM_O_TZOSTCLR 0x99 // Trip Zone OST Clear Register
  126. #define EPWM_O_TZFRC 0x9B // Trip Zone Force Register
  127. #define EPWM_O_ETSEL 0xA4 // Event Trigger Selection
  128. // Register
  129. #define EPWM_O_ETPS 0xA6 // Event Trigger Pre-Scale
  130. // Register
  131. #define EPWM_O_ETFLG 0xA8 // Event Trigger Flag Register
  132. #define EPWM_O_ETCLR 0xAA // Event Trigger Clear Register
  133. #define EPWM_O_ETFRC 0xAC // Event Trigger Force Register
  134. #define EPWM_O_ETINTPS 0xAE // Event-Trigger Interrupt
  135. // Pre-Scale Register
  136. #define EPWM_O_ETSOCPS 0xB0 // Event-Trigger SOC Pre-Scale
  137. // Register
  138. #define EPWM_O_ETCNTINITCTL 0xB2 // Event-Trigger Counter
  139. // Initialization Control
  140. // Register
  141. #define EPWM_O_ETCNTINIT 0xB4 // Event-Trigger Counter
  142. // Initialization Register
  143. #define EPWM_O_DCTRIPSEL 0xC0 // Digital Compare Trip Select
  144. // Register
  145. #define EPWM_O_DCACTL 0xC3 // Digital Compare A Control
  146. // Register
  147. #define EPWM_O_DCBCTL 0xC4 // Digital Compare B Control
  148. // Register
  149. #define EPWM_O_DCFCTL 0xC7 // Digital Compare Filter Control
  150. // Register
  151. #define EPWM_O_DCCAPCTL 0xC8 // Digital Compare Capture Control
  152. // Register
  153. #define EPWM_O_DCFOFFSET 0xC9 // Digital Compare Filter Offset
  154. // Register
  155. #define EPWM_O_DCFOFFSETCNT 0xCA // Digital Compare Filter Offset
  156. // Counter Register
  157. #define EPWM_O_DCFWINDOW 0xCB // Digital Compare Filter Window
  158. // Register
  159. #define EPWM_O_DCFWINDOWCNT 0xCC // Digital Compare Filter Window
  160. // Counter Register
  161. #define EPWM_O_DCCAP 0xCF // Digital Compare Counter Capture
  162. // Register
  163. #define EPWM_O_DCAHTRIPSEL 0xD2 // Digital Compare AH Trip Select
  164. #define EPWM_O_DCALTRIPSEL 0xD3 // Digital Compare AL Trip Select
  165. #define EPWM_O_DCBHTRIPSEL 0xD4 // Digital Compare BH Trip Select
  166. #define EPWM_O_DCBLTRIPSEL 0xD5 // Digital Compare BL Trip Select
  167. //*****************************************************************************
  168. //
  169. // The following are defines for the bit fields in the TBCTL register
  170. //
  171. //*****************************************************************************
  172. #define EPWM_TBCTL_CTRMODE_S 0
  173. #define EPWM_TBCTL_CTRMODE_M 0x3 // Counter Mode
  174. #define EPWM_TBCTL_PHSEN 0x4 // Phase Load Enable
  175. #define EPWM_TBCTL_PRDLD 0x8 // Active Period Load
  176. #define EPWM_TBCTL_SYNCOSEL_S 4
  177. #define EPWM_TBCTL_SYNCOSEL_M 0x30 // Sync Output Select
  178. #define EPWM_TBCTL_SWFSYNC 0x40 // Software Force Sync Pulse
  179. #define EPWM_TBCTL_HSPCLKDIV_S 7
  180. #define EPWM_TBCTL_HSPCLKDIV_M 0x380 // High Speed TBCLK Pre-scaler
  181. #define EPWM_TBCTL_CLKDIV_S 10
  182. #define EPWM_TBCTL_CLKDIV_M 0x1C00 // Time Base Clock Pre-scaler
  183. #define EPWM_TBCTL_PHSDIR 0x2000 // Phase Direction Bit
  184. #define EPWM_TBCTL_FREE_SOFT_S 14
  185. #define EPWM_TBCTL_FREE_SOFT_M 0xC000 // Emulation Mode Bits
  186. //*****************************************************************************
  187. //
  188. // The following are defines for the bit fields in the TBCTL2 register
  189. //
  190. //*****************************************************************************
  191. #define EPWM_TBCTL2_SELFCLRTRREM 0x20 // Self clear Translator reminder
  192. #define EPWM_TBCTL2_OSHTSYNCMODE 0x40 // One shot sync mode
  193. #define EPWM_TBCTL2_OSHTSYNC 0x80 // One shot sync
  194. #define EPWM_TBCTL2_SYNCOSELX_S 12
  195. #define EPWM_TBCTL2_SYNCOSELX_M 0x3000 // Syncout selection
  196. #define EPWM_TBCTL2_PRDLDSYNC_S 14
  197. #define EPWM_TBCTL2_PRDLDSYNC_M 0xC000 // PRD Shadow to Active Load on
  198. // SYNC Event
  199. //*****************************************************************************
  200. //
  201. // The following are defines for the bit fields in the TBCTR register
  202. //
  203. //*****************************************************************************
  204. #define EPWM_TBCTR_TBCTR_S 0
  205. #define EPWM_TBCTR_TBCTR_M 0xFFFF // Counter Value
  206. //*****************************************************************************
  207. //
  208. // The following are defines for the bit fields in the TBSTS register
  209. //
  210. //*****************************************************************************
  211. #define EPWM_TBSTS_CTRDIR 0x1 // Counter Direction Status
  212. #define EPWM_TBSTS_SYNCI 0x2 // External Input Sync Status
  213. #define EPWM_TBSTS_CTRMAX 0x4 // Counter Max Latched Status
  214. //*****************************************************************************
  215. //
  216. // The following are defines for the bit fields in the CMPCTL register
  217. //
  218. //*****************************************************************************
  219. #define EPWM_CMPCTL_LOADAMODE_S 0
  220. #define EPWM_CMPCTL_LOADAMODE_M 0x3 // Active Compare A Load
  221. #define EPWM_CMPCTL_LOADBMODE_S 2
  222. #define EPWM_CMPCTL_LOADBMODE_M 0xC // Active Compare B Load
  223. #define EPWM_CMPCTL_SHDWAMODE 0x10 // Compare A Register Block
  224. // Operating Mode
  225. #define EPWM_CMPCTL_SHDWBMODE 0x40 // Compare B Register Block
  226. // Operating Mode
  227. #define EPWM_CMPCTL_SHDWAFULL 0x100 // Compare A Shadow Register Full
  228. // Status
  229. #define EPWM_CMPCTL_SHDWBFULL 0x200 // Compare B Shadow Register Full
  230. // Status
  231. #define EPWM_CMPCTL_LOADASYNC_S 10
  232. #define EPWM_CMPCTL_LOADASYNC_M 0xC00 // Active Compare A Load on SYNC
  233. #define EPWM_CMPCTL_LOADBSYNC_S 12
  234. #define EPWM_CMPCTL_LOADBSYNC_M 0x3000 // Active Compare B Load on SYNC
  235. //*****************************************************************************
  236. //
  237. // The following are defines for the bit fields in the CMPCTL2 register
  238. //
  239. //*****************************************************************************
  240. #define EPWM_CMPCTL2_LOADCMODE_S 0
  241. #define EPWM_CMPCTL2_LOADCMODE_M 0x3 // Active Compare C Load
  242. #define EPWM_CMPCTL2_LOADDMODE_S 2
  243. #define EPWM_CMPCTL2_LOADDMODE_M 0xC // Active Compare D load
  244. #define EPWM_CMPCTL2_SHDWCMODE 0x10 // Compare C Block Operating Mode
  245. #define EPWM_CMPCTL2_SHDWDMODE 0x40 // Compare D Block Operating Mode
  246. #define EPWM_CMPCTL2_LOADCSYNC_S 10
  247. #define EPWM_CMPCTL2_LOADCSYNC_M 0xC00 // Active Compare C Load on SYNC
  248. #define EPWM_CMPCTL2_LOADDSYNC_S 12
  249. #define EPWM_CMPCTL2_LOADDSYNC_M 0x3000 // Active Compare D Load on SYNC
  250. //*****************************************************************************
  251. //
  252. // The following are defines for the bit fields in the DBCTL register
  253. //
  254. //*****************************************************************************
  255. #define EPWM_DBCTL_OUT_MODE_S 0
  256. #define EPWM_DBCTL_OUT_MODE_M 0x3 // Dead Band Output Mode Control
  257. #define EPWM_DBCTL_POLSEL_S 2
  258. #define EPWM_DBCTL_POLSEL_M 0xC // Polarity Select Control
  259. #define EPWM_DBCTL_IN_MODE_S 4
  260. #define EPWM_DBCTL_IN_MODE_M 0x30 // Dead Band Input Select Mode
  261. // Control
  262. #define EPWM_DBCTL_LOADREDMODE_S 6
  263. #define EPWM_DBCTL_LOADREDMODE_M 0xC0 // Active DBRED Load Mode
  264. #define EPWM_DBCTL_LOADFEDMODE_S 8
  265. #define EPWM_DBCTL_LOADFEDMODE_M 0x300 // Active DBFED Load Mode
  266. #define EPWM_DBCTL_SHDWDBREDMODE 0x400 // DBRED Block Operating Mode
  267. #define EPWM_DBCTL_SHDWDBFEDMODE 0x800 // DBFED Block Operating Mode
  268. #define EPWM_DBCTL_OUTSWAP_S 12
  269. #define EPWM_DBCTL_OUTSWAP_M 0x3000 // Dead Band Output Swap Control
  270. #define EPWM_DBCTL_DEDB_MODE 0x4000 // Dead Band Dual-Edge B Mode
  271. // Control
  272. #define EPWM_DBCTL_HALFCYCLE 0x8000 // Half Cycle Clocking Enable
  273. //*****************************************************************************
  274. //
  275. // The following are defines for the bit fields in the DBCTL2 register
  276. //
  277. //*****************************************************************************
  278. #define EPWM_DBCTL2_LOADDBCTLMODE_S 0
  279. #define EPWM_DBCTL2_LOADDBCTLMODE_M 0x3 // DBCTL Load from Shadow Mode
  280. // Select
  281. #define EPWM_DBCTL2_SHDWDBCTLMODE 0x4 // DBCTL Load mode Select
  282. //*****************************************************************************
  283. //
  284. // The following are defines for the bit fields in the AQCTL register
  285. //
  286. //*****************************************************************************
  287. #define EPWM_AQCTL_LDAQAMODE_S 0
  288. #define EPWM_AQCTL_LDAQAMODE_M 0x3 // Action Qualifier A Load Select
  289. #define EPWM_AQCTL_LDAQBMODE_S 2
  290. #define EPWM_AQCTL_LDAQBMODE_M 0xC // Action Qualifier B Load Select
  291. #define EPWM_AQCTL_SHDWAQAMODE 0x10 // Action Qualifer A Operating
  292. // Mode
  293. #define EPWM_AQCTL_SHDWAQBMODE 0x40 // Action Qualifier B Operating
  294. // Mode
  295. #define EPWM_AQCTL_LDAQASYNC_S 8
  296. #define EPWM_AQCTL_LDAQASYNC_M 0x300 // AQCTLA Register Load on SYNC
  297. #define EPWM_AQCTL_LDAQBSYNC_S 10
  298. #define EPWM_AQCTL_LDAQBSYNC_M 0xC00 // AQCTLB Register Load on SYNC
  299. //*****************************************************************************
  300. //
  301. // The following are defines for the bit fields in the AQTSRCSEL register
  302. //
  303. //*****************************************************************************
  304. #define EPWM_AQTSRCSEL_T1SEL_S 0
  305. #define EPWM_AQTSRCSEL_T1SEL_M 0xF // T1 Event Source Select Bits
  306. #define EPWM_AQTSRCSEL_T2SEL_S 4
  307. #define EPWM_AQTSRCSEL_T2SEL_M 0xF0 // T2 Event Source Select Bits
  308. //*****************************************************************************
  309. //
  310. // The following are defines for the bit fields in the PCCTL register
  311. //
  312. //*****************************************************************************
  313. #define EPWM_PCCTL_CHPEN 0x1 // PWM chopping enable
  314. #define EPWM_PCCTL_OSHTWTH_S 1
  315. #define EPWM_PCCTL_OSHTWTH_M 0x1E // One-shot pulse width
  316. #define EPWM_PCCTL_CHPFREQ_S 5
  317. #define EPWM_PCCTL_CHPFREQ_M 0xE0 // Chopping clock frequency
  318. #define EPWM_PCCTL_CHPDUTY_S 8
  319. #define EPWM_PCCTL_CHPDUTY_M 0x700 // Chopping clock Duty cycle
  320. //*****************************************************************************
  321. //
  322. // The following are defines for the bit fields in the HRCNFG register
  323. //
  324. //*****************************************************************************
  325. #define EPWM_HRCNFG_EDGMODE_S 0
  326. #define EPWM_HRCNFG_EDGMODE_M 0x3 // ePWMxA Edge Mode Select Bits
  327. #define EPWM_HRCNFG_CTLMODE 0x4 // ePWMxA Control Mode Select Bits
  328. #define EPWM_HRCNFG_HRLOAD_S 3
  329. #define EPWM_HRCNFG_HRLOAD_M 0x18 // ePWMxA Shadow Mode Select Bits
  330. #define EPWM_HRCNFG_SELOUTB 0x20 // EPWMB Output Selection Bit
  331. #define EPWM_HRCNFG_AUTOCONV 0x40 // Autoconversion Bit
  332. #define EPWM_HRCNFG_SWAPAB 0x80 // Swap EPWMA and EPWMB Outputs
  333. // Bit
  334. #define EPWM_HRCNFG_EDGMODEB_S 8
  335. #define EPWM_HRCNFG_EDGMODEB_M 0x300 // ePWMxB Edge Mode Select Bits
  336. #define EPWM_HRCNFG_CTLMODEB 0x400 // ePWMxB Control Mode Select Bits
  337. #define EPWM_HRCNFG_HRLOADB_S 11
  338. #define EPWM_HRCNFG_HRLOADB_M 0x1800 // ePWMxB Shadow Mode Select Bits
  339. //*****************************************************************************
  340. //
  341. // The following are defines for the bit fields in the HRPWR register
  342. //
  343. //*****************************************************************************
  344. #define EPWM_HRPWR_CALPWRON 0x8000 // Calibration Power On
  345. //*****************************************************************************
  346. //
  347. // The following are defines for the bit fields in the HRMSTEP register
  348. //
  349. //*****************************************************************************
  350. #define EPWM_HRMSTEP_HRMSTEP_S 0
  351. #define EPWM_HRMSTEP_HRMSTEP_M 0xFF // High Resolution Micro Step
  352. // Value
  353. //*****************************************************************************
  354. //
  355. // The following are defines for the bit fields in the HRPCTL register
  356. //
  357. //*****************************************************************************
  358. #define EPWM_HRPCTL_HRPE 0x1 // High Resolution Period Enable
  359. #define EPWM_HRPCTL_TBPHSHRLOADE 0x4 // TBPHSHR Load Enable
  360. #define EPWM_HRPCTL_PWMSYNCSELX_S 4
  361. #define EPWM_HRPCTL_PWMSYNCSELX_M 0x70 // PWMSYNCX Source Select Bit:
  362. //*****************************************************************************
  363. //
  364. // The following are defines for the bit fields in the GLDCTL register
  365. //
  366. //*****************************************************************************
  367. #define EPWM_GLDCTL_GLD 0x1 // Global Shadow to Active load
  368. // event control
  369. #define EPWM_GLDCTL_GLDMODE_S 1
  370. #define EPWM_GLDCTL_GLDMODE_M 0x1E // Shadow to Active Global Load
  371. // Pulse Selection
  372. #define EPWM_GLDCTL_OSHTMODE 0x20 // One Shot Load mode control bit
  373. #define EPWM_GLDCTL_GLDPRD_S 7
  374. #define EPWM_GLDCTL_GLDPRD_M 0x380 // Global Reload Strobe Period
  375. // Select Register
  376. #define EPWM_GLDCTL_GLDCNT_S 10
  377. #define EPWM_GLDCTL_GLDCNT_M 0x1C00 // Global Reload Strobe Counter
  378. // Register
  379. //*****************************************************************************
  380. //
  381. // The following are defines for the bit fields in the GLDCFG register
  382. //
  383. //*****************************************************************************
  384. #define EPWM_GLDCFG_TBPRD_TBPRDHR 0x1 // Global load event configuration
  385. // for TBPRD:TBPRDHR
  386. #define EPWM_GLDCFG_CMPA_CMPAHR 0x2 // Global load event configuration
  387. // for CMPA:CMPAHR
  388. #define EPWM_GLDCFG_CMPB_CMPBHR 0x4 // Global load event configuration
  389. // for CMPB:CMPBHR
  390. #define EPWM_GLDCFG_CMPC 0x8 // Global load event configuration
  391. // for CMPC
  392. #define EPWM_GLDCFG_CMPD 0x10 // Global load event configuration
  393. // for CMPD
  394. #define EPWM_GLDCFG_DBRED_DBREDHR 0x20 // Global load event configuration
  395. // for DBRED:DBREDHR
  396. #define EPWM_GLDCFG_DBFED_DBFEDHR 0x40 // Global load event configuration
  397. // for DBFED:DBFEDHR
  398. #define EPWM_GLDCFG_DBCTL 0x80 // Global load event configuration
  399. // for DBCTL
  400. #define EPWM_GLDCFG_AQCTLA_AQCTLA2 0x100 // Global load event configuration
  401. // for AQCTLA/A2
  402. #define EPWM_GLDCFG_AQCTLB_AQCTLB2 0x200 // Global load event configuration
  403. // for AQCTLB/B2
  404. #define EPWM_GLDCFG_AQCSFRC 0x400 // Global load event configuration
  405. // for AQCSFRC
  406. //*****************************************************************************
  407. //
  408. // The following are defines for the bit fields in the EPWMXLINK register
  409. //
  410. //*****************************************************************************
  411. #define EPWM_XLINK_TBPRDLINK_S 0
  412. #define EPWM_XLINK_TBPRDLINK_M 0xF // TBPRD:TBPRDHR Link
  413. #define EPWM_XLINK_CMPALINK_S 4
  414. #define EPWM_XLINK_CMPALINK_M 0xF0 // CMPA:CMPAHR Link
  415. #define EPWM_XLINK_CMPBLINK_S 8
  416. #define EPWM_XLINK_CMPBLINK_M 0xF00 // CMPB:CMPBHR Link
  417. #define EPWM_XLINK_CMPCLINK_S 12
  418. #define EPWM_XLINK_CMPCLINK_M 0xF000 // CMPC Link
  419. #define EPWM_XLINK_CMPDLINK_S 16
  420. #define EPWM_XLINK_CMPDLINK_M 0xF0000 // CMPD Link
  421. #define EPWM_XLINK_GLDCTL2LINK_S 28
  422. #define EPWM_XLINK_GLDCTL2LINK_M 0xF0000000 // GLDCTL2 Link
  423. //*****************************************************************************
  424. //
  425. // The following are defines for the bit fields in the AQCTLA register
  426. //
  427. //*****************************************************************************
  428. #define EPWM_AQCTLA_ZRO_S 0
  429. #define EPWM_AQCTLA_ZRO_M 0x3 // Action Counter = Zero
  430. #define EPWM_AQCTLA_PRD_S 2
  431. #define EPWM_AQCTLA_PRD_M 0xC // Action Counter = Period
  432. #define EPWM_AQCTLA_CAU_S 4
  433. #define EPWM_AQCTLA_CAU_M 0x30 // Action Counter = Compare A Up
  434. #define EPWM_AQCTLA_CAD_S 6
  435. #define EPWM_AQCTLA_CAD_M 0xC0 // Action Counter = Compare A Down
  436. #define EPWM_AQCTLA_CBU_S 8
  437. #define EPWM_AQCTLA_CBU_M 0x300 // Action Counter = Compare B Up
  438. #define EPWM_AQCTLA_CBD_S 10
  439. #define EPWM_AQCTLA_CBD_M 0xC00 // Action Counter = Compare B Down
  440. //*****************************************************************************
  441. //
  442. // The following are defines for the bit fields in the AQCTLA2 register
  443. //
  444. //*****************************************************************************
  445. #define EPWM_AQCTLA2_T1U_S 0
  446. #define EPWM_AQCTLA2_T1U_M 0x3 // Action when event occurs on T1
  447. // in UP-Count
  448. #define EPWM_AQCTLA2_T1D_S 2
  449. #define EPWM_AQCTLA2_T1D_M 0xC // Action when event occurs on T1
  450. // in DOWN-Count
  451. #define EPWM_AQCTLA2_T2U_S 4
  452. #define EPWM_AQCTLA2_T2U_M 0x30 // Action when event occurs on T2
  453. // in UP-Count
  454. #define EPWM_AQCTLA2_T2D_S 6
  455. #define EPWM_AQCTLA2_T2D_M 0xC0 // Action when event occurs on T2
  456. // in DOWN-Count
  457. //*****************************************************************************
  458. //
  459. // The following are defines for the bit fields in the AQCTLB register
  460. //
  461. //*****************************************************************************
  462. #define EPWM_AQCTLB_ZRO_S 0
  463. #define EPWM_AQCTLB_ZRO_M 0x3 // Action Counter = Zero
  464. #define EPWM_AQCTLB_PRD_S 2
  465. #define EPWM_AQCTLB_PRD_M 0xC // Action Counter = Period
  466. #define EPWM_AQCTLB_CAU_S 4
  467. #define EPWM_AQCTLB_CAU_M 0x30 // Action Counter = Compare A Up
  468. #define EPWM_AQCTLB_CAD_S 6
  469. #define EPWM_AQCTLB_CAD_M 0xC0 // Action Counter = Compare A Down
  470. #define EPWM_AQCTLB_CBU_S 8
  471. #define EPWM_AQCTLB_CBU_M 0x300 // Action Counter = Compare B Up
  472. #define EPWM_AQCTLB_CBD_S 10
  473. #define EPWM_AQCTLB_CBD_M 0xC00 // Action Counter = Compare B Down
  474. //*****************************************************************************
  475. //
  476. // The following are defines for the bit fields in the AQCTLB2 register
  477. //
  478. //*****************************************************************************
  479. #define EPWM_AQCTLB2_T1U_S 0
  480. #define EPWM_AQCTLB2_T1U_M 0x3 // Action when event occurs on T1
  481. // in UP-Count
  482. #define EPWM_AQCTLB2_T1D_S 2
  483. #define EPWM_AQCTLB2_T1D_M 0xC // Action when event occurs on T1
  484. // in DOWN-Count
  485. #define EPWM_AQCTLB2_T2U_S 4
  486. #define EPWM_AQCTLB2_T2U_M 0x30 // Action when event occurs on T2
  487. // in UP-Count
  488. #define EPWM_AQCTLB2_T2D_S 6
  489. #define EPWM_AQCTLB2_T2D_M 0xC0 // Action when event occurs on T2
  490. // in DOWN-Count
  491. //*****************************************************************************
  492. //
  493. // The following are defines for the bit fields in the AQSFRC register
  494. //
  495. //*****************************************************************************
  496. #define EPWM_AQSFRC_ACTSFA_S 0
  497. #define EPWM_AQSFRC_ACTSFA_M 0x3 // Action when One-time SW Force A
  498. // Invoked
  499. #define EPWM_AQSFRC_OTSFA 0x4 // One-time SW Force A Output
  500. #define EPWM_AQSFRC_ACTSFB_S 3
  501. #define EPWM_AQSFRC_ACTSFB_M 0x18 // Action when One-time SW Force B
  502. // Invoked
  503. #define EPWM_AQSFRC_OTSFB 0x20 // One-time SW Force A Output
  504. #define EPWM_AQSFRC_RLDCSF_S 6
  505. #define EPWM_AQSFRC_RLDCSF_M 0xC0 // Reload from Shadow Options
  506. //*****************************************************************************
  507. //
  508. // The following are defines for the bit fields in the AQCSFRC register
  509. //
  510. //*****************************************************************************
  511. #define EPWM_AQCSFRC_CSFA_S 0
  512. #define EPWM_AQCSFRC_CSFA_M 0x3 // Continuous Software Force on
  513. // output A
  514. #define EPWM_AQCSFRC_CSFB_S 2
  515. #define EPWM_AQCSFRC_CSFB_M 0xC // Continuous Software Force on
  516. // output B
  517. //*****************************************************************************
  518. //
  519. // The following are defines for the bit fields in the DBREDHR register
  520. //
  521. //*****************************************************************************
  522. #define EPWM_DBREDHR_DBREDHR_S 9
  523. #define EPWM_DBREDHR_DBREDHR_M 0xFE00 // DBREDHR High Resolution Bits
  524. //*****************************************************************************
  525. //
  526. // The following are defines for the bit fields in the DBRED register
  527. //
  528. //*****************************************************************************
  529. #define EPWM_DBRED_DBRED_S 0
  530. #define EPWM_DBRED_DBRED_M 0xFFFF // Rising edge delay value
  531. //*****************************************************************************
  532. //
  533. // The following are defines for the bit fields in the DBFEDHR register
  534. //
  535. //*****************************************************************************
  536. #define EPWM_DBFEDHR_DBFEDHR_S 9
  537. #define EPWM_DBFEDHR_DBFEDHR_M 0xFE00 // DBFEDHR High Resolution Bits
  538. //*****************************************************************************
  539. //
  540. // The following are defines for the bit fields in the DBFED register
  541. //
  542. //*****************************************************************************
  543. #define EPWM_DBFED_DBFED_S 0
  544. #define EPWM_DBFED_DBFED_M 0xFFFF // Falling edge delay value
  545. //*****************************************************************************
  546. //
  547. // The following are defines for the bit fields in the TBPHS register
  548. //
  549. //*****************************************************************************
  550. #define EPWM_TBPHS_TBPHSHR_S 0
  551. #define EPWM_TBPHS_TBPHSHR_M 0xFFFF // Extension Register for HRPWM
  552. // Phase (8-bits)
  553. #define EPWM_TBPHS_TBPHS_S 16
  554. #define EPWM_TBPHS_TBPHS_M 0xFFFF0000 // Phase Offset Register
  555. //*****************************************************************************
  556. //
  557. // The following are defines for the bit fields in the TBPRDHR register
  558. //
  559. //*****************************************************************************
  560. #define EPWM_TBPRDHR_TBPRDHR_S 0
  561. #define EPWM_TBPRDHR_TBPRDHR_M 0xFFFF // High res Time base period
  562. // register
  563. //*****************************************************************************
  564. //
  565. // The following are defines for the bit fields in the TBPRD register
  566. //
  567. //*****************************************************************************
  568. #define EPWM_TBPRD_TBPRD_S 0
  569. #define EPWM_TBPRD_TBPRD_M 0xFFFF // Time base period register
  570. //*****************************************************************************
  571. //
  572. // The following are defines for the bit fields in the CMPA register
  573. //
  574. //*****************************************************************************
  575. #define EPWM_CMPA_CMPAHR_S 0
  576. #define EPWM_CMPA_CMPAHR_M 0xFFFF // Compare A HRPWM Extension
  577. // Register
  578. #define EPWM_CMPA_CMPA_S 16
  579. #define EPWM_CMPA_CMPA_M 0xFFFF0000 // Compare A Register
  580. //*****************************************************************************
  581. //
  582. // The following are defines for the bit fields in the CMPB register
  583. //
  584. //*****************************************************************************
  585. #define EPWM_CMPB_CMPB_S 16
  586. #define EPWM_CMPB_CMPB_M 0xFFFF0000 // Compare B Register
  587. //*****************************************************************************
  588. //
  589. // The following are defines for the bit fields in the CMPC register
  590. //
  591. //*****************************************************************************
  592. #define EPWM_CMPC_CMPC_S 0
  593. #define EPWM_CMPC_CMPC_M 0xFFFF // Compare C Register
  594. //*****************************************************************************
  595. //
  596. // The following are defines for the bit fields in the CMPD register
  597. //
  598. //*****************************************************************************
  599. #define EPWM_CMPD_CMPD_S 0
  600. #define EPWM_CMPD_CMPD_M 0xFFFF // Compare D Register
  601. //*****************************************************************************
  602. //
  603. // The following are defines for the bit fields in the GLDCTL2 register
  604. //
  605. //*****************************************************************************
  606. #define EPWM_GLDCTL2_OSHTLD 0x1 // Enable reload event in one shot
  607. // mode
  608. #define EPWM_GLDCTL2_GFRCLD 0x2 // Force reload event in one shot
  609. // mode
  610. //*****************************************************************************
  611. //
  612. // The following are defines for the bit fields in the TZSEL register
  613. //
  614. //*****************************************************************************
  615. #define EPWM_TZSEL_CBC1 0x1 // TZ1 CBC select
  616. #define EPWM_TZSEL_CBC2 0x2 // TZ2 CBC select
  617. #define EPWM_TZSEL_CBC3 0x4 // TZ3 CBC select
  618. #define EPWM_TZSEL_CBC4 0x8 // TZ4 CBC select
  619. #define EPWM_TZSEL_CBC5 0x10 // TZ5 CBC select
  620. #define EPWM_TZSEL_CBC6 0x20 // TZ6 CBC select
  621. #define EPWM_TZSEL_DCAEVT2 0x40 // DCAEVT2 CBC select
  622. #define EPWM_TZSEL_DCBEVT2 0x80 // DCBEVT2 CBC select
  623. #define EPWM_TZSEL_OSHT1 0x100 // One-shot TZ1 select
  624. #define EPWM_TZSEL_OSHT2 0x200 // One-shot TZ2 select
  625. #define EPWM_TZSEL_OSHT3 0x400 // One-shot TZ3 select
  626. #define EPWM_TZSEL_OSHT4 0x800 // One-shot TZ4 select
  627. #define EPWM_TZSEL_OSHT5 0x1000 // One-shot TZ5 select
  628. #define EPWM_TZSEL_OSHT6 0x2000 // One-shot TZ6 select
  629. #define EPWM_TZSEL_DCAEVT1 0x4000 // One-shot DCAEVT1 select
  630. #define EPWM_TZSEL_DCBEVT1 0x8000 // One-shot DCBEVT1 select
  631. //*****************************************************************************
  632. //
  633. // The following are defines for the bit fields in the TZDCSEL register
  634. //
  635. //*****************************************************************************
  636. #define EPWM_TZDCSEL_DCAEVT1_S 0
  637. #define EPWM_TZDCSEL_DCAEVT1_M 0x7 // Digital Compare Output A Event
  638. // 1
  639. #define EPWM_TZDCSEL_DCAEVT2_S 3
  640. #define EPWM_TZDCSEL_DCAEVT2_M 0x38 // Digital Compare Output A Event
  641. // 2
  642. #define EPWM_TZDCSEL_DCBEVT1_S 6
  643. #define EPWM_TZDCSEL_DCBEVT1_M 0x1C0 // Digital Compare Output B Event
  644. // 1
  645. #define EPWM_TZDCSEL_DCBEVT2_S 9
  646. #define EPWM_TZDCSEL_DCBEVT2_M 0xE00 // Digital Compare Output B Event
  647. // 2
  648. //*****************************************************************************
  649. //
  650. // The following are defines for the bit fields in the TZCTL register
  651. //
  652. //*****************************************************************************
  653. #define EPWM_TZCTL_TZA_S 0
  654. #define EPWM_TZCTL_TZA_M 0x3 // TZ1 to TZ6 Trip Action On
  655. // EPWMxA
  656. #define EPWM_TZCTL_TZB_S 2
  657. #define EPWM_TZCTL_TZB_M 0xC // TZ1 to TZ6 Trip Action On
  658. // EPWMxB
  659. #define EPWM_TZCTL_DCAEVT1_S 4
  660. #define EPWM_TZCTL_DCAEVT1_M 0x30 // EPWMxA action on DCAEVT1
  661. #define EPWM_TZCTL_DCAEVT2_S 6
  662. #define EPWM_TZCTL_DCAEVT2_M 0xC0 // EPWMxA action on DCAEVT2
  663. #define EPWM_TZCTL_DCBEVT1_S 8
  664. #define EPWM_TZCTL_DCBEVT1_M 0x300 // EPWMxB action on DCBEVT1
  665. #define EPWM_TZCTL_DCBEVT2_S 10
  666. #define EPWM_TZCTL_DCBEVT2_M 0xC00 // EPWMxB action on DCBEVT2
  667. //*****************************************************************************
  668. //
  669. // The following are defines for the bit fields in the TZCTL2 register
  670. //
  671. //*****************************************************************************
  672. #define EPWM_TZCTL2_TZAU_S 0
  673. #define EPWM_TZCTL2_TZAU_M 0x7 // Trip Action On EPWMxA while
  674. // Count direction is UP
  675. #define EPWM_TZCTL2_TZAD_S 3
  676. #define EPWM_TZCTL2_TZAD_M 0x38 // Trip Action On EPWMxA while
  677. // Count direction is DOWN
  678. #define EPWM_TZCTL2_TZBU_S 6
  679. #define EPWM_TZCTL2_TZBU_M 0x1C0 // Trip Action On EPWMxB while
  680. // Count direction is UP
  681. #define EPWM_TZCTL2_TZBD_S 9
  682. #define EPWM_TZCTL2_TZBD_M 0xE00 // Trip Action On EPWMxB while
  683. // Count direction is DOWN
  684. #define EPWM_TZCTL2_ETZE 0x8000 // TZCTL2 Enable
  685. //*****************************************************************************
  686. //
  687. // The following are defines for the bit fields in the TZCTLDCA register
  688. //
  689. //*****************************************************************************
  690. #define EPWM_TZCTLDCA_DCAEVT1U_S 0
  691. #define EPWM_TZCTLDCA_DCAEVT1U_M 0x7 // DCAEVT1 Action On EPWMxA while
  692. // Count direction is UP
  693. #define EPWM_TZCTLDCA_DCAEVT1D_S 3
  694. #define EPWM_TZCTLDCA_DCAEVT1D_M 0x38 // DCAEVT1 Action On EPWMxA while
  695. // Count direction is DOWN
  696. #define EPWM_TZCTLDCA_DCAEVT2U_S 6
  697. #define EPWM_TZCTLDCA_DCAEVT2U_M 0x1C0 // DCAEVT2 Action On EPWMxA while
  698. // Count direction is UP
  699. #define EPWM_TZCTLDCA_DCAEVT2D_S 9
  700. #define EPWM_TZCTLDCA_DCAEVT2D_M 0xE00 // DCAEVT2 Action On EPWMxA while
  701. // Count direction is DOWN
  702. //*****************************************************************************
  703. //
  704. // The following are defines for the bit fields in the TZCTLDCB register
  705. //
  706. //*****************************************************************************
  707. #define EPWM_TZCTLDCB_DCBEVT1U_S 0
  708. #define EPWM_TZCTLDCB_DCBEVT1U_M 0x7 // DCBEVT1 Action On EPWMxA while
  709. // Count direction is UP
  710. #define EPWM_TZCTLDCB_DCBEVT1D_S 3
  711. #define EPWM_TZCTLDCB_DCBEVT1D_M 0x38 // DCBEVT1 Action On EPWMxA while
  712. // Count direction is DOWN
  713. #define EPWM_TZCTLDCB_DCBEVT2U_S 6
  714. #define EPWM_TZCTLDCB_DCBEVT2U_M 0x1C0 // DCBEVT2 Action On EPWMxA while
  715. // Count direction is UP
  716. #define EPWM_TZCTLDCB_DCBEVT2D_S 9
  717. #define EPWM_TZCTLDCB_DCBEVT2D_M 0xE00 // DCBEVT2 Action On EPWMxA while
  718. // Count direction is DOWN
  719. //*****************************************************************************
  720. //
  721. // The following are defines for the bit fields in the TZEINT register
  722. //
  723. //*****************************************************************************
  724. #define EPWM_TZEINT_CBC 0x2 // Trip Zones Cycle By Cycle Int
  725. // Enable
  726. #define EPWM_TZEINT_OST 0x4 // Trip Zones One Shot Int Enable
  727. #define EPWM_TZEINT_DCAEVT1 0x8 // Digital Compare A Event 1 Int
  728. // Enable
  729. #define EPWM_TZEINT_DCAEVT2 0x10 // Digital Compare A Event 2 Int
  730. // Enable
  731. #define EPWM_TZEINT_DCBEVT1 0x20 // Digital Compare B Event 1 Int
  732. // Enable
  733. #define EPWM_TZEINT_DCBEVT2 0x40 // Digital Compare B Event 2 Int
  734. // Enable
  735. //*****************************************************************************
  736. //
  737. // The following are defines for the bit fields in the TZFLG register
  738. //
  739. //*****************************************************************************
  740. #define EPWM_TZFLG_INT 0x1 // Global Int Status Flag
  741. #define EPWM_TZFLG_CBC 0x2 // Trip Zones Cycle By Cycle Flag
  742. #define EPWM_TZFLG_OST 0x4 // Trip Zones One Shot Flag
  743. #define EPWM_TZFLG_DCAEVT1 0x8 // Digital Compare A Event 1 Flag
  744. #define EPWM_TZFLG_DCAEVT2 0x10 // Digital Compare A Event 2 Flag
  745. #define EPWM_TZFLG_DCBEVT1 0x20 // Digital Compare B Event 1 Flag
  746. #define EPWM_TZFLG_DCBEVT2 0x40 // Digital Compare B Event 2 Flag
  747. //*****************************************************************************
  748. //
  749. // The following are defines for the bit fields in the TZCBCFLG register
  750. //
  751. //*****************************************************************************
  752. #define EPWM_TZCBCFLG_CBC1 0x1 // Latched Status Flag for CBC1
  753. // Trip Latch
  754. #define EPWM_TZCBCFLG_CBC2 0x2 // Latched Status Flag for CBC2
  755. // Trip Latch
  756. #define EPWM_TZCBCFLG_CBC3 0x4 // Latched Status Flag for CBC3
  757. // Trip Latch
  758. #define EPWM_TZCBCFLG_CBC4 0x8 // Latched Status Flag for CBC4
  759. // Trip Latch
  760. #define EPWM_TZCBCFLG_CBC5 0x10 // Latched Status Flag for CBC5
  761. // Trip Latch
  762. #define EPWM_TZCBCFLG_CBC6 0x20 // Latched Status Flag for CBC6
  763. // Trip Latch
  764. #define EPWM_TZCBCFLG_DCAEVT2 0x40 // Latched Status Flag for Digital
  765. // Compare Output A Event 2
  766. #define EPWM_TZCBCFLG_DCBEVT2 0x80 // Latched Status Flag for Digital
  767. // Compare Output B Event 2
  768. //*****************************************************************************
  769. //
  770. // The following are defines for the bit fields in the TZOSTFLG register
  771. //
  772. //*****************************************************************************
  773. #define EPWM_TZOSTFLG_OST1 0x1 // Latched Status Flag for OST1
  774. // Trip Latch
  775. #define EPWM_TZOSTFLG_OST2 0x2 // Latched Status Flag for OST2
  776. // Trip Latch
  777. #define EPWM_TZOSTFLG_OST3 0x4 // Latched Status Flag for OST3
  778. // Trip Latch
  779. #define EPWM_TZOSTFLG_OST4 0x8 // Latched Status Flag for OST4
  780. // Trip Latch
  781. #define EPWM_TZOSTFLG_OST5 0x10 // Latched Status Flag for OST5
  782. // Trip Latch
  783. #define EPWM_TZOSTFLG_OST6 0x20 // Latched Status Flag for OST6
  784. // Trip Latch
  785. #define EPWM_TZOSTFLG_DCAEVT2 0x40 // Latched Status Flag for Digital
  786. // Compare Output A Event 1
  787. #define EPWM_TZOSTFLG_DCBEVT2 0x80 // Latched Status Flag for Digital
  788. // Compare Output B Event 1
  789. //*****************************************************************************
  790. //
  791. // The following are defines for the bit fields in the TZCLR register
  792. //
  793. //*****************************************************************************
  794. #define EPWM_TZCLR_INT 0x1 // Global Interrupt Clear Flag
  795. #define EPWM_TZCLR_CBC 0x2 // Cycle-By-Cycle Flag Clear
  796. #define EPWM_TZCLR_OST 0x4 // One-Shot Flag Clear
  797. #define EPWM_TZCLR_DCAEVT1 0x8 // DCAVET1 Flag Clear
  798. #define EPWM_TZCLR_DCAEVT2 0x10 // DCAEVT2 Flag Clear
  799. #define EPWM_TZCLR_DCBEVT1 0x20 // DCBEVT1 Flag Clear
  800. #define EPWM_TZCLR_DCBEVT2 0x40 // DCBEVT2 Flag Clear
  801. #define EPWM_TZCLR_CBCPULSE_S 14
  802. #define EPWM_TZCLR_CBCPULSE_M 0xC000 // Clear Pulse for CBC Trip Latch
  803. //*****************************************************************************
  804. //
  805. // The following are defines for the bit fields in the TZCBCCLR register
  806. //
  807. //*****************************************************************************
  808. #define EPWM_TZCBCCLR_CBC1 0x1 // Clear Flag for Cycle-By-Cycle
  809. // (CBC1) Trip Latch
  810. #define EPWM_TZCBCCLR_CBC2 0x2 // Clear Flag for Cycle-By-Cycle
  811. // (CBC2) Trip Latch
  812. #define EPWM_TZCBCCLR_CBC3 0x4 // Clear Flag for Cycle-By-Cycle
  813. // (CBC3) Trip Latch
  814. #define EPWM_TZCBCCLR_CBC4 0x8 // Clear Flag for Cycle-By-Cycle
  815. // (CBC4) Trip Latch
  816. #define EPWM_TZCBCCLR_CBC5 0x10 // Clear Flag for Cycle-By-Cycle
  817. // (CBC5) Trip Latch
  818. #define EPWM_TZCBCCLR_CBC6 0x20 // Clear Flag for Cycle-By-Cycle
  819. // (CBC6) Trip Latch
  820. #define EPWM_TZCBCCLR_DCAEVT2 0x40 // Clear Flag forDCAEVT2 selected
  821. // for CBC
  822. #define EPWM_TZCBCCLR_DCBEVT2 0x80 // Clear Flag for DCBEVT2 selected
  823. // for CBC
  824. //*****************************************************************************
  825. //
  826. // The following are defines for the bit fields in the TZOSTCLR register
  827. //
  828. //*****************************************************************************
  829. #define EPWM_TZOSTCLR_OST1 0x1 // Clear Flag for Oneshot (OST1)
  830. // Trip Latch
  831. #define EPWM_TZOSTCLR_OST2 0x2 // Clear Flag for Oneshot (OST2)
  832. // Trip Latch
  833. #define EPWM_TZOSTCLR_OST3 0x4 // Clear Flag for Oneshot (OST3)
  834. // Trip Latch
  835. #define EPWM_TZOSTCLR_OST4 0x8 // Clear Flag for Oneshot (OST4)
  836. // Trip Latch
  837. #define EPWM_TZOSTCLR_OST5 0x10 // Clear Flag for Oneshot (OST5)
  838. // Trip Latch
  839. #define EPWM_TZOSTCLR_OST6 0x20 // Clear Flag for Oneshot (OST6)
  840. // Trip Latch
  841. #define EPWM_TZOSTCLR_DCAEVT2 0x40 // Clear Flag for DCAEVT1 selected
  842. // for OST
  843. #define EPWM_TZOSTCLR_DCBEVT2 0x80 // Clear Flag for DCBEVT1 selected
  844. // for OST
  845. //*****************************************************************************
  846. //
  847. // The following are defines for the bit fields in the TZFRC register
  848. //
  849. //*****************************************************************************
  850. #define EPWM_TZFRC_CBC 0x2 // Force Trip Zones Cycle By Cycle
  851. // Event
  852. #define EPWM_TZFRC_OST 0x4 // Force Trip Zones One Shot Event
  853. #define EPWM_TZFRC_DCAEVT1 0x8 // Force Digital Compare A Event 1
  854. #define EPWM_TZFRC_DCAEVT2 0x10 // Force Digital Compare A Event 2
  855. #define EPWM_TZFRC_DCBEVT1 0x20 // Force Digital Compare B Event 1
  856. #define EPWM_TZFRC_DCBEVT2 0x40 // Force Digital Compare B Event 2
  857. //*****************************************************************************
  858. //
  859. // The following are defines for the bit fields in the ETSEL register
  860. //
  861. //*****************************************************************************
  862. #define EPWM_ETSEL_INTSEL_S 0
  863. #define EPWM_ETSEL_INTSEL_M 0x7 // EPWMxINTn Select
  864. #define EPWM_ETSEL_INTEN 0x8 // EPWMxINTn Enable
  865. #define EPWM_ETSEL_SOCASELCMP 0x10 // EPWMxSOCA Compare Select
  866. #define EPWM_ETSEL_SOCBSELCMP 0x20 // EPWMxSOCB Compare Select
  867. #define EPWM_ETSEL_INTSELCMP 0x40 // EPWMxINT Compare Select
  868. #define EPWM_ETSEL_SOCASEL_S 8
  869. #define EPWM_ETSEL_SOCASEL_M 0x700 // Start of Conversion A Select
  870. #define EPWM_ETSEL_SOCAEN 0x800 // Start of Conversion A Enable
  871. #define EPWM_ETSEL_SOCBSEL_S 12
  872. #define EPWM_ETSEL_SOCBSEL_M 0x7000 // Start of Conversion B Select
  873. #define EPWM_ETSEL_SOCBEN 0x8000 // Start of Conversion B Enable
  874. //*****************************************************************************
  875. //
  876. // The following are defines for the bit fields in the ETPS register
  877. //
  878. //*****************************************************************************
  879. #define EPWM_ETPS_INTPRD_S 0
  880. #define EPWM_ETPS_INTPRD_M 0x3 // EPWMxINTn Period Select
  881. #define EPWM_ETPS_INTCNT_S 2
  882. #define EPWM_ETPS_INTCNT_M 0xC // EPWMxINTn Counter Register
  883. #define EPWM_ETPS_INTPSSEL 0x10 // EPWMxINTn Pre-Scale Selection
  884. // Bits
  885. #define EPWM_ETPS_SOCPSSEL 0x20 // EPWMxSOC A/B Pre-Scale
  886. // Selection Bits
  887. #define EPWM_ETPS_SOCAPRD_S 8
  888. #define EPWM_ETPS_SOCAPRD_M 0x300 // EPWMxSOCA Period Select
  889. #define EPWM_ETPS_SOCACNT_S 10
  890. #define EPWM_ETPS_SOCACNT_M 0xC00 // EPWMxSOCA Counter Register
  891. #define EPWM_ETPS_SOCBPRD_S 12
  892. #define EPWM_ETPS_SOCBPRD_M 0x3000 // EPWMxSOCB Period Select
  893. #define EPWM_ETPS_SOCBCNT_S 14
  894. #define EPWM_ETPS_SOCBCNT_M 0xC000 // EPWMxSOCB Counter
  895. //*****************************************************************************
  896. //
  897. // The following are defines for the bit fields in the ETFLG register
  898. //
  899. //*****************************************************************************
  900. #define EPWM_ETFLG_INT 0x1 // EPWMxINTn Flag
  901. #define EPWM_ETFLG_SOCA 0x4 // EPWMxSOCA Flag
  902. #define EPWM_ETFLG_SOCB 0x8 // EPWMxSOCB Flag
  903. //*****************************************************************************
  904. //
  905. // The following are defines for the bit fields in the ETCLR register
  906. //
  907. //*****************************************************************************
  908. #define EPWM_ETCLR_INT 0x1 // EPWMxINTn Clear
  909. #define EPWM_ETCLR_SOCA 0x4 // EPWMxSOCA Clear
  910. #define EPWM_ETCLR_SOCB 0x8 // EPWMxSOCB Clear
  911. //*****************************************************************************
  912. //
  913. // The following are defines for the bit fields in the ETFRC register
  914. //
  915. //*****************************************************************************
  916. #define EPWM_ETFRC_INT 0x1 // EPWMxINTn Force
  917. #define EPWM_ETFRC_SOCA 0x4 // EPWMxSOCA Force
  918. #define EPWM_ETFRC_SOCB 0x8 // EPWMxSOCB Force
  919. //*****************************************************************************
  920. //
  921. // The following are defines for the bit fields in the ETINTPS register
  922. //
  923. //*****************************************************************************
  924. #define EPWM_ETINTPS_INTPRD2_S 0
  925. #define EPWM_ETINTPS_INTPRD2_M 0xF // EPWMxINTn Period Select
  926. #define EPWM_ETINTPS_INTCNT2_S 4
  927. #define EPWM_ETINTPS_INTCNT2_M 0xF0 // EPWMxINTn Counter Register
  928. //*****************************************************************************
  929. //
  930. // The following are defines for the bit fields in the ETSOCPS register
  931. //
  932. //*****************************************************************************
  933. #define EPWM_ETSOCPS_SOCAPRD2_S 0
  934. #define EPWM_ETSOCPS_SOCAPRD2_M 0xF // EPWMxSOCA Period Select
  935. #define EPWM_ETSOCPS_SOCACNT2_S 4
  936. #define EPWM_ETSOCPS_SOCACNT2_M 0xF0 // EPWMxSOCA Counter Register
  937. #define EPWM_ETSOCPS_SOCBPRD2_S 8
  938. #define EPWM_ETSOCPS_SOCBPRD2_M 0xF00 // EPWMxSOCB Period Select
  939. #define EPWM_ETSOCPS_SOCBCNT2_S 12
  940. #define EPWM_ETSOCPS_SOCBCNT2_M 0xF000 // EPWMxSOCB Counter Register
  941. //*****************************************************************************
  942. //
  943. // The following are defines for the bit fields in the ETCNTINITCTL register
  944. //
  945. //*****************************************************************************
  946. #define EPWM_ETCNTINITCTL_INTINITFRC 0x400 // EPWMxINT Counter Initialization
  947. // Force
  948. #define EPWM_ETCNTINITCTL_SOCAINITFRC 0x800 // EPWMxSOCA Counter
  949. // Initialization Force
  950. #define EPWM_ETCNTINITCTL_SOCBINITFRC 0x1000 // EPWMxSOCB Counter
  951. // Initialization Force
  952. #define EPWM_ETCNTINITCTL_INTINITEN 0x2000 // EPWMxINT Counter Initialization
  953. // Enable
  954. #define EPWM_ETCNTINITCTL_SOCAINITEN 0x4000 // EPWMxSOCA Counter
  955. // Initialization Enable
  956. #define EPWM_ETCNTINITCTL_SOCBINITEN 0x8000 // EPWMxSOCB Counter
  957. // Initialization Enable
  958. //*****************************************************************************
  959. //
  960. // The following are defines for the bit fields in the ETCNTINIT register
  961. //
  962. //*****************************************************************************
  963. #define EPWM_ETCNTINIT_INTINIT_S 0
  964. #define EPWM_ETCNTINIT_INTINIT_M 0xF // EPWMxINT Counter Initialization
  965. // Bits
  966. #define EPWM_ETCNTINIT_SOCAINIT_S 4
  967. #define EPWM_ETCNTINIT_SOCAINIT_M 0xF0 // EPWMxSOCA Counter
  968. // Initialization Bits
  969. #define EPWM_ETCNTINIT_SOCBINIT_S 8
  970. #define EPWM_ETCNTINIT_SOCBINIT_M 0xF00 // EPWMxSOCB Counter
  971. // Initialization Bits
  972. //*****************************************************************************
  973. //
  974. // The following are defines for the bit fields in the DCTRIPSEL register
  975. //
  976. //*****************************************************************************
  977. #define EPWM_DCTRIPSEL_DCAHCOMPSEL_S 0
  978. #define EPWM_DCTRIPSEL_DCAHCOMPSEL_M 0xF // Digital Compare A High COMP
  979. // Input Select
  980. #define EPWM_DCTRIPSEL_DCALCOMPSEL_S 4
  981. #define EPWM_DCTRIPSEL_DCALCOMPSEL_M 0xF0 // Digital Compare A Low COMP
  982. // Input Select
  983. #define EPWM_DCTRIPSEL_DCBHCOMPSEL_S 8
  984. #define EPWM_DCTRIPSEL_DCBHCOMPSEL_M 0xF00 // Digital Compare B High COMP
  985. // Input Select
  986. #define EPWM_DCTRIPSEL_DCBLCOMPSEL_S 12
  987. #define EPWM_DCTRIPSEL_DCBLCOMPSEL_M 0xF000 // Digital Compare B Low COMP
  988. // Input Select
  989. //*****************************************************************************
  990. //
  991. // The following are defines for the bit fields in the DCACTL register
  992. //
  993. //*****************************************************************************
  994. #define EPWM_DCACTL_EVT1SRCSEL 0x1 // DCAEVT1 Source Signal
  995. #define EPWM_DCACTL_EVT1FRCSYNCSEL 0x2 // DCAEVT1 Force Sync Signal
  996. #define EPWM_DCACTL_EVT1SOCE 0x4 // DCAEVT1 SOC Enable
  997. #define EPWM_DCACTL_EVT1SYNCE 0x8 // DCAEVT1 SYNC Enable
  998. #define EPWM_DCACTL_EVT2SRCSEL 0x100 // DCAEVT2 Source Signal
  999. #define EPWM_DCACTL_EVT2FRCSYNCSEL 0x200 // DCAEVT2 Force Sync Signal
  1000. //*****************************************************************************
  1001. //
  1002. // The following are defines for the bit fields in the DCBCTL register
  1003. //
  1004. //*****************************************************************************
  1005. #define EPWM_DCBCTL_EVT1SRCSEL 0x1 // DCBEVT1 Source Signal
  1006. #define EPWM_DCBCTL_EVT1FRCSYNCSEL 0x2 // DCBEVT1 Force Sync Signal
  1007. #define EPWM_DCBCTL_EVT1SOCE 0x4 // DCBEVT1 SOC Enable
  1008. #define EPWM_DCBCTL_EVT1SYNCE 0x8 // DCBEVT1 SYNC Enable
  1009. #define EPWM_DCBCTL_EVT2SRCSEL 0x100 // DCBEVT2 Source Signal
  1010. #define EPWM_DCBCTL_EVT2FRCSYNCSEL 0x200 // DCBEVT2 Force Sync Signal
  1011. //*****************************************************************************
  1012. //
  1013. // The following are defines for the bit fields in the DCFCTL register
  1014. //
  1015. //*****************************************************************************
  1016. #define EPWM_DCFCTL_SRCSEL_S 0
  1017. #define EPWM_DCFCTL_SRCSEL_M 0x3 // Filter Block Signal Source
  1018. // Select
  1019. #define EPWM_DCFCTL_BLANKE 0x4 // Blanking Enable/Disable
  1020. #define EPWM_DCFCTL_BLANKINV 0x8 // Blanking Window Inversion
  1021. #define EPWM_DCFCTL_PULSESEL_S 4
  1022. #define EPWM_DCFCTL_PULSESEL_M 0x30 // Pulse Select for Blanking &
  1023. // Capture Alignment
  1024. //*****************************************************************************
  1025. //
  1026. // The following are defines for the bit fields in the DCCAPCTL register
  1027. //
  1028. //*****************************************************************************
  1029. #define EPWM_DCCAPCTL_CAPE 0x1 // Counter Capture Enable
  1030. #define EPWM_DCCAPCTL_SHDWMODE 0x2 // Counter Capture Mode
  1031. //*****************************************************************************
  1032. //
  1033. // The following are defines for the bit fields in the DCFOFFSET register
  1034. //
  1035. //*****************************************************************************
  1036. #define EPWM_DCFOFFSET_DCFOFFSET_S 0
  1037. #define EPWM_DCFOFFSET_DCFOFFSET_M 0xFFFF // Blanking Offset
  1038. //*****************************************************************************
  1039. //
  1040. // The following are defines for the bit fields in the DCFOFFSETCNT register
  1041. //
  1042. //*****************************************************************************
  1043. #define EPWM_DCFOFFSETCNT_DCFOFFSETCNT_S 0
  1044. #define EPWM_DCFOFFSETCNT_DCFOFFSETCNT_M 0xFFFF // Blanking Offset Counter
  1045. //*****************************************************************************
  1046. //
  1047. // The following are defines for the bit fields in the DCFWINDOW register
  1048. //
  1049. //*****************************************************************************
  1050. #define EPWM_DCFWINDOW_DCFWINDOW_S 0
  1051. #define EPWM_DCFWINDOW_DCFWINDOW_M 0xFFFF // Digital Compare Filter Window
  1052. // Register
  1053. //*****************************************************************************
  1054. //
  1055. // The following are defines for the bit fields in the DCFWINDOWCNT register
  1056. //
  1057. //*****************************************************************************
  1058. #define EPWM_DCFWINDOWCNT_DCFWINDOWCNT_S 0
  1059. #define EPWM_DCFWINDOWCNT_DCFWINDOWCNT_M 0xFFFF // Digital Compare Filter Window
  1060. // Counter Register
  1061. //*****************************************************************************
  1062. //
  1063. // The following are defines for the bit fields in the DCCAP register
  1064. //
  1065. //*****************************************************************************
  1066. #define EPWM_DCCAP_DCCAP_S 0
  1067. #define EPWM_DCCAP_DCCAP_M 0xFFFF // Time Base Counter Capture
  1068. // Register
  1069. //*****************************************************************************
  1070. //
  1071. // The following are defines for the bit fields in the DCAHTRIPSEL register
  1072. //
  1073. //*****************************************************************************
  1074. #define EPWM_DCAHTRIPSEL_TRIPINPUT1 0x1 // Trip Input 1 Select to DCAH Mux
  1075. #define EPWM_DCAHTRIPSEL_TRIPINPUT2 0x2 // Trip Input 2 Select to DCAH Mux
  1076. #define EPWM_DCAHTRIPSEL_TRIPINPUT3 0x4 // Trip Input 3 Select to DCAH Mux
  1077. #define EPWM_DCAHTRIPSEL_TRIPINPUT4 0x8 // Trip Input 4 Select to DCAH Mux
  1078. #define EPWM_DCAHTRIPSEL_TRIPINPUT5 0x10 // Trip Input 5 Select to DCAH Mux
  1079. #define EPWM_DCAHTRIPSEL_TRIPINPUT6 0x20 // Trip Input 6 Select to DCAH Mux
  1080. #define EPWM_DCAHTRIPSEL_TRIPINPUT7 0x40 // Trip Input 7 Select to DCAH Mux
  1081. #define EPWM_DCAHTRIPSEL_TRIPINPUT8 0x80 // Trip Input 8 Select to DCAH Mux
  1082. #define EPWM_DCAHTRIPSEL_TRIPINPUT9 0x100 // Trip Input 9 Select to DCAH Mux
  1083. #define EPWM_DCAHTRIPSEL_TRIPINPUT10 0x200 // Trip Input 10 Select to DCAH
  1084. // Mux
  1085. #define EPWM_DCAHTRIPSEL_TRIPINPUT11 0x400 // Trip Input 11 Select to DCAH
  1086. // Mux
  1087. #define EPWM_DCAHTRIPSEL_TRIPINPUT12 0x800 // Trip Input 12 Select to DCAH
  1088. // Mux
  1089. #define EPWM_DCAHTRIPSEL_TRIPINPUT13 0x1000 // Trip Input 13 Select to DCAH
  1090. // Mux
  1091. #define EPWM_DCAHTRIPSEL_TRIPINPUT14 0x2000 // Trip Input 14 Select to DCAH
  1092. // Mux
  1093. #define EPWM_DCAHTRIPSEL_TRIPINPUT15 0x4000 // Trip Input 15 Select to DCAH
  1094. // Mux
  1095. //*****************************************************************************
  1096. //
  1097. // The following are defines for the bit fields in the DCALTRIPSEL register
  1098. //
  1099. //*****************************************************************************
  1100. #define EPWM_DCALTRIPSEL_TRIPINPUT1 0x1 // Trip Input 1 Select to DCAL Mux
  1101. #define EPWM_DCALTRIPSEL_TRIPINPUT2 0x2 // Trip Input 2 Select to DCAL Mux
  1102. #define EPWM_DCALTRIPSEL_TRIPINPUT3 0x4 // Trip Input 3 Select to DCAL Mux
  1103. #define EPWM_DCALTRIPSEL_TRIPINPUT4 0x8 // Trip Input 4 Select to DCAL Mux
  1104. #define EPWM_DCALTRIPSEL_TRIPINPUT5 0x10 // Trip Input 5 Select to DCAL Mux
  1105. #define EPWM_DCALTRIPSEL_TRIPINPUT6 0x20 // Trip Input 6 Select to DCAL Mux
  1106. #define EPWM_DCALTRIPSEL_TRIPINPUT7 0x40 // Trip Input 7 Select to DCAL Mux
  1107. #define EPWM_DCALTRIPSEL_TRIPINPUT8 0x80 // Trip Input 8 Select to DCAL Mux
  1108. #define EPWM_DCALTRIPSEL_TRIPINPUT9 0x100 // Trip Input 9 Select to DCAL Mux
  1109. #define EPWM_DCALTRIPSEL_TRIPINPUT10 0x200 // Trip Input 10 Select to DCAL
  1110. // Mux
  1111. #define EPWM_DCALTRIPSEL_TRIPINPUT11 0x400 // Trip Input 11 Select to DCAL
  1112. // Mux
  1113. #define EPWM_DCALTRIPSEL_TRIPINPUT12 0x800 // Trip Input 12 Select to DCAL
  1114. // Mux
  1115. #define EPWM_DCALTRIPSEL_TRIPINPUT13 0x1000 // Trip Input 13 Select to DCAL
  1116. // Mux
  1117. #define EPWM_DCALTRIPSEL_TRIPINPUT14 0x2000 // Trip Input 14 Select to DCAL
  1118. // Mux
  1119. #define EPWM_DCALTRIPSEL_TRIPINPUT15 0x4000 // Trip Input 15 Select to DCAL
  1120. // Mux
  1121. //*****************************************************************************
  1122. //
  1123. // The following are defines for the bit fields in the DCBHTRIPSEL register
  1124. //
  1125. //*****************************************************************************
  1126. #define EPWM_DCBHTRIPSEL_TRIPINPUT1 0x1 // Trip Input 1 Select to DCBH Mux
  1127. #define EPWM_DCBHTRIPSEL_TRIPINPUT2 0x2 // Trip Input 2 Select to DCBH Mux
  1128. #define EPWM_DCBHTRIPSEL_TRIPINPUT3 0x4 // Trip Input 3 Select to DCBH Mux
  1129. #define EPWM_DCBHTRIPSEL_TRIPINPUT4 0x8 // Trip Input 4 Select to DCBH Mux
  1130. #define EPWM_DCBHTRIPSEL_TRIPINPUT5 0x10 // Trip Input 5 Select to DCBH Mux
  1131. #define EPWM_DCBHTRIPSEL_TRIPINPUT6 0x20 // Trip Input 6 Select to DCBH Mux
  1132. #define EPWM_DCBHTRIPSEL_TRIPINPUT7 0x40 // Trip Input 7 Select to DCBH Mux
  1133. #define EPWM_DCBHTRIPSEL_TRIPINPUT8 0x80 // Trip Input 8 Select to DCBH Mux
  1134. #define EPWM_DCBHTRIPSEL_TRIPINPUT9 0x100 // Trip Input 9 Select to DCBH Mux
  1135. #define EPWM_DCBHTRIPSEL_TRIPINPUT10 0x200 // Trip Input 10 Select to DCBH
  1136. // Mux
  1137. #define EPWM_DCBHTRIPSEL_TRIPINPUT11 0x400 // Trip Input 11 Select to DCBH
  1138. // Mux
  1139. #define EPWM_DCBHTRIPSEL_TRIPINPUT12 0x800 // Trip Input 12 Select to DCBH
  1140. // Mux
  1141. #define EPWM_DCBHTRIPSEL_TRIPINPUT13 0x1000 // Trip Input 13 Select to DCBH
  1142. // Mux
  1143. #define EPWM_DCBHTRIPSEL_TRIPINPUT14 0x2000 // Trip Input 14 Select to DCBH
  1144. // Mux
  1145. #define EPWM_DCBHTRIPSEL_TRIPINPUT15 0x4000 // Trip Input 15 Select to DCBH
  1146. // Mux
  1147. //*****************************************************************************
  1148. //
  1149. // The following are defines for the bit fields in the DCBLTRIPSEL register
  1150. //
  1151. //*****************************************************************************
  1152. #define EPWM_DCBLTRIPSEL_TRIPINPUT1 0x1 // Trip Input 1 Select to DCBL Mux
  1153. #define EPWM_DCBLTRIPSEL_TRIPINPUT2 0x2 // Trip Input 2 Select to DCBL Mux
  1154. #define EPWM_DCBLTRIPSEL_TRIPINPUT3 0x4 // Trip Input 3 Select to DCBL Mux
  1155. #define EPWM_DCBLTRIPSEL_TRIPINPUT4 0x8 // Trip Input 4 Select to DCBL Mux
  1156. #define EPWM_DCBLTRIPSEL_TRIPINPUT5 0x10 // Trip Input 5 Select to DCBL Mux
  1157. #define EPWM_DCBLTRIPSEL_TRIPINPUT6 0x20 // Trip Input 6 Select to DCBL Mux
  1158. #define EPWM_DCBLTRIPSEL_TRIPINPUT7 0x40 // Trip Input 7 Select to DCBL Mux
  1159. #define EPWM_DCBLTRIPSEL_TRIPINPUT8 0x80 // Trip Input 8 Select to DCBL Mux
  1160. #define EPWM_DCBLTRIPSEL_TRIPINPUT9 0x100 // Trip Input 9 Select to DCBL Mux
  1161. #define EPWM_DCBLTRIPSEL_TRIPINPUT10 0x200 // Trip Input 10 Select to DCBL
  1162. // Mux
  1163. #define EPWM_DCBLTRIPSEL_TRIPINPUT11 0x400 // Trip Input 11 Select to DCBL
  1164. // Mux
  1165. #define EPWM_DCBLTRIPSEL_TRIPINPUT12 0x800 // Trip Input 12 Select to DCBL
  1166. // Mux
  1167. #define EPWM_DCBLTRIPSEL_TRIPINPUT13 0x1000 // Trip Input 13 Select to DCBL
  1168. // Mux
  1169. #define EPWM_DCBLTRIPSEL_TRIPINPUT14 0x2000 // Trip Input 14 Select to DCBL
  1170. // Mux
  1171. #define EPWM_DCBLTRIPSEL_TRIPINPUT15 0x4000 // Trip Input 15 Select to DCBL
  1172. // Mux
  1173. #endif