F2837xD_epwm.h 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240
  1. //###########################################################################
  2. //
  3. // FILE: F2837xD_epwm.h
  4. //
  5. // TITLE: EPWM Register Definitions.
  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 __F2837xD_EPWM_H__
  43. #define __F2837xD_EPWM_H__
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47. //---------------------------------------------------------------------------
  48. // EPWM Individual Register Bit Definitions:
  49. struct TBCTL_BITS { // bits description
  50. Uint16 CTRMODE:2; // 1:0 Counter Mode
  51. Uint16 PHSEN:1; // 2 Phase Load Enable
  52. Uint16 PRDLD:1; // 3 Active Period Load
  53. Uint16 SYNCOSEL:2; // 5:4 Sync Output Select
  54. Uint16 SWFSYNC:1; // 6 Software Force Sync Pulse
  55. Uint16 HSPCLKDIV:3; // 9:7 High Speed TBCLK Pre-scaler
  56. Uint16 CLKDIV:3; // 12:10 Time Base Clock Pre-scaler
  57. Uint16 PHSDIR:1; // 13 Phase Direction Bit
  58. Uint16 FREE_SOFT:2; // 15:14 Emulation Mode Bits
  59. };
  60. union TBCTL_REG {
  61. Uint16 all;
  62. struct TBCTL_BITS bit;
  63. };
  64. struct TBCTL2_BITS { // bits description
  65. Uint16 rsvd1:5; // 4:0 Reserved
  66. Uint16 rsvd2:1; // 5 Reserved
  67. Uint16 OSHTSYNCMODE:1; // 6 One shot sync mode
  68. Uint16 OSHTSYNC:1; // 7 One shot sync
  69. Uint16 rsvd3:4; // 11:8 Reserved
  70. Uint16 SYNCOSELX:2; // 13:12 Syncout selection
  71. Uint16 PRDLDSYNC:2; // 15:14 PRD Shadow to Active Load on SYNC Event
  72. };
  73. union TBCTL2_REG {
  74. Uint16 all;
  75. struct TBCTL2_BITS bit;
  76. };
  77. struct TBSTS_BITS { // bits description
  78. Uint16 CTRDIR:1; // 0 Counter Direction Status
  79. Uint16 SYNCI:1; // 1 External Input Sync Status
  80. Uint16 CTRMAX:1; // 2 Counter Max Latched Status
  81. Uint16 rsvd1:13; // 15:3 Reserved
  82. };
  83. union TBSTS_REG {
  84. Uint16 all;
  85. struct TBSTS_BITS bit;
  86. };
  87. struct CMPCTL_BITS { // bits description
  88. Uint16 LOADAMODE:2; // 1:0 Active Compare A Load
  89. Uint16 LOADBMODE:2; // 3:2 Active Compare B Load
  90. Uint16 SHDWAMODE:1; // 4 Compare A Register Block Operating Mode
  91. Uint16 rsvd1:1; // 5 Reserved
  92. Uint16 SHDWBMODE:1; // 6 Compare B Register Block Operating Mode
  93. Uint16 rsvd2:1; // 7 Reserved
  94. Uint16 SHDWAFULL:1; // 8 Compare A Shadow Register Full Status
  95. Uint16 SHDWBFULL:1; // 9 Compare B Shadow Register Full Status
  96. Uint16 LOADASYNC:2; // 11:10 Active Compare A Load on SYNC
  97. Uint16 LOADBSYNC:2; // 13:12 Active Compare B Load on SYNC
  98. Uint16 rsvd3:2; // 15:14 Reserved
  99. };
  100. union CMPCTL_REG {
  101. Uint16 all;
  102. struct CMPCTL_BITS bit;
  103. };
  104. struct CMPCTL2_BITS { // bits description
  105. Uint16 LOADCMODE:2; // 1:0 Active Compare C Load
  106. Uint16 LOADDMODE:2; // 3:2 Active Compare D load
  107. Uint16 SHDWCMODE:1; // 4 Compare C Block Operating Mode
  108. Uint16 rsvd1:1; // 5 Reserved
  109. Uint16 SHDWDMODE:1; // 6 Compare D Block Operating Mode
  110. Uint16 rsvd2:3; // 9:7 Reserved
  111. Uint16 LOADCSYNC:2; // 11:10 Active Compare C Load on SYNC
  112. Uint16 LOADDSYNC:2; // 13:12 Active Compare D Load on SYNC
  113. Uint16 rsvd3:2; // 15:14 Reserved
  114. };
  115. union CMPCTL2_REG {
  116. Uint16 all;
  117. struct CMPCTL2_BITS bit;
  118. };
  119. struct DBCTL_BITS { // bits description
  120. Uint16 OUT_MODE:2; // 1:0 Dead Band Output Mode Control
  121. Uint16 POLSEL:2; // 3:2 Polarity Select Control
  122. Uint16 IN_MODE:2; // 5:4 Dead Band Input Select Mode Control
  123. Uint16 LOADREDMODE:2; // 7:6 Active DBRED Load Mode
  124. Uint16 LOADFEDMODE:2; // 9:8 Active DBFED Load Mode
  125. Uint16 SHDWDBREDMODE:1; // 10 DBRED Block Operating Mode
  126. Uint16 SHDWDBFEDMODE:1; // 11 DBFED Block Operating Mode
  127. Uint16 OUTSWAP:2; // 13:12 Dead Band Output Swap Control
  128. Uint16 DEDB_MODE:1; // 14 Dead Band Dual-Edge B Mode Control
  129. Uint16 HALFCYCLE:1; // 15 Half Cycle Clocking Enable
  130. };
  131. union DBCTL_REG {
  132. Uint16 all;
  133. struct DBCTL_BITS bit;
  134. };
  135. struct DBCTL2_BITS { // bits description
  136. Uint16 LOADDBCTLMODE:2; // 1:0 DBCTL Load from Shadow Mode Select
  137. Uint16 SHDWDBCTLMODE:1; // 2 DBCTL Load mode Select
  138. Uint16 rsvd1:13; // 15:3 Reserved
  139. };
  140. union DBCTL2_REG {
  141. Uint16 all;
  142. struct DBCTL2_BITS bit;
  143. };
  144. struct AQCTL_BITS { // bits description
  145. Uint16 LDAQAMODE:2; // 1:0 Action Qualifier A Load Select
  146. Uint16 LDAQBMODE:2; // 3:2 Action Qualifier B Load Select
  147. Uint16 SHDWAQAMODE:1; // 4 Action Qualifer A Operating Mode
  148. Uint16 rsvd1:1; // 5 Reserved
  149. Uint16 SHDWAQBMODE:1; // 6 Action Qualifier B Operating Mode
  150. Uint16 rsvd2:1; // 7 Reserved
  151. Uint16 LDAQASYNC:2; // 9:8 AQCTLA Register Load on SYNC
  152. Uint16 LDAQBSYNC:2; // 11:10 AQCTLB Register Load on SYNC
  153. Uint16 rsvd3:4; // 15:12 Reserved
  154. };
  155. union AQCTL_REG {
  156. Uint16 all;
  157. struct AQCTL_BITS bit;
  158. };
  159. struct AQTSRCSEL_BITS { // bits description
  160. Uint16 T1SEL:4; // 3:0 T1 Event Source Select Bits
  161. Uint16 T2SEL:4; // 7:4 T2 Event Source Select Bits
  162. Uint16 rsvd1:8; // 15:8 Reserved
  163. };
  164. union AQTSRCSEL_REG {
  165. Uint16 all;
  166. struct AQTSRCSEL_BITS bit;
  167. };
  168. struct PCCTL_BITS { // bits description
  169. Uint16 CHPEN:1; // 0 PWM chopping enable
  170. Uint16 OSHTWTH:4; // 4:1 One-shot pulse width
  171. Uint16 CHPFREQ:3; // 7:5 Chopping clock frequency
  172. Uint16 CHPDUTY:3; // 10:8 Chopping clock Duty cycle
  173. Uint16 rsvd1:5; // 15:11 Reserved
  174. };
  175. union PCCTL_REG {
  176. Uint16 all;
  177. struct PCCTL_BITS bit;
  178. };
  179. struct VCAPCTL_BITS { // bits description
  180. Uint16 VCAPE:1; // 0 Valley Capture mode
  181. Uint16 VCAPSTART:1; // 1 Valley Capture Start
  182. Uint16 TRIGSEL:3; // 4:2 Capture Trigger Select
  183. Uint16 rsvd1:2; // 6:5 Reserved
  184. Uint16 VDELAYDIV:3; // 9:7 Valley Delay Mode Divide Enable
  185. Uint16 EDGEFILTDLYSEL:1; // 10 Valley Switching Mode Delay Select
  186. Uint16 rsvd2:5; // 15:11 Reserved
  187. };
  188. union VCAPCTL_REG {
  189. Uint16 all;
  190. struct VCAPCTL_BITS bit;
  191. };
  192. struct VCNTCFG_BITS { // bits description
  193. Uint16 STARTEDGE:4; // 3:0 Counter Start Edge Selection
  194. Uint16 rsvd1:3; // 6:4 Reserved
  195. Uint16 STARTEDGESTS:1; // 7 Start Edge Status Bit
  196. Uint16 STOPEDGE:4; // 11:8 Counter Start Edge Selection
  197. Uint16 rsvd2:3; // 14:12 Reserved
  198. Uint16 STOPEDGESTS:1; // 15 Stop Edge Status Bit
  199. };
  200. union VCNTCFG_REG {
  201. Uint16 all;
  202. struct VCNTCFG_BITS bit;
  203. };
  204. struct HRCNFG_BITS { // bits description
  205. Uint16 EDGMODE:2; // 1:0 ePWMxA Edge Mode Select Bits
  206. Uint16 CTLMODE:1; // 2 ePWMxA Control Mode Select Bits
  207. Uint16 HRLOAD:2; // 4:3 ePWMxA Shadow Mode Select Bits
  208. Uint16 SELOUTB:1; // 5 EPWMB Output Selection Bit
  209. Uint16 AUTOCONV:1; // 6 Autoconversion Bit
  210. Uint16 SWAPAB:1; // 7 Swap EPWMA and EPWMB Outputs Bit
  211. Uint16 EDGMODEB:2; // 9:8 ePWMxB Edge Mode Select Bits
  212. Uint16 CTLMODEB:1; // 10 ePWMxB Control Mode Select Bits
  213. Uint16 HRLOADB:2; // 12:11 ePWMxB Shadow Mode Select Bits
  214. Uint16 rsvd1:1; // 13 Reserved
  215. Uint16 rsvd2:2; // 15:14 Reserved
  216. };
  217. union HRCNFG_REG {
  218. Uint16 all;
  219. struct HRCNFG_BITS bit;
  220. };
  221. struct HRPWR_BITS { // bits description
  222. Uint16 rsvd1:2; // 1:0 Reserved
  223. Uint16 rsvd2:1; // 2 Reserved
  224. Uint16 rsvd3:1; // 3 Reserved
  225. Uint16 rsvd4:1; // 4 Reserved
  226. Uint16 rsvd5:1; // 5 Reserved
  227. Uint16 rsvd6:4; // 9:6 Reserved
  228. Uint16 rsvd7:5; // 14:10 Reserved
  229. Uint16 CALPWRON:1; // 15 Calibration Power On
  230. };
  231. union HRPWR_REG {
  232. Uint16 all;
  233. struct HRPWR_BITS bit;
  234. };
  235. struct HRMSTEP_BITS { // bits description
  236. Uint16 HRMSTEP:8; // 7:0 High Resolution Micro Step Value
  237. Uint16 rsvd1:8; // 15:8 Reserved
  238. };
  239. union HRMSTEP_REG {
  240. Uint16 all;
  241. struct HRMSTEP_BITS bit;
  242. };
  243. struct HRCNFG2_BITS { // bits description
  244. Uint16 EDGMODEDB:2; // 1:0 Dead-Band Edge-Mode Select Bits
  245. Uint16 CTLMODEDBRED:2; // 3:2 DBRED Control Mode Select Bits
  246. Uint16 CTLMODEDBFED:2; // 5:4 DBFED Control Mode Select Bits
  247. Uint16 rsvd1:8; // 13:6 Reserved
  248. Uint16 rsvd2:1; // 14 Reserved
  249. Uint16 rsvd3:1; // 15 Reserved
  250. };
  251. union HRCNFG2_REG {
  252. Uint16 all;
  253. struct HRCNFG2_BITS bit;
  254. };
  255. struct HRPCTL_BITS { // bits description
  256. Uint16 HRPE:1; // 0 High Resolution Period Enable
  257. Uint16 PWMSYNCSEL:1; // 1 PWMSYNC Source Select
  258. Uint16 TBPHSHRLOADE:1; // 2 TBPHSHR Load Enable
  259. Uint16 rsvd1:1; // 3 Reserved
  260. Uint16 PWMSYNCSELX:3; // 6:4 PWMSYNCX Source Select Bit:
  261. Uint16 rsvd2:9; // 15:7 Reserved
  262. };
  263. union HRPCTL_REG {
  264. Uint16 all;
  265. struct HRPCTL_BITS bit;
  266. };
  267. struct TRREM_BITS { // bits description
  268. Uint16 TRREM:11; // 10:0 Translator Remainder Bits
  269. Uint16 rsvd1:5; // 15:11 Reserved
  270. };
  271. union TRREM_REG {
  272. Uint16 all;
  273. struct TRREM_BITS bit;
  274. };
  275. struct GLDCTL_BITS { // bits description
  276. Uint16 GLD:1; // 0 Global Shadow to Active load event control
  277. Uint16 GLDMODE:4; // 4:1 Shadow to Active Global Load Pulse Selection
  278. Uint16 OSHTMODE:1; // 5 One Shot Load mode control bit
  279. Uint16 rsvd1:1; // 6 Reserved
  280. Uint16 GLDPRD:3; // 9:7 Global Reload Strobe Period Select Register
  281. Uint16 GLDCNT:3; // 12:10 Global Reload Strobe Counter Register
  282. Uint16 rsvd2:3; // 15:13 Reserved
  283. };
  284. union GLDCTL_REG {
  285. Uint16 all;
  286. struct GLDCTL_BITS bit;
  287. };
  288. struct GLDCFG_BITS { // bits description
  289. Uint16 TBPRD_TBPRDHR:1; // 0 Global load event configuration for TBPRD:TBPRDHR
  290. Uint16 CMPA_CMPAHR:1; // 1 Global load event configuration for CMPA:CMPAHR
  291. Uint16 CMPB_CMPBHR:1; // 2 Global load event configuration for CMPB:CMPBHR
  292. Uint16 CMPC:1; // 3 Global load event configuration for CMPC
  293. Uint16 CMPD:1; // 4 Global load event configuration for CMPD
  294. Uint16 DBRED_DBREDHR:1; // 5 Global load event configuration for DBRED:DBREDHR
  295. Uint16 DBFED_DBFEDHR:1; // 6 Global load event configuration for DBFED:DBFEDHR
  296. Uint16 DBCTL:1; // 7 Global load event configuration for DBCTL
  297. Uint16 AQCTLA_AQCTLA2:1; // 8 Global load event configuration for AQCTLA/A2
  298. Uint16 AQCTLB_AQCTLB2:1; // 9 Global load event configuration for AQCTLB/B2
  299. Uint16 AQCSFRC:1; // 10 Global load event configuration for AQCSFRC
  300. Uint16 rsvd1:5; // 15:11 Reserved
  301. };
  302. union GLDCFG_REG {
  303. Uint16 all;
  304. struct GLDCFG_BITS bit;
  305. };
  306. struct EPWMXLINK_BITS { // bits description
  307. Uint16 TBPRDLINK:4; // 3:0 TBPRD:TBPRDHR Link
  308. Uint16 CMPALINK:4; // 7:4 CMPA:CMPAHR Link
  309. Uint16 CMPBLINK:4; // 11:8 CMPB:CMPBHR Link
  310. Uint16 CMPCLINK:4; // 15:12 CMPC Link
  311. Uint16 CMPDLINK:4; // 19:16 CMPD Link
  312. Uint16 rsvd1:8; // 27:20 Reserved
  313. Uint16 GLDCTL2LINK:4; // 31:28 GLDCTL2 Link
  314. };
  315. union EPWMXLINK_REG {
  316. Uint32 all;
  317. struct EPWMXLINK_BITS bit;
  318. };
  319. struct EPWMREV_BITS { // bits description
  320. Uint16 REV:8; // 7:0 EPWM Silicon Revision bits
  321. Uint16 TYPE:8; // 15:8 EPWM Type Bits
  322. };
  323. union EPWMREV_REG {
  324. Uint16 all;
  325. struct EPWMREV_BITS bit;
  326. };
  327. struct AQCTLA_BITS { // bits description
  328. Uint16 ZRO:2; // 1:0 Action Counter = Zero
  329. Uint16 PRD:2; // 3:2 Action Counter = Period
  330. Uint16 CAU:2; // 5:4 Action Counter = Compare A Up
  331. Uint16 CAD:2; // 7:6 Action Counter = Compare A Down
  332. Uint16 CBU:2; // 9:8 Action Counter = Compare B Up
  333. Uint16 CBD:2; // 11:10 Action Counter = Compare B Down
  334. Uint16 rsvd1:4; // 15:12 Reserved
  335. };
  336. union AQCTLA_REG {
  337. Uint16 all;
  338. struct AQCTLA_BITS bit;
  339. };
  340. struct AQCTLA2_BITS { // bits description
  341. Uint16 T1U:2; // 1:0 Action when event occurs on T1 in UP-Count
  342. Uint16 T1D:2; // 3:2 Action when event occurs on T1 in DOWN-Count
  343. Uint16 T2U:2; // 5:4 Action when event occurs on T2 in UP-Count
  344. Uint16 T2D:2; // 7:6 Action when event occurs on T2 in DOWN-Count
  345. Uint16 rsvd1:8; // 15:8 Reserved
  346. };
  347. union AQCTLA2_REG {
  348. Uint16 all;
  349. struct AQCTLA2_BITS bit;
  350. };
  351. struct AQCTLB_BITS { // bits description
  352. Uint16 ZRO:2; // 1:0 Action Counter = Zero
  353. Uint16 PRD:2; // 3:2 Action Counter = Period
  354. Uint16 CAU:2; // 5:4 Action Counter = Compare A Up
  355. Uint16 CAD:2; // 7:6 Action Counter = Compare A Down
  356. Uint16 CBU:2; // 9:8 Action Counter = Compare B Up
  357. Uint16 CBD:2; // 11:10 Action Counter = Compare B Down
  358. Uint16 rsvd1:4; // 15:12 Reserved
  359. };
  360. union AQCTLB_REG {
  361. Uint16 all;
  362. struct AQCTLB_BITS bit;
  363. };
  364. struct AQCTLB2_BITS { // bits description
  365. Uint16 T1U:2; // 1:0 Action when event occurs on T1 in UP-Count
  366. Uint16 T1D:2; // 3:2 Action when event occurs on T1 in DOWN-Count
  367. Uint16 T2U:2; // 5:4 Action when event occurs on T2 in UP-Count
  368. Uint16 T2D:2; // 7:6 Action when event occurs on T2 in DOWN-Count
  369. Uint16 rsvd1:8; // 15:8 Reserved
  370. };
  371. union AQCTLB2_REG {
  372. Uint16 all;
  373. struct AQCTLB2_BITS bit;
  374. };
  375. struct AQSFRC_BITS { // bits description
  376. Uint16 ACTSFA:2; // 1:0 Action when One-time SW Force A Invoked
  377. Uint16 OTSFA:1; // 2 One-time SW Force A Output
  378. Uint16 ACTSFB:2; // 4:3 Action when One-time SW Force B Invoked
  379. Uint16 OTSFB:1; // 5 One-time SW Force A Output
  380. Uint16 RLDCSF:2; // 7:6 Reload from Shadow Options
  381. Uint16 rsvd1:8; // 15:8 Reserved
  382. };
  383. union AQSFRC_REG {
  384. Uint16 all;
  385. struct AQSFRC_BITS bit;
  386. };
  387. struct AQCSFRC_BITS { // bits description
  388. Uint16 CSFA:2; // 1:0 Continuous Software Force on output A
  389. Uint16 CSFB:2; // 3:2 Continuous Software Force on output B
  390. Uint16 rsvd1:12; // 15:4 Reserved
  391. };
  392. union AQCSFRC_REG {
  393. Uint16 all;
  394. struct AQCSFRC_BITS bit;
  395. };
  396. struct DBREDHR_BITS { // bits description
  397. Uint16 rsvd1:1; // 0 Reserved
  398. Uint16 rsvd2:7; // 7:1 Reserved
  399. Uint16 rsvd3:1; // 8 Reserved
  400. Uint16 DBREDHR:7; // 15:9 DBREDHR High Resolution Bits
  401. };
  402. union DBREDHR_REG {
  403. Uint16 all;
  404. struct DBREDHR_BITS bit;
  405. };
  406. struct DBRED_BITS { // bits description
  407. Uint16 DBRED:14; // 13:0 Rising edge delay value
  408. Uint16 rsvd1:2; // 15:14 Reserved
  409. };
  410. union DBRED_REG {
  411. Uint16 all;
  412. struct DBRED_BITS bit;
  413. };
  414. struct DBFEDHR_BITS { // bits description
  415. Uint16 rsvd1:1; // 0 Reserved
  416. Uint16 rsvd2:7; // 7:1 Reserved
  417. Uint16 rsvd3:1; // 8 Reserved
  418. Uint16 DBFEDHR:7; // 15:9 DBFEDHR High Resolution Bits
  419. };
  420. union DBFEDHR_REG {
  421. Uint16 all;
  422. struct DBFEDHR_BITS bit;
  423. };
  424. struct DBFED_BITS { // bits description
  425. Uint16 DBFED:14; // 13:0 Falling edge delay value
  426. Uint16 rsvd1:2; // 15:14 Reserved
  427. };
  428. union DBFED_REG {
  429. Uint16 all;
  430. struct DBFED_BITS bit;
  431. };
  432. struct TBPHS_BITS { // bits description
  433. Uint16 TBPHSHR:16; // 15:0 Extension Register for HRPWM Phase (8-bits)
  434. Uint16 TBPHS:16; // 31:16 Phase Offset Register
  435. };
  436. union TBPHS_REG {
  437. Uint32 all;
  438. struct TBPHS_BITS bit;
  439. };
  440. struct CMPA_BITS { // bits description
  441. Uint16 CMPAHR:16; // 15:0 Compare A HRPWM Extension Register
  442. Uint16 CMPA:16; // 31:16 Compare A Register
  443. };
  444. union CMPA_REG {
  445. Uint32 all;
  446. struct CMPA_BITS bit;
  447. };
  448. struct CMPB_BITS { // bits description
  449. Uint16 CMPBHR:16; // 15:0 Compare B High Resolution Bits
  450. Uint16 CMPB:16; // 31:16 Compare B Register
  451. };
  452. union CMPB_REG {
  453. Uint32 all;
  454. struct CMPB_BITS bit;
  455. };
  456. struct GLDCTL2_BITS { // bits description
  457. Uint16 OSHTLD:1; // 0 Enable reload event in one shot mode
  458. Uint16 GFRCLD:1; // 1 Force reload event in one shot mode
  459. Uint16 rsvd1:14; // 15:2 Reserved
  460. };
  461. union GLDCTL2_REG {
  462. Uint16 all;
  463. struct GLDCTL2_BITS bit;
  464. };
  465. struct TZSEL_BITS { // bits description
  466. Uint16 CBC1:1; // 0 TZ1 CBC select
  467. Uint16 CBC2:1; // 1 TZ2 CBC select
  468. Uint16 CBC3:1; // 2 TZ3 CBC select
  469. Uint16 CBC4:1; // 3 TZ4 CBC select
  470. Uint16 CBC5:1; // 4 TZ5 CBC select
  471. Uint16 CBC6:1; // 5 TZ6 CBC select
  472. Uint16 DCAEVT2:1; // 6 DCAEVT2 CBC select
  473. Uint16 DCBEVT2:1; // 7 DCBEVT2 CBC select
  474. Uint16 OSHT1:1; // 8 One-shot TZ1 select
  475. Uint16 OSHT2:1; // 9 One-shot TZ2 select
  476. Uint16 OSHT3:1; // 10 One-shot TZ3 select
  477. Uint16 OSHT4:1; // 11 One-shot TZ4 select
  478. Uint16 OSHT5:1; // 12 One-shot TZ5 select
  479. Uint16 OSHT6:1; // 13 One-shot TZ6 select
  480. Uint16 DCAEVT1:1; // 14 One-shot DCAEVT1 select
  481. Uint16 DCBEVT1:1; // 15 One-shot DCBEVT1 select
  482. };
  483. union TZSEL_REG {
  484. Uint16 all;
  485. struct TZSEL_BITS bit;
  486. };
  487. struct TZDCSEL_BITS { // bits description
  488. Uint16 DCAEVT1:3; // 2:0 Digital Compare Output A Event 1
  489. Uint16 DCAEVT2:3; // 5:3 Digital Compare Output A Event 2
  490. Uint16 DCBEVT1:3; // 8:6 Digital Compare Output B Event 1
  491. Uint16 DCBEVT2:3; // 11:9 Digital Compare Output B Event 2
  492. Uint16 rsvd1:4; // 15:12 Reserved
  493. };
  494. union TZDCSEL_REG {
  495. Uint16 all;
  496. struct TZDCSEL_BITS bit;
  497. };
  498. struct TZCTL_BITS { // bits description
  499. Uint16 TZA:2; // 1:0 TZ1 to TZ6 Trip Action On EPWMxA
  500. Uint16 TZB:2; // 3:2 TZ1 to TZ6 Trip Action On EPWMxB
  501. Uint16 DCAEVT1:2; // 5:4 EPWMxA action on DCAEVT1
  502. Uint16 DCAEVT2:2; // 7:6 EPWMxA action on DCAEVT2
  503. Uint16 DCBEVT1:2; // 9:8 EPWMxB action on DCBEVT1
  504. Uint16 DCBEVT2:2; // 11:10 EPWMxB action on DCBEVT2
  505. Uint16 rsvd1:4; // 15:12 Reserved
  506. };
  507. union TZCTL_REG {
  508. Uint16 all;
  509. struct TZCTL_BITS bit;
  510. };
  511. struct TZCTL2_BITS { // bits description
  512. Uint16 TZAU:3; // 2:0 Trip Action On EPWMxA while Count direction is UP
  513. Uint16 TZAD:3; // 5:3 Trip Action On EPWMxA while Count direction is DOWN
  514. Uint16 TZBU:3; // 8:6 Trip Action On EPWMxB while Count direction is UP
  515. Uint16 TZBD:3; // 11:9 Trip Action On EPWMxB while Count direction is DOWN
  516. Uint16 rsvd1:3; // 14:12 Reserved
  517. Uint16 ETZE:1; // 15 TZCTL2 Enable
  518. };
  519. union TZCTL2_REG {
  520. Uint16 all;
  521. struct TZCTL2_BITS bit;
  522. };
  523. struct TZCTLDCA_BITS { // bits description
  524. Uint16 DCAEVT1U:3; // 2:0 DCAEVT1 Action On EPWMxA while Count direction is UP
  525. Uint16 DCAEVT1D:3; // 5:3 DCAEVT1 Action On EPWMxA while Count direction is DOWN
  526. Uint16 DCAEVT2U:3; // 8:6 DCAEVT2 Action On EPWMxA while Count direction is UP
  527. Uint16 DCAEVT2D:3; // 11:9 DCAEVT2 Action On EPWMxA while Count direction is DOWN
  528. Uint16 rsvd1:4; // 15:12 Reserved
  529. };
  530. union TZCTLDCA_REG {
  531. Uint16 all;
  532. struct TZCTLDCA_BITS bit;
  533. };
  534. struct TZCTLDCB_BITS { // bits description
  535. Uint16 DCBEVT1U:3; // 2:0 DCBEVT1 Action On EPWMxA while Count direction is UP
  536. Uint16 DCBEVT1D:3; // 5:3 DCBEVT1 Action On EPWMxA while Count direction is DOWN
  537. Uint16 DCBEVT2U:3; // 8:6 DCBEVT2 Action On EPWMxA while Count direction is UP
  538. Uint16 DCBEVT2D:3; // 11:9 DCBEVT2 Action On EPWMxA while Count direction is DOWN
  539. Uint16 rsvd1:4; // 15:12 Reserved
  540. };
  541. union TZCTLDCB_REG {
  542. Uint16 all;
  543. struct TZCTLDCB_BITS bit;
  544. };
  545. struct TZEINT_BITS { // bits description
  546. Uint16 rsvd1:1; // 0 Reserved
  547. Uint16 CBC:1; // 1 Trip Zones Cycle By Cycle Int Enable
  548. Uint16 OST:1; // 2 Trip Zones One Shot Int Enable
  549. Uint16 DCAEVT1:1; // 3 Digital Compare A Event 1 Int Enable
  550. Uint16 DCAEVT2:1; // 4 Digital Compare A Event 2 Int Enable
  551. Uint16 DCBEVT1:1; // 5 Digital Compare B Event 1 Int Enable
  552. Uint16 DCBEVT2:1; // 6 Digital Compare B Event 2 Int Enable
  553. Uint16 rsvd2:9; // 15:7 Reserved
  554. };
  555. union TZEINT_REG {
  556. Uint16 all;
  557. struct TZEINT_BITS bit;
  558. };
  559. struct TZFLG_BITS { // bits description
  560. Uint16 INT:1; // 0 Global Int Status Flag
  561. Uint16 CBC:1; // 1 Trip Zones Cycle By Cycle Flag
  562. Uint16 OST:1; // 2 Trip Zones One Shot Flag
  563. Uint16 DCAEVT1:1; // 3 Digital Compare A Event 1 Flag
  564. Uint16 DCAEVT2:1; // 4 Digital Compare A Event 2 Flag
  565. Uint16 DCBEVT1:1; // 5 Digital Compare B Event 1 Flag
  566. Uint16 DCBEVT2:1; // 6 Digital Compare B Event 2 Flag
  567. Uint16 rsvd1:9; // 15:7 Reserved
  568. };
  569. union TZFLG_REG {
  570. Uint16 all;
  571. struct TZFLG_BITS bit;
  572. };
  573. struct TZCBCFLG_BITS { // bits description
  574. Uint16 CBC1:1; // 0 Latched Status Flag for CBC1 Trip Latch
  575. Uint16 CBC2:1; // 1 Latched Status Flag for CBC2 Trip Latch
  576. Uint16 CBC3:1; // 2 Latched Status Flag for CBC3 Trip Latch
  577. Uint16 CBC4:1; // 3 Latched Status Flag for CBC4 Trip Latch
  578. Uint16 CBC5:1; // 4 Latched Status Flag for CBC5 Trip Latch
  579. Uint16 CBC6:1; // 5 Latched Status Flag for CBC6 Trip Latch
  580. Uint16 DCAEVT2:1; // 6 Latched Status Flag for Digital Compare Output A Event 2
  581. Uint16 DCBEVT2:1; // 7 Latched Status Flag for Digital Compare Output B Event 2
  582. Uint16 rsvd1:8; // 15:8 Reserved
  583. };
  584. union TZCBCFLG_REG {
  585. Uint16 all;
  586. struct TZCBCFLG_BITS bit;
  587. };
  588. struct TZOSTFLG_BITS { // bits description
  589. Uint16 OST1:1; // 0 Latched Status Flag for OST1 Trip Latch
  590. Uint16 OST2:1; // 1 Latched Status Flag for OST2 Trip Latch
  591. Uint16 OST3:1; // 2 Latched Status Flag for OST3 Trip Latch
  592. Uint16 OST4:1; // 3 Latched Status Flag for OST4 Trip Latch
  593. Uint16 OST5:1; // 4 Latched Status Flag for OST5 Trip Latch
  594. Uint16 OST6:1; // 5 Latched Status Flag for OST6 Trip Latch
  595. Uint16 DCAEVT1:1; // 6 Latched Status Flag for Digital Compare Output A Event 1
  596. Uint16 DCBEVT1:1; // 7 Latched Status Flag for Digital Compare Output B Event 1
  597. Uint16 rsvd1:8; // 15:8 Reserved
  598. };
  599. union TZOSTFLG_REG {
  600. Uint16 all;
  601. struct TZOSTFLG_BITS bit;
  602. };
  603. struct TZCLR_BITS { // bits description
  604. Uint16 INT:1; // 0 Global Interrupt Clear Flag
  605. Uint16 CBC:1; // 1 Cycle-By-Cycle Flag Clear
  606. Uint16 OST:1; // 2 One-Shot Flag Clear
  607. Uint16 DCAEVT1:1; // 3 DCAVET1 Flag Clear
  608. Uint16 DCAEVT2:1; // 4 DCAEVT2 Flag Clear
  609. Uint16 DCBEVT1:1; // 5 DCBEVT1 Flag Clear
  610. Uint16 DCBEVT2:1; // 6 DCBEVT2 Flag Clear
  611. Uint16 rsvd1:7; // 13:7 Reserved
  612. Uint16 CBCPULSE:2; // 15:14 Clear Pulse for CBC Trip Latch
  613. };
  614. union TZCLR_REG {
  615. Uint16 all;
  616. struct TZCLR_BITS bit;
  617. };
  618. struct TZCBCCLR_BITS { // bits description
  619. Uint16 CBC1:1; // 0 Clear Flag for Cycle-By-Cycle (CBC1) Trip Latch
  620. Uint16 CBC2:1; // 1 Clear Flag for Cycle-By-Cycle (CBC2) Trip Latch
  621. Uint16 CBC3:1; // 2 Clear Flag for Cycle-By-Cycle (CBC3) Trip Latch
  622. Uint16 CBC4:1; // 3 Clear Flag for Cycle-By-Cycle (CBC4) Trip Latch
  623. Uint16 CBC5:1; // 4 Clear Flag for Cycle-By-Cycle (CBC5) Trip Latch
  624. Uint16 CBC6:1; // 5 Clear Flag for Cycle-By-Cycle (CBC6) Trip Latch
  625. Uint16 DCAEVT2:1; // 6 Clear Flag forDCAEVT2 selected for CBC
  626. Uint16 DCBEVT2:1; // 7 Clear Flag for DCBEVT2 selected for CBC
  627. Uint16 rsvd1:8; // 15:8 Reserved
  628. };
  629. union TZCBCCLR_REG {
  630. Uint16 all;
  631. struct TZCBCCLR_BITS bit;
  632. };
  633. struct TZOSTCLR_BITS { // bits description
  634. Uint16 OST1:1; // 0 Clear Flag for Oneshot (OST1) Trip Latch
  635. Uint16 OST2:1; // 1 Clear Flag for Oneshot (OST2) Trip Latch
  636. Uint16 OST3:1; // 2 Clear Flag for Oneshot (OST3) Trip Latch
  637. Uint16 OST4:1; // 3 Clear Flag for Oneshot (OST4) Trip Latch
  638. Uint16 OST5:1; // 4 Clear Flag for Oneshot (OST5) Trip Latch
  639. Uint16 OST6:1; // 5 Clear Flag for Oneshot (OST6) Trip Latch
  640. Uint16 DCAEVT1:1; // 6 Clear Flag for DCAEVT1 selected for OST
  641. Uint16 DCBEVT1:1; // 7 Clear Flag for DCBEVT1 selected for OST
  642. Uint16 rsvd1:8; // 15:8 Reserved
  643. };
  644. union TZOSTCLR_REG {
  645. Uint16 all;
  646. struct TZOSTCLR_BITS bit;
  647. };
  648. struct TZFRC_BITS { // bits description
  649. Uint16 rsvd1:1; // 0 Reserved
  650. Uint16 CBC:1; // 1 Force Trip Zones Cycle By Cycle Event
  651. Uint16 OST:1; // 2 Force Trip Zones One Shot Event
  652. Uint16 DCAEVT1:1; // 3 Force Digital Compare A Event 1
  653. Uint16 DCAEVT2:1; // 4 Force Digital Compare A Event 2
  654. Uint16 DCBEVT1:1; // 5 Force Digital Compare B Event 1
  655. Uint16 DCBEVT2:1; // 6 Force Digital Compare B Event 2
  656. Uint16 rsvd2:9; // 15:7 Reserved
  657. };
  658. union TZFRC_REG {
  659. Uint16 all;
  660. struct TZFRC_BITS bit;
  661. };
  662. struct ETSEL_BITS { // bits description
  663. Uint16 INTSEL:3; // 2:0 EPWMxINTn Select
  664. Uint16 INTEN:1; // 3 EPWMxINTn Enable
  665. Uint16 SOCASELCMP:1; // 4 EPWMxSOCA Compare Select
  666. Uint16 SOCBSELCMP:1; // 5 EPWMxSOCB Compare Select
  667. Uint16 INTSELCMP:1; // 6 EPWMxINT Compare Select
  668. Uint16 rsvd1:1; // 7 Reserved
  669. Uint16 SOCASEL:3; // 10:8 Start of Conversion A Select
  670. Uint16 SOCAEN:1; // 11 Start of Conversion A Enable
  671. Uint16 SOCBSEL:3; // 14:12 Start of Conversion B Select
  672. Uint16 SOCBEN:1; // 15 Start of Conversion B Enable
  673. };
  674. union ETSEL_REG {
  675. Uint16 all;
  676. struct ETSEL_BITS bit;
  677. };
  678. struct ETPS_BITS { // bits description
  679. Uint16 INTPRD:2; // 1:0 EPWMxINTn Period Select
  680. Uint16 INTCNT:2; // 3:2 EPWMxINTn Counter Register
  681. Uint16 INTPSSEL:1; // 4 EPWMxINTn Pre-Scale Selection Bits
  682. Uint16 SOCPSSEL:1; // 5 EPWMxSOC A/B Pre-Scale Selection Bits
  683. Uint16 rsvd1:2; // 7:6 Reserved
  684. Uint16 SOCAPRD:2; // 9:8 EPWMxSOCA Period Select
  685. Uint16 SOCACNT:2; // 11:10 EPWMxSOCA Counter Register
  686. Uint16 SOCBPRD:2; // 13:12 EPWMxSOCB Period Select
  687. Uint16 SOCBCNT:2; // 15:14 EPWMxSOCB Counter
  688. };
  689. union ETPS_REG {
  690. Uint16 all;
  691. struct ETPS_BITS bit;
  692. };
  693. struct ETFLG_BITS { // bits description
  694. Uint16 INT:1; // 0 EPWMxINTn Flag
  695. Uint16 rsvd1:1; // 1 Reserved
  696. Uint16 SOCA:1; // 2 EPWMxSOCA Flag
  697. Uint16 SOCB:1; // 3 EPWMxSOCB Flag
  698. Uint16 rsvd2:12; // 15:4 Reserved
  699. };
  700. union ETFLG_REG {
  701. Uint16 all;
  702. struct ETFLG_BITS bit;
  703. };
  704. struct ETCLR_BITS { // bits description
  705. Uint16 INT:1; // 0 EPWMxINTn Clear
  706. Uint16 rsvd1:1; // 1 Reserved
  707. Uint16 SOCA:1; // 2 EPWMxSOCA Clear
  708. Uint16 SOCB:1; // 3 EPWMxSOCB Clear
  709. Uint16 rsvd2:12; // 15:4 Reserved
  710. };
  711. union ETCLR_REG {
  712. Uint16 all;
  713. struct ETCLR_BITS bit;
  714. };
  715. struct ETFRC_BITS { // bits description
  716. Uint16 INT:1; // 0 EPWMxINTn Force
  717. Uint16 rsvd1:1; // 1 Reserved
  718. Uint16 SOCA:1; // 2 EPWMxSOCA Force
  719. Uint16 SOCB:1; // 3 EPWMxSOCB Force
  720. Uint16 rsvd2:12; // 15:4 Reserved
  721. };
  722. union ETFRC_REG {
  723. Uint16 all;
  724. struct ETFRC_BITS bit;
  725. };
  726. struct ETINTPS_BITS { // bits description
  727. Uint16 INTPRD2:4; // 3:0 EPWMxINTn Period Select
  728. Uint16 INTCNT2:4; // 7:4 EPWMxINTn Counter Register
  729. Uint16 rsvd1:8; // 15:8 Reserved
  730. };
  731. union ETINTPS_REG {
  732. Uint16 all;
  733. struct ETINTPS_BITS bit;
  734. };
  735. struct ETSOCPS_BITS { // bits description
  736. Uint16 SOCAPRD2:4; // 3:0 EPWMxSOCA Period Select
  737. Uint16 SOCACNT2:4; // 7:4 EPWMxSOCA Counter Register
  738. Uint16 SOCBPRD2:4; // 11:8 EPWMxSOCB Period Select
  739. Uint16 SOCBCNT2:4; // 15:12 EPWMxSOCB Counter Register
  740. };
  741. union ETSOCPS_REG {
  742. Uint16 all;
  743. struct ETSOCPS_BITS bit;
  744. };
  745. struct ETCNTINITCTL_BITS { // bits description
  746. Uint16 rsvd1:10; // 9:0 Reserved
  747. Uint16 INTINITFRC:1; // 10 EPWMxINT Counter Initialization Force
  748. Uint16 SOCAINITFRC:1; // 11 EPWMxSOCA Counter Initialization Force
  749. Uint16 SOCBINITFRC:1; // 12 EPWMxSOCB Counter Initialization Force
  750. Uint16 INTINITEN:1; // 13 EPWMxINT Counter Initialization Enable
  751. Uint16 SOCAINITEN:1; // 14 EPWMxSOCA Counter Initialization Enable
  752. Uint16 SOCBINITEN:1; // 15 EPWMxSOCB Counter Initialization Enable
  753. };
  754. union ETCNTINITCTL_REG {
  755. Uint16 all;
  756. struct ETCNTINITCTL_BITS bit;
  757. };
  758. struct ETCNTINIT_BITS { // bits description
  759. Uint16 INTINIT:4; // 3:0 EPWMxINT Counter Initialization Bits
  760. Uint16 SOCAINIT:4; // 7:4 EPWMxSOCA Counter Initialization Bits
  761. Uint16 SOCBINIT:4; // 11:8 EPWMxSOCB Counter Initialization Bits
  762. Uint16 rsvd1:4; // 15:12 Reserved
  763. };
  764. union ETCNTINIT_REG {
  765. Uint16 all;
  766. struct ETCNTINIT_BITS bit;
  767. };
  768. struct DCTRIPSEL_BITS { // bits description
  769. Uint16 DCAHCOMPSEL:4; // 3:0 Digital Compare A High COMP Input Select
  770. Uint16 DCALCOMPSEL:4; // 7:4 Digital Compare A Low COMP Input Select
  771. Uint16 DCBHCOMPSEL:4; // 11:8 Digital Compare B High COMP Input Select
  772. Uint16 DCBLCOMPSEL:4; // 15:12 Digital Compare B Low COMP Input Select
  773. };
  774. union DCTRIPSEL_REG {
  775. Uint16 all;
  776. struct DCTRIPSEL_BITS bit;
  777. };
  778. struct DCACTL_BITS { // bits description
  779. Uint16 EVT1SRCSEL:1; // 0 DCAEVT1 Source Signal
  780. Uint16 EVT1FRCSYNCSEL:1; // 1 DCAEVT1 Force Sync Signal
  781. Uint16 EVT1SOCE:1; // 2 DCAEVT1 SOC Enable
  782. Uint16 EVT1SYNCE:1; // 3 DCAEVT1 SYNC Enable
  783. Uint16 rsvd1:1; // 4 Reserved
  784. Uint16 rsvd2:2; // 6:5 Reserved
  785. Uint16 rsvd3:1; // 7 Reserved
  786. Uint16 EVT2SRCSEL:1; // 8 DCAEVT2 Source Signal
  787. Uint16 EVT2FRCSYNCSEL:1; // 9 DCAEVT2 Force Sync Signal
  788. Uint16 rsvd4:2; // 11:10 Reserved
  789. Uint16 rsvd5:1; // 12 Reserved
  790. Uint16 rsvd6:2; // 14:13 Reserved
  791. Uint16 rsvd7:1; // 15 Reserved
  792. };
  793. union DCACTL_REG {
  794. Uint16 all;
  795. struct DCACTL_BITS bit;
  796. };
  797. struct DCBCTL_BITS { // bits description
  798. Uint16 EVT1SRCSEL:1; // 0 DCBEVT1 Source Signal
  799. Uint16 EVT1FRCSYNCSEL:1; // 1 DCBEVT1 Force Sync Signal
  800. Uint16 EVT1SOCE:1; // 2 DCBEVT1 SOC Enable
  801. Uint16 EVT1SYNCE:1; // 3 DCBEVT1 SYNC Enable
  802. Uint16 rsvd1:1; // 4 Reserved
  803. Uint16 rsvd2:2; // 6:5 Reserved
  804. Uint16 rsvd3:1; // 7 Reserved
  805. Uint16 EVT2SRCSEL:1; // 8 DCBEVT2 Source Signal
  806. Uint16 EVT2FRCSYNCSEL:1; // 9 DCBEVT2 Force Sync Signal
  807. Uint16 rsvd4:2; // 11:10 Reserved
  808. Uint16 rsvd5:1; // 12 Reserved
  809. Uint16 rsvd6:2; // 14:13 Reserved
  810. Uint16 rsvd7:1; // 15 Reserved
  811. };
  812. union DCBCTL_REG {
  813. Uint16 all;
  814. struct DCBCTL_BITS bit;
  815. };
  816. struct DCFCTL_BITS { // bits description
  817. Uint16 SRCSEL:2; // 1:0 Filter Block Signal Source Select
  818. Uint16 BLANKE:1; // 2 Blanking Enable/Disable
  819. Uint16 BLANKINV:1; // 3 Blanking Window Inversion
  820. Uint16 PULSESEL:2; // 5:4 Pulse Select for Blanking & Capture Alignment
  821. Uint16 EDGEFILTSEL:1; // 6 Edge Filter Select
  822. Uint16 rsvd1:1; // 7 Reserved
  823. Uint16 EDGEMODE:2; // 9:8 Edge Mode
  824. Uint16 EDGECOUNT:3; // 12:10 Edge Count
  825. Uint16 EDGESTATUS:3; // 15:13 Edge Status
  826. };
  827. union DCFCTL_REG {
  828. Uint16 all;
  829. struct DCFCTL_BITS bit;
  830. };
  831. struct DCCAPCTL_BITS { // bits description
  832. Uint16 CAPE:1; // 0 Counter Capture Enable
  833. Uint16 SHDWMODE:1; // 1 Counter Capture Mode
  834. Uint16 rsvd1:11; // 12:2 Reserved
  835. Uint16 CAPSTS:1; // 13 Latched Status Flag for Capture Event
  836. Uint16 CAPCLR:1; // 14 DC Capture Latched Status Clear Flag
  837. Uint16 CAPMODE:1; // 15 Counter Capture Mode
  838. };
  839. union DCCAPCTL_REG {
  840. Uint16 all;
  841. struct DCCAPCTL_BITS bit;
  842. };
  843. struct DCAHTRIPSEL_BITS { // bits description
  844. Uint16 TRIPINPUT1:1; // 0 Trip Input 1 Select to DCAH Mux
  845. Uint16 TRIPINPUT2:1; // 1 Trip Input 2 Select to DCAH Mux
  846. Uint16 TRIPINPUT3:1; // 2 Trip Input 3 Select to DCAH Mux
  847. Uint16 TRIPINPUT4:1; // 3 Trip Input 4 Select to DCAH Mux
  848. Uint16 TRIPINPUT5:1; // 4 Trip Input 5 Select to DCAH Mux
  849. Uint16 TRIPINPUT6:1; // 5 Trip Input 6 Select to DCAH Mux
  850. Uint16 TRIPINPUT7:1; // 6 Trip Input 7 Select to DCAH Mux
  851. Uint16 TRIPINPUT8:1; // 7 Trip Input 8 Select to DCAH Mux
  852. Uint16 TRIPINPUT9:1; // 8 Trip Input 9 Select to DCAH Mux
  853. Uint16 TRIPINPUT10:1; // 9 Trip Input 10 Select to DCAH Mux
  854. Uint16 TRIPINPUT11:1; // 10 Trip Input 11 Select to DCAH Mux
  855. Uint16 TRIPINPUT12:1; // 11 Trip Input 12 Select to DCAH Mux
  856. Uint16 rsvd1:1; // 12 Reserved
  857. Uint16 TRIPINPUT14:1; // 13 Trip Input 14 Select to DCAH Mux
  858. Uint16 TRIPINPUT15:1; // 14 Trip Input 15 Select to DCAH Mux
  859. Uint16 rsvd2:1; // 15 Reserved
  860. };
  861. union DCAHTRIPSEL_REG {
  862. Uint16 all;
  863. struct DCAHTRIPSEL_BITS bit;
  864. };
  865. struct DCALTRIPSEL_BITS { // bits description
  866. Uint16 TRIPINPUT1:1; // 0 Trip Input 1 Select to DCAL Mux
  867. Uint16 TRIPINPUT2:1; // 1 Trip Input 2 Select to DCAL Mux
  868. Uint16 TRIPINPUT3:1; // 2 Trip Input 3 Select to DCAL Mux
  869. Uint16 TRIPINPUT4:1; // 3 Trip Input 4 Select to DCAL Mux
  870. Uint16 TRIPINPUT5:1; // 4 Trip Input 5 Select to DCAL Mux
  871. Uint16 TRIPINPUT6:1; // 5 Trip Input 6 Select to DCAL Mux
  872. Uint16 TRIPINPUT7:1; // 6 Trip Input 7 Select to DCAL Mux
  873. Uint16 TRIPINPUT8:1; // 7 Trip Input 8 Select to DCAL Mux
  874. Uint16 TRIPINPUT9:1; // 8 Trip Input 9 Select to DCAL Mux
  875. Uint16 TRIPINPUT10:1; // 9 Trip Input 10 Select to DCAL Mux
  876. Uint16 TRIPINPUT11:1; // 10 Trip Input 11 Select to DCAL Mux
  877. Uint16 TRIPINPUT12:1; // 11 Trip Input 12 Select to DCAL Mux
  878. Uint16 rsvd1:1; // 12 Reserved
  879. Uint16 TRIPINPUT14:1; // 13 Trip Input 14 Select to DCAL Mux
  880. Uint16 TRIPINPUT15:1; // 14 Trip Input 15 Select to DCAL Mux
  881. Uint16 rsvd2:1; // 15 Reserved
  882. };
  883. union DCALTRIPSEL_REG {
  884. Uint16 all;
  885. struct DCALTRIPSEL_BITS bit;
  886. };
  887. struct DCBHTRIPSEL_BITS { // bits description
  888. Uint16 TRIPINPUT1:1; // 0 Trip Input 1 Select to DCBH Mux
  889. Uint16 TRIPINPUT2:1; // 1 Trip Input 2 Select to DCBH Mux
  890. Uint16 TRIPINPUT3:1; // 2 Trip Input 3 Select to DCBH Mux
  891. Uint16 TRIPINPUT4:1; // 3 Trip Input 4 Select to DCBH Mux
  892. Uint16 TRIPINPUT5:1; // 4 Trip Input 5 Select to DCBH Mux
  893. Uint16 TRIPINPUT6:1; // 5 Trip Input 6 Select to DCBH Mux
  894. Uint16 TRIPINPUT7:1; // 6 Trip Input 7 Select to DCBH Mux
  895. Uint16 TRIPINPUT8:1; // 7 Trip Input 8 Select to DCBH Mux
  896. Uint16 TRIPINPUT9:1; // 8 Trip Input 9 Select to DCBH Mux
  897. Uint16 TRIPINPUT10:1; // 9 Trip Input 10 Select to DCBH Mux
  898. Uint16 TRIPINPUT11:1; // 10 Trip Input 11 Select to DCBH Mux
  899. Uint16 TRIPINPUT12:1; // 11 Trip Input 12 Select to DCBH Mux
  900. Uint16 rsvd1:1; // 12 Reserved
  901. Uint16 TRIPINPUT14:1; // 13 Trip Input 14 Select to DCBH Mux
  902. Uint16 TRIPINPUT15:1; // 14 Trip Input 15 Select to DCBH Mux
  903. Uint16 rsvd2:1; // 15 Reserved
  904. };
  905. union DCBHTRIPSEL_REG {
  906. Uint16 all;
  907. struct DCBHTRIPSEL_BITS bit;
  908. };
  909. struct DCBLTRIPSEL_BITS { // bits description
  910. Uint16 TRIPINPUT1:1; // 0 Trip Input 1 Select to DCBL Mux
  911. Uint16 TRIPINPUT2:1; // 1 Trip Input 2 Select to DCBL Mux
  912. Uint16 TRIPINPUT3:1; // 2 Trip Input 3 Select to DCBL Mux
  913. Uint16 TRIPINPUT4:1; // 3 Trip Input 4 Select to DCBL Mux
  914. Uint16 TRIPINPUT5:1; // 4 Trip Input 5 Select to DCBL Mux
  915. Uint16 TRIPINPUT6:1; // 5 Trip Input 6 Select to DCBL Mux
  916. Uint16 TRIPINPUT7:1; // 6 Trip Input 7 Select to DCBL Mux
  917. Uint16 TRIPINPUT8:1; // 7 Trip Input 8 Select to DCBL Mux
  918. Uint16 TRIPINPUT9:1; // 8 Trip Input 9 Select to DCBL Mux
  919. Uint16 TRIPINPUT10:1; // 9 Trip Input 10 Select to DCBL Mux
  920. Uint16 TRIPINPUT11:1; // 10 Trip Input 11 Select to DCBL Mux
  921. Uint16 TRIPINPUT12:1; // 11 Trip Input 12 Select to DCBL Mux
  922. Uint16 rsvd1:1; // 12 Reserved
  923. Uint16 TRIPINPUT14:1; // 13 Trip Input 14 Select to DCBL Mux
  924. Uint16 TRIPINPUT15:1; // 14 Trip Input 15 Select to DCBL Mux
  925. Uint16 rsvd2:1; // 15 Reserved
  926. };
  927. union DCBLTRIPSEL_REG {
  928. Uint16 all;
  929. struct DCBLTRIPSEL_BITS bit;
  930. };
  931. struct EPWM_REGS {
  932. union TBCTL_REG TBCTL; // Time Base Control Register
  933. union TBCTL2_REG TBCTL2; // Time Base Control Register 2
  934. Uint16 rsvd1[2]; // Reserved
  935. Uint16 TBCTR; // Time Base Counter Register
  936. union TBSTS_REG TBSTS; // Time Base Status Register
  937. Uint16 rsvd2[2]; // Reserved
  938. union CMPCTL_REG CMPCTL; // Counter Compare Control Register
  939. union CMPCTL2_REG CMPCTL2; // Counter Compare Control Register 2
  940. Uint16 rsvd3[2]; // Reserved
  941. union DBCTL_REG DBCTL; // Dead-Band Generator Control Register
  942. union DBCTL2_REG DBCTL2; // Dead-Band Generator Control Register 2
  943. Uint16 rsvd4[2]; // Reserved
  944. union AQCTL_REG AQCTL; // Action Qualifier Control Register
  945. union AQTSRCSEL_REG AQTSRCSEL; // Action Qualifier Trigger Event Source Select Register
  946. Uint16 rsvd5[2]; // Reserved
  947. union PCCTL_REG PCCTL; // PWM Chopper Control Register
  948. Uint16 rsvd6[3]; // Reserved
  949. union VCAPCTL_REG VCAPCTL; // Valley Capture Control Register
  950. union VCNTCFG_REG VCNTCFG; // Valley Counter Config Register
  951. Uint16 rsvd7[6]; // Reserved
  952. union HRCNFG_REG HRCNFG; // HRPWM Configuration Register
  953. union HRPWR_REG HRPWR; // HRPWM Power Register
  954. Uint16 rsvd8[4]; // Reserved
  955. union HRMSTEP_REG HRMSTEP; // HRPWM MEP Step Register
  956. union HRCNFG2_REG HRCNFG2; // HRPWM Configuration 2 Register
  957. Uint16 rsvd9[5]; // Reserved
  958. union HRPCTL_REG HRPCTL; // High Resolution Period Control Register
  959. union TRREM_REG TRREM; // Translator High Resolution Remainder Register
  960. Uint16 rsvd10[5]; // Reserved
  961. union GLDCTL_REG GLDCTL; // Global PWM Load Control Register
  962. union GLDCFG_REG GLDCFG; // Global PWM Load Config Register
  963. Uint16 rsvd11[2]; // Reserved
  964. union EPWMXLINK_REG EPWMXLINK; // EPWMx Link Register
  965. Uint16 rsvd12[4]; // Reserved
  966. union EPWMREV_REG EPWMREV; // EPWM Revision Register
  967. Uint16 rsvd13; // Reserved
  968. union AQCTLA_REG AQCTLA; // Action Qualifier Control Register For Output A
  969. union AQCTLA2_REG AQCTLA2; // Additional Action Qualifier Control Register For Output A
  970. union AQCTLB_REG AQCTLB; // Action Qualifier Control Register For Output B
  971. union AQCTLB2_REG AQCTLB2; // Additional Action Qualifier Control Register For Output B
  972. Uint16 rsvd14[3]; // Reserved
  973. union AQSFRC_REG AQSFRC; // Action Qualifier Software Force Register
  974. Uint16 rsvd15; // Reserved
  975. union AQCSFRC_REG AQCSFRC; // Action Qualifier Continuous S/W Force Register
  976. Uint16 rsvd16[6]; // Reserved
  977. union DBREDHR_REG DBREDHR; // Dead-Band Generator Rising Edge Delay High Resolution Mirror Register
  978. union DBRED_REG DBRED; // Dead-Band Generator Rising Edge Delay High Resolution Mirror Register
  979. union DBFEDHR_REG DBFEDHR; // Dead-Band Generator Falling Edge Delay High Resolution Register
  980. union DBFED_REG DBFED; // Dead-Band Generator Falling Edge Delay Count Register
  981. Uint16 rsvd17[12]; // Reserved
  982. union TBPHS_REG TBPHS; // Time Base Phase High
  983. Uint16 TBPRDHR; // Time Base Period High Resolution Register
  984. Uint16 TBPRD; // Time Base Period Register
  985. Uint16 rsvd18[6]; // Reserved
  986. union CMPA_REG CMPA; // Counter Compare A Register
  987. union CMPB_REG CMPB; // Compare B Register
  988. Uint16 rsvd19; // Reserved
  989. Uint16 CMPC; // Counter Compare C Register
  990. Uint16 rsvd20; // Reserved
  991. Uint16 CMPD; // Counter Compare D Register
  992. Uint16 rsvd21[2]; // Reserved
  993. union GLDCTL2_REG GLDCTL2; // Global PWM Load Control Register 2
  994. Uint16 rsvd22[2]; // Reserved
  995. Uint16 SWVDELVAL; // Software Valley Mode Delay Register
  996. Uint16 rsvd23[8]; // Reserved
  997. union TZSEL_REG TZSEL; // Trip Zone Select Register
  998. Uint16 rsvd24; // Reserved
  999. union TZDCSEL_REG TZDCSEL; // Trip Zone Digital Comparator Select Register
  1000. Uint16 rsvd25; // Reserved
  1001. union TZCTL_REG TZCTL; // Trip Zone Control Register
  1002. union TZCTL2_REG TZCTL2; // Additional Trip Zone Control Register
  1003. union TZCTLDCA_REG TZCTLDCA; // Trip Zone Control Register Digital Compare A
  1004. union TZCTLDCB_REG TZCTLDCB; // Trip Zone Control Register Digital Compare B
  1005. Uint16 rsvd26[5]; // Reserved
  1006. union TZEINT_REG TZEINT; // Trip Zone Enable Interrupt Register
  1007. Uint16 rsvd27[5]; // Reserved
  1008. union TZFLG_REG TZFLG; // Trip Zone Flag Register
  1009. union TZCBCFLG_REG TZCBCFLG; // Trip Zone CBC Flag Register
  1010. union TZOSTFLG_REG TZOSTFLG; // Trip Zone OST Flag Register
  1011. Uint16 rsvd28; // Reserved
  1012. union TZCLR_REG TZCLR; // Trip Zone Clear Register
  1013. union TZCBCCLR_REG TZCBCCLR; // Trip Zone CBC Clear Register
  1014. union TZOSTCLR_REG TZOSTCLR; // Trip Zone OST Clear Register
  1015. Uint16 rsvd29; // Reserved
  1016. union TZFRC_REG TZFRC; // Trip Zone Force Register
  1017. Uint16 rsvd30[8]; // Reserved
  1018. union ETSEL_REG ETSEL; // Event Trigger Selection Register
  1019. Uint16 rsvd31; // Reserved
  1020. union ETPS_REG ETPS; // Event Trigger Pre-Scale Register
  1021. Uint16 rsvd32; // Reserved
  1022. union ETFLG_REG ETFLG; // Event Trigger Flag Register
  1023. Uint16 rsvd33; // Reserved
  1024. union ETCLR_REG ETCLR; // Event Trigger Clear Register
  1025. Uint16 rsvd34; // Reserved
  1026. union ETFRC_REG ETFRC; // Event Trigger Force Register
  1027. Uint16 rsvd35; // Reserved
  1028. union ETINTPS_REG ETINTPS; // Event-Trigger Interrupt Pre-Scale Register
  1029. Uint16 rsvd36; // Reserved
  1030. union ETSOCPS_REG ETSOCPS; // Event-Trigger SOC Pre-Scale Register
  1031. Uint16 rsvd37; // Reserved
  1032. union ETCNTINITCTL_REG ETCNTINITCTL; // Event-Trigger Counter Initialization Control Register
  1033. Uint16 rsvd38; // Reserved
  1034. union ETCNTINIT_REG ETCNTINIT; // Event-Trigger Counter Initialization Register
  1035. Uint16 rsvd39[11]; // Reserved
  1036. union DCTRIPSEL_REG DCTRIPSEL; // Digital Compare Trip Select Register
  1037. Uint16 rsvd40[2]; // Reserved
  1038. union DCACTL_REG DCACTL; // Digital Compare A Control Register
  1039. union DCBCTL_REG DCBCTL; // Digital Compare B Control Register
  1040. Uint16 rsvd41[2]; // Reserved
  1041. union DCFCTL_REG DCFCTL; // Digital Compare Filter Control Register
  1042. union DCCAPCTL_REG DCCAPCTL; // Digital Compare Capture Control Register
  1043. Uint16 DCFOFFSET; // Digital Compare Filter Offset Register
  1044. Uint16 DCFOFFSETCNT; // Digital Compare Filter Offset Counter Register
  1045. Uint16 DCFWINDOW; // Digital Compare Filter Window Register
  1046. Uint16 DCFWINDOWCNT; // Digital Compare Filter Window Counter Register
  1047. Uint16 rsvd42[2]; // Reserved
  1048. Uint16 DCCAP; // Digital Compare Counter Capture Register
  1049. Uint16 rsvd43[2]; // Reserved
  1050. union DCAHTRIPSEL_REG DCAHTRIPSEL; // Digital Compare AH Trip Select
  1051. union DCALTRIPSEL_REG DCALTRIPSEL; // Digital Compare AL Trip Select
  1052. union DCBHTRIPSEL_REG DCBHTRIPSEL; // Digital Compare BH Trip Select
  1053. union DCBLTRIPSEL_REG DCBLTRIPSEL; // Digital Compare BL Trip Select
  1054. Uint16 rsvd44[39]; // Reserved
  1055. Uint16 HWVDELVAL; // Hardware Valley Mode Delay Register
  1056. Uint16 VCNTVAL; // Hardware Valley Counter Register
  1057. Uint16 rsvd45; // Reserved
  1058. };
  1059. //---------------------------------------------------------------------------
  1060. // EPWM External References & Function Declarations:
  1061. //
  1062. #ifdef CPU1
  1063. extern volatile struct EPWM_REGS EPwm1Regs;
  1064. extern volatile struct EPWM_REGS EPwm2Regs;
  1065. extern volatile struct EPWM_REGS EPwm3Regs;
  1066. extern volatile struct EPWM_REGS EPwm4Regs;
  1067. extern volatile struct EPWM_REGS EPwm5Regs;
  1068. extern volatile struct EPWM_REGS EPwm6Regs;
  1069. extern volatile struct EPWM_REGS EPwm7Regs;
  1070. extern volatile struct EPWM_REGS EPwm8Regs;
  1071. extern volatile struct EPWM_REGS EPwm9Regs;
  1072. extern volatile struct EPWM_REGS EPwm10Regs;
  1073. extern volatile struct EPWM_REGS EPwm11Regs;
  1074. extern volatile struct EPWM_REGS EPwm12Regs;
  1075. #endif
  1076. #ifdef CPU2
  1077. extern volatile struct EPWM_REGS EPwm1Regs;
  1078. extern volatile struct EPWM_REGS EPwm2Regs;
  1079. extern volatile struct EPWM_REGS EPwm3Regs;
  1080. extern volatile struct EPWM_REGS EPwm4Regs;
  1081. extern volatile struct EPWM_REGS EPwm5Regs;
  1082. extern volatile struct EPWM_REGS EPwm6Regs;
  1083. extern volatile struct EPWM_REGS EPwm7Regs;
  1084. extern volatile struct EPWM_REGS EPwm8Regs;
  1085. extern volatile struct EPWM_REGS EPwm9Regs;
  1086. extern volatile struct EPWM_REGS EPwm10Regs;
  1087. extern volatile struct EPWM_REGS EPwm11Regs;
  1088. extern volatile struct EPWM_REGS EPwm12Regs;
  1089. #endif
  1090. #ifdef __cplusplus
  1091. }
  1092. #endif /* extern "C" */
  1093. #endif
  1094. //===========================================================================
  1095. // End of file.
  1096. //===========================================================================