hw_pwm.h 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756
  1. //*****************************************************************************
  2. //
  3. // hw_pwm.h - Defines and Macros for Pulse Width Modulation (PWM) ports.
  4. //
  5. // Copyright (c) 2005-2010 Texas Instruments Incorporated. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Texas Instruments (TI) is supplying this software for use solely and
  9. // exclusively on TI's microcontroller products. The software is owned by
  10. // TI and/or its suppliers, and is protected under applicable copyright
  11. // laws. You may not combine this software with "viral" open-source
  12. // software in order to form a larger program.
  13. //
  14. // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
  15. // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
  16. // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  17. // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
  18. // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
  19. // DAMAGES, FOR ANY REASON WHATSOEVER.
  20. //
  21. // This is part of revision 6459 of the Stellaris Firmware Development Package.
  22. //
  23. //*****************************************************************************
  24. #ifndef __HW_PWM_H__
  25. #define __HW_PWM_H__
  26. //*****************************************************************************
  27. //
  28. // The following are defines for the PWM register offsets.
  29. //
  30. //*****************************************************************************
  31. #define PWM_O_CTL 0x00000000 // PWM Master Control
  32. #define PWM_O_SYNC 0x00000004 // PWM Time Base Sync
  33. #define PWM_O_ENABLE 0x00000008 // PWM Output Enable
  34. #define PWM_O_INVERT 0x0000000C // PWM Output Inversion
  35. #define PWM_O_FAULT 0x00000010 // PWM Output Fault
  36. #define PWM_O_INTEN 0x00000014 // PWM Interrupt Enable
  37. #define PWM_O_RIS 0x00000018 // PWM Raw Interrupt Status
  38. #define PWM_O_ISC 0x0000001C // PWM Interrupt Status and Clear
  39. #define PWM_O_STATUS 0x00000020 // PWM Status
  40. #define PWM_O_FAULTVAL 0x00000024 // PWM Fault Condition Value
  41. #define PWM_O_ENUPD 0x00000028 // PWM Enable Update
  42. #define PWM_O_0_CTL 0x00000040 // PWM0 Control
  43. #define PWM_O_0_INTEN 0x00000044 // PWM0 Interrupt and Trigger
  44. // Enable
  45. #define PWM_O_0_RIS 0x00000048 // PWM0 Raw Interrupt Status
  46. #define PWM_O_0_ISC 0x0000004C // PWM0 Interrupt Status and Clear
  47. #define PWM_O_0_LOAD 0x00000050 // PWM0 Load
  48. #define PWM_O_0_COUNT 0x00000054 // PWM0 Counter
  49. #define PWM_O_0_CMPA 0x00000058 // PWM0 Compare A
  50. #define PWM_O_0_CMPB 0x0000005C // PWM0 Compare B
  51. #define PWM_O_0_GENA 0x00000060 // PWM0 Generator A Control
  52. #define PWM_O_0_GENB 0x00000064 // PWM0 Generator B Control
  53. #define PWM_O_0_DBCTL 0x00000068 // PWM0 Dead-Band Control
  54. #define PWM_O_0_DBRISE 0x0000006C // PWM0 Dead-Band Rising-Edge Delay
  55. #define PWM_O_0_DBFALL 0x00000070 // PWM0 Dead-Band
  56. // Falling-Edge-Delay
  57. #define PWM_O_0_FLTSRC0 0x00000074 // PWM0 Fault Source 0
  58. #define PWM_O_0_FLTSRC1 0x00000078 // PWM0 Fault Source 1
  59. #define PWM_O_0_MINFLTPER 0x0000007C // PWM0 Minimum Fault Period
  60. #define PWM_O_1_CTL 0x00000080 // PWM1 Control
  61. #define PWM_O_1_INTEN 0x00000084 // PWM1 Interrupt and Trigger
  62. // Enable
  63. #define PWM_O_1_RIS 0x00000088 // PWM1 Raw Interrupt Status
  64. #define PWM_O_1_ISC 0x0000008C // PWM1 Interrupt Status and Clear
  65. #define PWM_O_1_LOAD 0x00000090 // PWM1 Load
  66. #define PWM_O_1_COUNT 0x00000094 // PWM1 Counter
  67. #define PWM_O_1_CMPA 0x00000098 // PWM1 Compare A
  68. #define PWM_O_1_CMPB 0x0000009C // PWM1 Compare B
  69. #define PWM_O_1_GENA 0x000000A0 // PWM1 Generator A Control
  70. #define PWM_O_1_GENB 0x000000A4 // PWM1 Generator B Control
  71. #define PWM_O_1_DBCTL 0x000000A8 // PWM1 Dead-Band Control
  72. #define PWM_O_1_DBRISE 0x000000AC // PWM1 Dead-Band Rising-Edge Delay
  73. #define PWM_O_1_DBFALL 0x000000B0 // PWM1 Dead-Band
  74. // Falling-Edge-Delay
  75. #define PWM_O_1_FLTSRC0 0x000000B4 // PWM1 Fault Source 0
  76. #define PWM_O_1_FLTSRC1 0x000000B8 // PWM1 Fault Source 1
  77. #define PWM_O_1_MINFLTPER 0x000000BC // PWM1 Minimum Fault Period
  78. #define PWM_O_2_CTL 0x000000C0 // PWM2 Control
  79. #define PWM_O_2_INTEN 0x000000C4 // PWM2 Interrupt and Trigger
  80. // Enable
  81. #define PWM_O_2_RIS 0x000000C8 // PWM2 Raw Interrupt Status
  82. #define PWM_O_2_ISC 0x000000CC // PWM2 Interrupt Status and Clear
  83. #define PWM_O_2_LOAD 0x000000D0 // PWM2 Load
  84. #define PWM_O_2_COUNT 0x000000D4 // PWM2 Counter
  85. #define PWM_O_2_CMPA 0x000000D8 // PWM2 Compare A
  86. #define PWM_O_2_CMPB 0x000000DC // PWM2 Compare B
  87. #define PWM_O_2_GENA 0x000000E0 // PWM2 Generator A Control
  88. #define PWM_O_2_GENB 0x000000E4 // PWM2 Generator B Control
  89. #define PWM_O_2_DBCTL 0x000000E8 // PWM2 Dead-Band Control
  90. #define PWM_O_2_DBRISE 0x000000EC // PWM2 Dead-Band Rising-Edge Delay
  91. #define PWM_O_2_DBFALL 0x000000F0 // PWM2 Dead-Band
  92. // Falling-Edge-Delay
  93. #define PWM_O_2_FLTSRC0 0x000000F4 // PWM2 Fault Source 0
  94. #define PWM_O_2_FLTSRC1 0x000000F8 // PWM2 Fault Source 1
  95. #define PWM_O_2_MINFLTPER 0x000000FC // PWM2 Minimum Fault Period
  96. #define PWM_O_3_CTL 0x00000100 // PWM3 Control
  97. #define PWM_O_3_INTEN 0x00000104 // PWM3 Interrupt and Trigger
  98. // Enable
  99. #define PWM_O_3_RIS 0x00000108 // PWM3 Raw Interrupt Status
  100. #define PWM_O_3_ISC 0x0000010C // PWM3 Interrupt Status and Clear
  101. #define PWM_O_3_LOAD 0x00000110 // PWM3 Load
  102. #define PWM_O_3_COUNT 0x00000114 // PWM3 Counter
  103. #define PWM_O_3_CMPA 0x00000118 // PWM3 Compare A
  104. #define PWM_O_3_CMPB 0x0000011C // PWM3 Compare B
  105. #define PWM_O_3_GENA 0x00000120 // PWM3 Generator A Control
  106. #define PWM_O_3_GENB 0x00000124 // PWM3 Generator B Control
  107. #define PWM_O_3_DBCTL 0x00000128 // PWM3 Dead-Band Control
  108. #define PWM_O_3_DBRISE 0x0000012C // PWM3 Dead-Band Rising-Edge Delay
  109. #define PWM_O_3_DBFALL 0x00000130 // PWM3 Dead-Band
  110. // Falling-Edge-Delay
  111. #define PWM_O_3_FLTSRC0 0x00000134 // PWM3 Fault Source 0
  112. #define PWM_O_3_FLTSRC1 0x00000138 // PWM3 Fault Source 1
  113. #define PWM_O_3_MINFLTPER 0x0000013C // PWM3 Minimum Fault Period
  114. #define PWM_O_0_FLTSEN 0x00000800 // PWM0 Fault Pin Logic Sense
  115. #define PWM_O_0_FLTSTAT0 0x00000804 // PWM0 Fault Status 0
  116. #define PWM_O_0_FLTSTAT1 0x00000808 // PWM0 Fault Status 1
  117. #define PWM_O_1_FLTSEN 0x00000880 // PWM1 Fault Pin Logic Sense
  118. #define PWM_O_1_FLTSTAT0 0x00000884 // PWM1 Fault Status 0
  119. #define PWM_O_1_FLTSTAT1 0x00000888 // PWM1 Fault Status 1
  120. #define PWM_O_2_FLTSEN 0x00000900 // PWM2 Fault Pin Logic Sense
  121. #define PWM_O_2_FLTSTAT0 0x00000904 // PWM2 Fault Status 0
  122. #define PWM_O_2_FLTSTAT1 0x00000908 // PWM2 Fault Status 1
  123. #define PWM_O_3_FLTSEN 0x00000980 // PWM3 Fault Pin Logic Sense
  124. #define PWM_O_3_FLTSTAT0 0x00000984 // PWM3 Fault Status 0
  125. #define PWM_O_3_FLTSTAT1 0x00000988 // PWM3 Fault Status 1
  126. //*****************************************************************************
  127. //
  128. // The following are defines for the bit fields in the PWM_O_CTL register.
  129. //
  130. //*****************************************************************************
  131. #define PWM_CTL_GLOBALSYNC3 0x00000008 // Update PWM Generator 3
  132. #define PWM_CTL_GLOBALSYNC2 0x00000004 // Update PWM Generator 2
  133. #define PWM_CTL_GLOBALSYNC1 0x00000002 // Update PWM Generator 1
  134. #define PWM_CTL_GLOBALSYNC0 0x00000001 // Update PWM Generator 0
  135. //*****************************************************************************
  136. //
  137. // The following are defines for the bit fields in the PWM_O_SYNC register.
  138. //
  139. //*****************************************************************************
  140. #define PWM_SYNC_SYNC3 0x00000008 // Reset Generator 3 Counter
  141. #define PWM_SYNC_SYNC2 0x00000004 // Reset Generator 2 Counter
  142. #define PWM_SYNC_SYNC1 0x00000002 // Reset Generator 1 Counter
  143. #define PWM_SYNC_SYNC0 0x00000001 // Reset Generator 0 Counter
  144. //*****************************************************************************
  145. //
  146. // The following are defines for the bit fields in the PWM_O_ENABLE register.
  147. //
  148. //*****************************************************************************
  149. #define PWM_ENABLE_PWM7EN 0x00000080 // PWM7 Output Enable
  150. #define PWM_ENABLE_PWM6EN 0x00000040 // PWM6 Output Enable
  151. #define PWM_ENABLE_PWM5EN 0x00000020 // PWM5 Output Enable
  152. #define PWM_ENABLE_PWM4EN 0x00000010 // PWM4 Output Enable
  153. #define PWM_ENABLE_PWM3EN 0x00000008 // PWM3 Output Enable
  154. #define PWM_ENABLE_PWM2EN 0x00000004 // PWM2 Output Enable
  155. #define PWM_ENABLE_PWM1EN 0x00000002 // PWM1 Output Enable
  156. #define PWM_ENABLE_PWM0EN 0x00000001 // PWM0 Output Enable
  157. //*****************************************************************************
  158. //
  159. // The following are defines for the bit fields in the PWM_O_INVERT register.
  160. //
  161. //*****************************************************************************
  162. #define PWM_INVERT_PWM7INV 0x00000080 // Invert PWM7 Signal
  163. #define PWM_INVERT_PWM6INV 0x00000040 // Invert PWM6 Signal
  164. #define PWM_INVERT_PWM5INV 0x00000020 // Invert PWM5 Signal
  165. #define PWM_INVERT_PWM4INV 0x00000010 // Invert PWM4 Signal
  166. #define PWM_INVERT_PWM3INV 0x00000008 // Invert PWM3 Signal
  167. #define PWM_INVERT_PWM2INV 0x00000004 // Invert PWM2 Signal
  168. #define PWM_INVERT_PWM1INV 0x00000002 // Invert PWM1 Signal
  169. #define PWM_INVERT_PWM0INV 0x00000001 // Invert PWM0 Signal
  170. //*****************************************************************************
  171. //
  172. // The following are defines for the bit fields in the PWM_O_FAULT register.
  173. //
  174. //*****************************************************************************
  175. #define PWM_FAULT_FAULT7 0x00000080 // PWM7 Fault
  176. #define PWM_FAULT_FAULT6 0x00000040 // PWM6 Fault
  177. #define PWM_FAULT_FAULT5 0x00000020 // PWM5 Fault
  178. #define PWM_FAULT_FAULT4 0x00000010 // PWM4 Fault
  179. #define PWM_FAULT_FAULT3 0x00000008 // PWM3 Fault
  180. #define PWM_FAULT_FAULT2 0x00000004 // PWM2 Fault
  181. #define PWM_FAULT_FAULT1 0x00000002 // PWM1 Fault
  182. #define PWM_FAULT_FAULT0 0x00000001 // PWM0 Fault
  183. //*****************************************************************************
  184. //
  185. // The following are defines for the bit fields in the PWM_O_INTEN register.
  186. //
  187. //*****************************************************************************
  188. #define PWM_INTEN_INTFAULT3 0x00080000 // Interrupt Fault 3
  189. #define PWM_INTEN_INTFAULT2 0x00040000 // Interrupt Fault 2
  190. #define PWM_INTEN_INTFAULT1 0x00020000 // Interrupt Fault 1
  191. #define PWM_INTEN_INTFAULT 0x00010000 // Fault Interrupt Enable
  192. #define PWM_INTEN_INTFAULT0 0x00010000 // Interrupt Fault 0
  193. #define PWM_INTEN_INTPWM3 0x00000008 // PWM3 Interrupt Enable
  194. #define PWM_INTEN_INTPWM2 0x00000004 // PWM2 Interrupt Enable
  195. #define PWM_INTEN_INTPWM1 0x00000002 // PWM1 Interrupt Enable
  196. #define PWM_INTEN_INTPWM0 0x00000001 // PWM0 Interrupt Enable
  197. //*****************************************************************************
  198. //
  199. // The following are defines for the bit fields in the PWM_O_RIS register.
  200. //
  201. //*****************************************************************************
  202. #define PWM_RIS_INTFAULT3 0x00080000 // Interrupt Fault PWM 3
  203. #define PWM_RIS_INTFAULT2 0x00040000 // Interrupt Fault PWM 2
  204. #define PWM_RIS_INTFAULT1 0x00020000 // Interrupt Fault PWM 1
  205. #define PWM_RIS_INTFAULT0 0x00010000 // Interrupt Fault PWM 0
  206. #define PWM_RIS_INTFAULT 0x00010000 // Fault Interrupt Asserted
  207. #define PWM_RIS_INTPWM3 0x00000008 // PWM3 Interrupt Asserted
  208. #define PWM_RIS_INTPWM2 0x00000004 // PWM2 Interrupt Asserted
  209. #define PWM_RIS_INTPWM1 0x00000002 // PWM1 Interrupt Asserted
  210. #define PWM_RIS_INTPWM0 0x00000001 // PWM0 Interrupt Asserted
  211. //*****************************************************************************
  212. //
  213. // The following are defines for the bit fields in the PWM_O_ISC register.
  214. //
  215. //*****************************************************************************
  216. #define PWM_ISC_INTFAULT3 0x00080000 // FAULT3 Interrupt Asserted
  217. #define PWM_ISC_INTFAULT2 0x00040000 // FAULT2 Interrupt Asserted
  218. #define PWM_ISC_INTFAULT1 0x00020000 // FAULT1 Interrupt Asserted
  219. #define PWM_ISC_INTFAULT 0x00010000 // Fault Interrupt Asserted
  220. #define PWM_ISC_INTFAULT0 0x00010000 // FAULT0 Interrupt Asserted
  221. #define PWM_ISC_INTPWM3 0x00000008 // PWM3 Interrupt Status
  222. #define PWM_ISC_INTPWM2 0x00000004 // PWM2 Interrupt Status
  223. #define PWM_ISC_INTPWM1 0x00000002 // PWM1 Interrupt Status
  224. #define PWM_ISC_INTPWM0 0x00000001 // PWM0 Interrupt Status
  225. //*****************************************************************************
  226. //
  227. // The following are defines for the bit fields in the PWM_O_STATUS register.
  228. //
  229. //*****************************************************************************
  230. #define PWM_STATUS_FAULT3 0x00000008 // Generator 3 Fault Status
  231. #define PWM_STATUS_FAULT2 0x00000004 // Generator 2 Fault Status
  232. #define PWM_STATUS_FAULT1 0x00000002 // Generator 1 Fault Status
  233. #define PWM_STATUS_FAULT0 0x00000001 // Generator 0 Fault Status
  234. //*****************************************************************************
  235. //
  236. // The following are defines for the bit fields in the PWM_O_FAULTVAL register.
  237. //
  238. //*****************************************************************************
  239. #define PWM_FAULTVAL_PWM7 0x00000080 // PWM7 Fault Value
  240. #define PWM_FAULTVAL_PWM6 0x00000040 // PWM6 Fault Value
  241. #define PWM_FAULTVAL_PWM5 0x00000020 // PWM5 Fault Value
  242. #define PWM_FAULTVAL_PWM4 0x00000010 // PWM4 Fault Value
  243. #define PWM_FAULTVAL_PWM3 0x00000008 // PWM3 Fault Value
  244. #define PWM_FAULTVAL_PWM2 0x00000004 // PWM2 Fault Value
  245. #define PWM_FAULTVAL_PWM1 0x00000002 // PWM1 Fault Value
  246. #define PWM_FAULTVAL_PWM0 0x00000001 // PWM0 Fault Value
  247. //*****************************************************************************
  248. //
  249. // The following are defines for the bit fields in the PWM_O_ENUPD register.
  250. //
  251. //*****************************************************************************
  252. #define PWM_ENUPD_ENUPD7_M 0x0000C000 // PWM7 Enable Update Mode
  253. #define PWM_ENUPD_ENUPD7_IMM 0x00000000 // Immediate
  254. #define PWM_ENUPD_ENUPD7_LSYNC 0x00008000 // Locally Synchronized
  255. #define PWM_ENUPD_ENUPD7_GSYNC 0x0000C000 // Globally Synchronized
  256. #define PWM_ENUPD_ENUPD6_M 0x00003000 // PWM6 Enable Update Mode
  257. #define PWM_ENUPD_ENUPD6_IMM 0x00000000 // Immediate
  258. #define PWM_ENUPD_ENUPD6_LSYNC 0x00002000 // Locally Synchronized
  259. #define PWM_ENUPD_ENUPD6_GSYNC 0x00003000 // Globally Synchronized
  260. #define PWM_ENUPD_ENUPD5_M 0x00000C00 // PWM5 Enable Update Mode
  261. #define PWM_ENUPD_ENUPD5_IMM 0x00000000 // Immediate
  262. #define PWM_ENUPD_ENUPD5_LSYNC 0x00000800 // Locally Synchronized
  263. #define PWM_ENUPD_ENUPD5_GSYNC 0x00000C00 // Globally Synchronized
  264. #define PWM_ENUPD_ENUPD4_M 0x00000300 // PWM4 Enable Update Mode
  265. #define PWM_ENUPD_ENUPD4_IMM 0x00000000 // Immediate
  266. #define PWM_ENUPD_ENUPD4_LSYNC 0x00000200 // Locally Synchronized
  267. #define PWM_ENUPD_ENUPD4_GSYNC 0x00000300 // Globally Synchronized
  268. #define PWM_ENUPD_ENUPD3_M 0x000000C0 // PWM3 Enable Update Mode
  269. #define PWM_ENUPD_ENUPD3_IMM 0x00000000 // Immediate
  270. #define PWM_ENUPD_ENUPD3_LSYNC 0x00000080 // Locally Synchronized
  271. #define PWM_ENUPD_ENUPD3_GSYNC 0x000000C0 // Globally Synchronized
  272. #define PWM_ENUPD_ENUPD2_M 0x00000030 // PWM2 Enable Update Mode
  273. #define PWM_ENUPD_ENUPD2_IMM 0x00000000 // Immediate
  274. #define PWM_ENUPD_ENUPD2_LSYNC 0x00000020 // Locally Synchronized
  275. #define PWM_ENUPD_ENUPD2_GSYNC 0x00000030 // Globally Synchronized
  276. #define PWM_ENUPD_ENUPD1_M 0x0000000C // PWM1 Enable Update Mode
  277. #define PWM_ENUPD_ENUPD1_IMM 0x00000000 // Immediate
  278. #define PWM_ENUPD_ENUPD1_LSYNC 0x00000008 // Locally Synchronized
  279. #define PWM_ENUPD_ENUPD1_GSYNC 0x0000000C // Globally Synchronized
  280. #define PWM_ENUPD_ENUPD0_M 0x00000003 // PWM0 Enable Update Mode
  281. #define PWM_ENUPD_ENUPD0_IMM 0x00000000 // Immediate
  282. #define PWM_ENUPD_ENUPD0_LSYNC 0x00000002 // Locally Synchronized
  283. #define PWM_ENUPD_ENUPD0_GSYNC 0x00000003 // Globally Synchronized
  284. //*****************************************************************************
  285. //
  286. // The following are defines for the bit fields in the PWM_O_X_CTL register.
  287. //
  288. //*****************************************************************************
  289. #define PWM_X_CTL_LATCH 0x00040000 // Latch Fault Input
  290. #define PWM_X_CTL_MINFLTPER 0x00020000 // Minimum Fault Period
  291. #define PWM_X_CTL_FLTSRC 0x00010000 // Fault Condition Source
  292. #define PWM_X_CTL_DBFALLUPD_M 0x0000C000 // PWMnDBFALL Update Mode
  293. #define PWM_X_CTL_DBFALLUPD_I 0x00000000 // Immediate
  294. #define PWM_X_CTL_DBFALLUPD_LS 0x00008000 // Locally Synchronized
  295. #define PWM_X_CTL_DBFALLUPD_GS 0x0000C000 // Globally Synchronized
  296. #define PWM_X_CTL_DBRISEUPD_M 0x00003000 // PWMnDBRISE Update Mode
  297. #define PWM_X_CTL_DBRISEUPD_I 0x00000000 // Immediate
  298. #define PWM_X_CTL_DBRISEUPD_LS 0x00002000 // Locally Synchronized
  299. #define PWM_X_CTL_DBRISEUPD_GS 0x00003000 // Globally Synchronized
  300. #define PWM_X_CTL_DBCTLUPD_M 0x00000C00 // PWMnDBCTL Update Mode
  301. #define PWM_X_CTL_DBCTLUPD_I 0x00000000 // Immediate
  302. #define PWM_X_CTL_DBCTLUPD_LS 0x00000800 // Locally Synchronized
  303. #define PWM_X_CTL_DBCTLUPD_GS 0x00000C00 // Globally Synchronized
  304. #define PWM_X_CTL_GENBUPD_M 0x00000300 // PWMnGENB Update Mode
  305. #define PWM_X_CTL_GENBUPD_I 0x00000000 // Immediate
  306. #define PWM_X_CTL_GENBUPD_LS 0x00000200 // Locally Synchronized
  307. #define PWM_X_CTL_GENBUPD_GS 0x00000300 // Globally Synchronized
  308. #define PWM_X_CTL_GENAUPD_M 0x000000C0 // PWMnGENA Update Mode
  309. #define PWM_X_CTL_GENAUPD_I 0x00000000 // Immediate
  310. #define PWM_X_CTL_GENAUPD_LS 0x00000080 // Locally Synchronized
  311. #define PWM_X_CTL_GENAUPD_GS 0x000000C0 // Globally Synchronized
  312. #define PWM_X_CTL_CMPBUPD 0x00000020 // Comparator B Update Mode
  313. #define PWM_X_CTL_CMPAUPD 0x00000010 // Comparator A Update Mode
  314. #define PWM_X_CTL_LOADUPD 0x00000008 // Load Register Update Mode
  315. #define PWM_X_CTL_DEBUG 0x00000004 // Debug Mode
  316. #define PWM_X_CTL_MODE 0x00000002 // Counter Mode
  317. #define PWM_X_CTL_ENABLE 0x00000001 // PWM Block Enable
  318. //*****************************************************************************
  319. //
  320. // The following are defines for the bit fields in the PWM_O_X_INTEN register.
  321. //
  322. //*****************************************************************************
  323. #define PWM_X_INTEN_TRCMPBD 0x00002000 // Trigger for Counter=PWMnCMPB
  324. // Down
  325. #define PWM_X_INTEN_TRCMPBU 0x00001000 // Trigger for Counter=PWMnCMPB Up
  326. #define PWM_X_INTEN_TRCMPAD 0x00000800 // Trigger for Counter=PWMnCMPA
  327. // Down
  328. #define PWM_X_INTEN_TRCMPAU 0x00000400 // Trigger for Counter=PWMnCMPA Up
  329. #define PWM_X_INTEN_TRCNTLOAD 0x00000200 // Trigger for Counter=PWMnLOAD
  330. #define PWM_X_INTEN_TRCNTZERO 0x00000100 // Trigger for Counter=0
  331. #define PWM_X_INTEN_INTCMPBD 0x00000020 // Interrupt for Counter=PWMnCMPB
  332. // Down
  333. #define PWM_X_INTEN_INTCMPBU 0x00000010 // Interrupt for Counter=PWMnCMPB
  334. // Up
  335. #define PWM_X_INTEN_INTCMPAD 0x00000008 // Interrupt for Counter=PWMnCMPA
  336. // Down
  337. #define PWM_X_INTEN_INTCMPAU 0x00000004 // Interrupt for Counter=PWMnCMPA
  338. // Up
  339. #define PWM_X_INTEN_INTCNTLOAD 0x00000002 // Interrupt for Counter=PWMnLOAD
  340. #define PWM_X_INTEN_INTCNTZERO 0x00000001 // Interrupt for Counter=0
  341. //*****************************************************************************
  342. //
  343. // The following are defines for the bit fields in the PWM_O_X_RIS register.
  344. //
  345. //*****************************************************************************
  346. #define PWM_X_RIS_INTCMPBD 0x00000020 // Comparator B Down Interrupt
  347. // Status
  348. #define PWM_X_RIS_INTCMPBU 0x00000010 // Comparator B Up Interrupt Status
  349. #define PWM_X_RIS_INTCMPAD 0x00000008 // Comparator A Down Interrupt
  350. // Status
  351. #define PWM_X_RIS_INTCMPAU 0x00000004 // Comparator A Up Interrupt Status
  352. #define PWM_X_RIS_INTCNTLOAD 0x00000002 // Counter=Load Interrupt Status
  353. #define PWM_X_RIS_INTCNTZERO 0x00000001 // Counter=0 Interrupt Status
  354. //*****************************************************************************
  355. //
  356. // The following are defines for the bit fields in the PWM_O_X_ISC register.
  357. //
  358. //*****************************************************************************
  359. #define PWM_X_ISC_INTCMPBD 0x00000020 // Comparator B Down Interrupt
  360. #define PWM_X_ISC_INTCMPBU 0x00000010 // Comparator B Up Interrupt
  361. #define PWM_X_ISC_INTCMPAD 0x00000008 // Comparator A Down Interrupt
  362. #define PWM_X_ISC_INTCMPAU 0x00000004 // Comparator A Up Interrupt
  363. #define PWM_X_ISC_INTCNTLOAD 0x00000002 // Counter=Load Interrupt
  364. #define PWM_X_ISC_INTCNTZERO 0x00000001 // Counter=0 Interrupt
  365. //*****************************************************************************
  366. //
  367. // The following are defines for the bit fields in the PWM_O_X_LOAD register.
  368. //
  369. //*****************************************************************************
  370. #define PWM_X_LOAD_M 0x0000FFFF // Counter Load Value
  371. #define PWM_X_LOAD_S 0
  372. //*****************************************************************************
  373. //
  374. // The following are defines for the bit fields in the PWM_O_X_COUNT register.
  375. //
  376. //*****************************************************************************
  377. #define PWM_X_COUNT_M 0x0000FFFF // Counter Value
  378. #define PWM_X_COUNT_S 0
  379. //*****************************************************************************
  380. //
  381. // The following are defines for the bit fields in the PWM_O_X_CMPA register.
  382. //
  383. //*****************************************************************************
  384. #define PWM_X_CMPA_M 0x0000FFFF // Comparator A Value
  385. #define PWM_X_CMPA_S 0
  386. //*****************************************************************************
  387. //
  388. // The following are defines for the bit fields in the PWM_O_X_CMPB register.
  389. //
  390. //*****************************************************************************
  391. #define PWM_X_CMPB_M 0x0000FFFF // Comparator B Value
  392. #define PWM_X_CMPB_S 0
  393. //*****************************************************************************
  394. //
  395. // The following are defines for the bit fields in the PWM_O_X_GENA register.
  396. //
  397. //*****************************************************************************
  398. #define PWM_X_GENA_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down
  399. #define PWM_X_GENA_ACTCMPBD_NONE \
  400. 0x00000000 // Do nothing
  401. #define PWM_X_GENA_ACTCMPBD_INV 0x00000400 // Invert pwmA
  402. #define PWM_X_GENA_ACTCMPBD_ZERO \
  403. 0x00000800 // Drive pwmA Low
  404. #define PWM_X_GENA_ACTCMPBD_ONE 0x00000C00 // Drive pwmA High
  405. #define PWM_X_GENA_ACTCMPBU_M 0x00000300 // Action for Comparator B Up
  406. #define PWM_X_GENA_ACTCMPBU_NONE \
  407. 0x00000000 // Do nothing
  408. #define PWM_X_GENA_ACTCMPBU_INV 0x00000100 // Invert pwmA
  409. #define PWM_X_GENA_ACTCMPBU_ZERO \
  410. 0x00000200 // Drive pwmA Low
  411. #define PWM_X_GENA_ACTCMPBU_ONE 0x00000300 // Drive pwmA High
  412. #define PWM_X_GENA_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down
  413. #define PWM_X_GENA_ACTCMPAD_NONE \
  414. 0x00000000 // Do nothing
  415. #define PWM_X_GENA_ACTCMPAD_INV 0x00000040 // Invert pwmA
  416. #define PWM_X_GENA_ACTCMPAD_ZERO \
  417. 0x00000080 // Drive pwmA Low
  418. #define PWM_X_GENA_ACTCMPAD_ONE 0x000000C0 // Drive pwmA High
  419. #define PWM_X_GENA_ACTCMPAU_M 0x00000030 // Action for Comparator A Up
  420. #define PWM_X_GENA_ACTCMPAU_NONE \
  421. 0x00000000 // Do nothing
  422. #define PWM_X_GENA_ACTCMPAU_INV 0x00000010 // Invert pwmA
  423. #define PWM_X_GENA_ACTCMPAU_ZERO \
  424. 0x00000020 // Drive pwmA Low
  425. #define PWM_X_GENA_ACTCMPAU_ONE 0x00000030 // Drive pwmA High
  426. #define PWM_X_GENA_ACTLOAD_M 0x0000000C // Action for Counter=LOAD
  427. #define PWM_X_GENA_ACTLOAD_NONE 0x00000000 // Do nothing
  428. #define PWM_X_GENA_ACTLOAD_INV 0x00000004 // Invert pwmA
  429. #define PWM_X_GENA_ACTLOAD_ZERO 0x00000008 // Drive pwmA Low
  430. #define PWM_X_GENA_ACTLOAD_ONE 0x0000000C // Drive pwmA High
  431. #define PWM_X_GENA_ACTZERO_M 0x00000003 // Action for Counter=0
  432. #define PWM_X_GENA_ACTZERO_NONE 0x00000000 // Do nothing
  433. #define PWM_X_GENA_ACTZERO_INV 0x00000001 // Invert pwmA
  434. #define PWM_X_GENA_ACTZERO_ZERO 0x00000002 // Drive pwmA Low
  435. #define PWM_X_GENA_ACTZERO_ONE 0x00000003 // Drive pwmA High
  436. //*****************************************************************************
  437. //
  438. // The following are defines for the bit fields in the PWM_O_X_GENB register.
  439. //
  440. //*****************************************************************************
  441. #define PWM_X_GENB_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down
  442. #define PWM_X_GENB_ACTCMPBD_NONE \
  443. 0x00000000 // Do nothing
  444. #define PWM_X_GENB_ACTCMPBD_INV 0x00000400 // Invert pwmB
  445. #define PWM_X_GENB_ACTCMPBD_ZERO \
  446. 0x00000800 // Drive pwmB Low
  447. #define PWM_X_GENB_ACTCMPBD_ONE 0x00000C00 // Drive pwmB High
  448. #define PWM_X_GENB_ACTCMPBU_M 0x00000300 // Action for Comparator B Up
  449. #define PWM_X_GENB_ACTCMPBU_NONE \
  450. 0x00000000 // Do nothing
  451. #define PWM_X_GENB_ACTCMPBU_INV 0x00000100 // Invert pwmB
  452. #define PWM_X_GENB_ACTCMPBU_ZERO \
  453. 0x00000200 // Drive pwmB Low
  454. #define PWM_X_GENB_ACTCMPBU_ONE 0x00000300 // Drive pwmB High
  455. #define PWM_X_GENB_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down
  456. #define PWM_X_GENB_ACTCMPAD_NONE \
  457. 0x00000000 // Do nothing
  458. #define PWM_X_GENB_ACTCMPAD_INV 0x00000040 // Invert pwmB
  459. #define PWM_X_GENB_ACTCMPAD_ZERO \
  460. 0x00000080 // Drive pwmB Low
  461. #define PWM_X_GENB_ACTCMPAD_ONE 0x000000C0 // Drive pwmB High
  462. #define PWM_X_GENB_ACTCMPAU_M 0x00000030 // Action for Comparator A Up
  463. #define PWM_X_GENB_ACTCMPAU_NONE \
  464. 0x00000000 // Do nothing
  465. #define PWM_X_GENB_ACTCMPAU_INV 0x00000010 // Invert pwmB
  466. #define PWM_X_GENB_ACTCMPAU_ZERO \
  467. 0x00000020 // Drive pwmB Low
  468. #define PWM_X_GENB_ACTCMPAU_ONE 0x00000030 // Drive pwmB High
  469. #define PWM_X_GENB_ACTLOAD_M 0x0000000C // Action for Counter=LOAD
  470. #define PWM_X_GENB_ACTLOAD_NONE 0x00000000 // Do nothing
  471. #define PWM_X_GENB_ACTLOAD_INV 0x00000004 // Invert pwmB
  472. #define PWM_X_GENB_ACTLOAD_ZERO 0x00000008 // Drive pwmB Low
  473. #define PWM_X_GENB_ACTLOAD_ONE 0x0000000C // Drive pwmB High
  474. #define PWM_X_GENB_ACTZERO_M 0x00000003 // Action for Counter=0
  475. #define PWM_X_GENB_ACTZERO_NONE 0x00000000 // Do nothing
  476. #define PWM_X_GENB_ACTZERO_INV 0x00000001 // Invert pwmB
  477. #define PWM_X_GENB_ACTZERO_ZERO 0x00000002 // Drive pwmB Low
  478. #define PWM_X_GENB_ACTZERO_ONE 0x00000003 // Drive pwmB High
  479. //*****************************************************************************
  480. //
  481. // The following are defines for the bit fields in the PWM_O_X_DBCTL register.
  482. //
  483. //*****************************************************************************
  484. #define PWM_X_DBCTL_ENABLE 0x00000001 // Dead-Band Generator Enable
  485. //*****************************************************************************
  486. //
  487. // The following are defines for the bit fields in the PWM_O_X_DBRISE register.
  488. //
  489. //*****************************************************************************
  490. #define PWM_X_DBRISE_DELAY_M 0x00000FFF // Dead-Band Rise Delay
  491. #define PWM_X_DBRISE_DELAY_S 0
  492. //*****************************************************************************
  493. //
  494. // The following are defines for the bit fields in the PWM_O_X_DBFALL register.
  495. //
  496. //*****************************************************************************
  497. #define PWM_X_DBFALL_DELAY_M 0x00000FFF // Dead-Band Fall Delay
  498. #define PWM_X_DBFALL_DELAY_S 0
  499. //*****************************************************************************
  500. //
  501. // The following are defines for the bit fields in the PWM_O_X_FLTSRC0
  502. // register.
  503. //
  504. //*****************************************************************************
  505. #define PWM_X_FLTSRC0_FAULT3 0x00000008 // Fault3 Input
  506. #define PWM_X_FLTSRC0_FAULT2 0x00000004 // Fault2 Input
  507. #define PWM_X_FLTSRC0_FAULT1 0x00000002 // Fault1 Input
  508. #define PWM_X_FLTSRC0_FAULT0 0x00000001 // Fault0 Input
  509. //*****************************************************************************
  510. //
  511. // The following are defines for the bit fields in the PWM_O_X_FLTSRC1
  512. // register.
  513. //
  514. //*****************************************************************************
  515. #define PWM_X_FLTSRC1_DCMP7 0x00000080 // Digital Comparator 7
  516. #define PWM_X_FLTSRC1_DCMP6 0x00000040 // Digital Comparator 6
  517. #define PWM_X_FLTSRC1_DCMP5 0x00000020 // Digital Comparator 5
  518. #define PWM_X_FLTSRC1_DCMP4 0x00000010 // Digital Comparator 4
  519. #define PWM_X_FLTSRC1_DCMP3 0x00000008 // Digital Comparator 3
  520. #define PWM_X_FLTSRC1_DCMP2 0x00000004 // Digital Comparator 2
  521. #define PWM_X_FLTSRC1_DCMP1 0x00000002 // Digital Comparator 1
  522. #define PWM_X_FLTSRC1_DCMP0 0x00000001 // Digital Comparator 0
  523. //*****************************************************************************
  524. //
  525. // The following are defines for the bit fields in the PWM_O_X_MINFLTPER
  526. // register.
  527. //
  528. //*****************************************************************************
  529. #define PWM_X_MINFLTPER_M 0x0000FFFF // Minimum Fault Period
  530. #define PWM_X_MINFLTPER_S 0
  531. //*****************************************************************************
  532. //
  533. // The following are defines for the bit fields in the PWM_O_X_FLTSEN register.
  534. //
  535. //*****************************************************************************
  536. #define PWM_X_FLTSEN_FAULT3 0x00000008 // Fault3 Sense
  537. #define PWM_X_FLTSEN_FAULT2 0x00000004 // Fault2 Sense
  538. #define PWM_X_FLTSEN_FAULT1 0x00000002 // Fault1 Sense
  539. #define PWM_X_FLTSEN_FAULT0 0x00000001 // Fault0 Sense
  540. //*****************************************************************************
  541. //
  542. // The following are defines for the bit fields in the PWM_O_X_FLTSTAT0
  543. // register.
  544. //
  545. //*****************************************************************************
  546. #define PWM_X_FLTSTAT0_FAULT3 0x00000008 // Fault Input 3
  547. #define PWM_X_FLTSTAT0_FAULT2 0x00000004 // Fault Input 2
  548. #define PWM_X_FLTSTAT0_FAULT1 0x00000002 // Fault Input 1
  549. #define PWM_X_FLTSTAT0_FAULT0 0x00000001 // Fault Input 0
  550. //*****************************************************************************
  551. //
  552. // The following are defines for the bit fields in the PWM_O_X_FLTSTAT1
  553. // register.
  554. //
  555. //*****************************************************************************
  556. #define PWM_X_FLTSTAT1_DCMP7 0x00000080 // Digital Comparator 7 Trigger
  557. #define PWM_X_FLTSTAT1_DCMP6 0x00000040 // Digital Comparator 6 Trigger
  558. #define PWM_X_FLTSTAT1_DCMP5 0x00000020 // Digital Comparator 5 Trigger
  559. #define PWM_X_FLTSTAT1_DCMP4 0x00000010 // Digital Comparator 4 Trigger
  560. #define PWM_X_FLTSTAT1_DCMP3 0x00000008 // Digital Comparator 3 Trigger
  561. #define PWM_X_FLTSTAT1_DCMP2 0x00000004 // Digital Comparator 2 Trigger
  562. #define PWM_X_FLTSTAT1_DCMP1 0x00000002 // Digital Comparator 1 Trigger
  563. #define PWM_X_FLTSTAT1_DCMP0 0x00000001 // Digital Comparator 0 Trigger
  564. //*****************************************************************************
  565. //
  566. // The following are defines for the PWM Generator standard offsets.
  567. //
  568. //*****************************************************************************
  569. #define PWM_O_X_CTL 0x00000000 // Gen Control Reg
  570. #define PWM_O_X_INTEN 0x00000004 // Gen Int/Trig Enable Reg
  571. #define PWM_O_X_RIS 0x00000008 // Gen Raw Int Status Reg
  572. #define PWM_O_X_ISC 0x0000000C // Gen Int Status Reg
  573. #define PWM_O_X_LOAD 0x00000010 // Gen Load Reg
  574. #define PWM_O_X_COUNT 0x00000014 // Gen Counter Reg
  575. #define PWM_O_X_CMPA 0x00000018 // Gen Compare A Reg
  576. #define PWM_O_X_CMPB 0x0000001C // Gen Compare B Reg
  577. #define PWM_O_X_GENA 0x00000020 // Gen Generator A Ctrl Reg
  578. #define PWM_O_X_GENB 0x00000024 // Gen Generator B Ctrl Reg
  579. #define PWM_O_X_DBCTL 0x00000028 // Gen Dead Band Ctrl Reg
  580. #define PWM_O_X_DBRISE 0x0000002C // Gen DB Rising Edge Delay Reg
  581. #define PWM_O_X_DBFALL 0x00000030 // Gen DB Falling Edge Delay Reg
  582. #define PWM_O_X_FLTSRC0 0x00000034 // Fault pin, comparator condition
  583. #define PWM_O_X_FLTSRC1 0x00000038 // Digital comparator condition
  584. #define PWM_O_X_MINFLTPER 0x0000003C // Fault minimum period extension
  585. #define PWM_GEN_0_OFFSET 0x00000040 // PWM0 base
  586. #define PWM_GEN_1_OFFSET 0x00000080 // PWM1 base
  587. #define PWM_GEN_2_OFFSET 0x000000C0 // PWM2 base
  588. #define PWM_GEN_3_OFFSET 0x00000100 // PWM3 base
  589. //*****************************************************************************
  590. //
  591. // The following are defines for the PWM Generator extended offsets.
  592. //
  593. //*****************************************************************************
  594. #define PWM_O_X_FLTSEN 0x00000000 // Fault logic sense
  595. #define PWM_O_X_FLTSTAT0 0x00000004 // Pin and comparator status
  596. #define PWM_O_X_FLTSTAT1 0x00000008 // Digital comparator status
  597. #define PWM_EXT_0_OFFSET 0x00000800 // PWM0 extended base
  598. #define PWM_EXT_1_OFFSET 0x00000880 // PWM1 extended base
  599. #define PWM_EXT_2_OFFSET 0x00000900 // PWM2 extended base
  600. #define PWM_EXT_3_OFFSET 0x00000980 // PWM3 extended base
  601. //*****************************************************************************
  602. //
  603. // The following definitions are deprecated.
  604. //
  605. //*****************************************************************************
  606. #ifndef DEPRECATED
  607. //*****************************************************************************
  608. //
  609. // The following are deprecated defines for the bit fields in the PWM_O_CTL
  610. // register.
  611. //
  612. //*****************************************************************************
  613. #define PWM_CTL_GLOBAL_SYNC2 0x00000004 // Global sync generator 2
  614. #define PWM_CTL_GLOBAL_SYNC1 0x00000002 // Global sync generator 1
  615. #define PWM_CTL_GLOBAL_SYNC0 0x00000001 // Global sync generator 0
  616. //*****************************************************************************
  617. //
  618. // The following are deprecated defines for the bit fields in the PWM_O_STATUS
  619. // register.
  620. //
  621. //*****************************************************************************
  622. #define PWM_STATUS_FAULT 0x00000001 // Fault Interrupt Status
  623. //*****************************************************************************
  624. //
  625. // The following are deprecated defines for the PWM Interrupt Register bit
  626. // definitions.
  627. //
  628. //*****************************************************************************
  629. #define PWM_INT_INTFAULT 0x00010000 // Fault interrupt pending
  630. //*****************************************************************************
  631. //
  632. // The following are deprecated defines for the PWM_X Interrupt Status Register
  633. // bit definitions.
  634. //
  635. //*****************************************************************************
  636. #define PWM_X_INT_INTCMPBD 0x00000020 // PWM_X_COUNT = PWM_X_CMPB D rcvd
  637. #define PWM_X_INT_INTCMPBU 0x00000010 // PWM_X_COUNT = PWM_X_CMPB U rcvd
  638. #define PWM_X_INT_INTCMPAD 0x00000008 // PWM_X_COUNT = PWM_X_CMPA D rcvd
  639. #define PWM_X_INT_INTCMPAU 0x00000004 // PWM_X_COUNT = PWM_X_CMPA U rcvd
  640. #define PWM_X_INT_INTCNTLOAD 0x00000002 // PWM_X_COUNT = PWM_X_LOAD rcvd
  641. #define PWM_X_INT_INTCNTZERO 0x00000001 // PWM_X_COUNT = 0 received
  642. //*****************************************************************************
  643. //
  644. // The following are deprecated defines for the PWM_X Generator A/B Control
  645. // Register bit definitions.
  646. //
  647. //*****************************************************************************
  648. #define PWM_X_GEN_Y_ACTCMPBD 0x00000C00 // Act PWM_X_COUNT = PWM_X_CMPB D
  649. #define PWM_X_GEN_Y_ACTCMPBU 0x00000300 // Act PWM_X_COUNT = PWM_X_CMPB U
  650. #define PWM_X_GEN_Y_ACTCMPAD 0x000000C0 // Act PWM_X_COUNT = PWM_X_CMPA D
  651. #define PWM_X_GEN_Y_ACTCMPAU 0x00000030 // Act PWM_X_COUNT = PWM_X_CMPA U
  652. #define PWM_X_GEN_Y_ACTLOAD 0x0000000C // Act PWM_X_COUNT = PWM_X_LOAD
  653. #define PWM_X_GEN_Y_ACTZERO 0x00000003 // Act PWM_X_COUNT = 0
  654. //*****************************************************************************
  655. //
  656. // The following are deprecated defines for the PWM_X Generator A/B Control
  657. // Register action definitions.
  658. //
  659. //*****************************************************************************
  660. #define PWM_GEN_ACT_ONE 0x00000003 // Set the output signal to one
  661. #define PWM_GEN_ACT_ZERO 0x00000002 // Set the output signal to zero
  662. #define PWM_GEN_ACT_INV 0x00000001 // Invert the output signal
  663. #define PWM_GEN_ACT_NONE 0x00000000 // Do nothing
  664. #define PWM_GEN_ACT_B_DN_SHIFT 10 // Shift amount for the B dn action
  665. #define PWM_GEN_ACT_B_UP_SHIFT 8 // Shift amount for the B up action
  666. #define PWM_GEN_ACT_A_DN_SHIFT 6 // Shift amount for the A dn action
  667. #define PWM_GEN_ACT_A_UP_SHIFT 4 // Shift amount for the A up action
  668. #define PWM_GEN_ACT_LOAD_SHIFT 2 // Shift amount for the load action
  669. #define PWM_GEN_ACT_ZERO_SHIFT 0 // Shift amount for the zero action
  670. //*****************************************************************************
  671. //
  672. // The following are deprecated defines for the PWM_X Dead Band Control
  673. // Register bit definitions.
  674. //
  675. //*****************************************************************************
  676. #define PWM_DBCTL_ENABLE 0x00000001 // Enable dead band insertion
  677. //*****************************************************************************
  678. //
  679. // The following are deprecated defines for the PWM Register reset values.
  680. //
  681. //*****************************************************************************
  682. #define PWM_RV_X_DBCTL 0x00000000 // Control the dead band generator
  683. #define PWM_RV_STATUS 0x00000000 // Status
  684. #define PWM_RV_X_ISC 0x00000000 // Interrupt status and clearing
  685. #define PWM_RV_X_RIS 0x00000000 // Raw interrupt status
  686. #define PWM_RV_X_CTL 0x00000000 // Master control of the PWM
  687. // generator block
  688. #define PWM_RV_SYNC 0x00000000 // Counter synch for PWM generators
  689. #define PWM_RV_X_DBFALL 0x00000000 // The dead band falling edge delay
  690. // count
  691. #define PWM_RV_X_INTEN 0x00000000 // Interrupt and trigger enable
  692. #define PWM_RV_X_LOAD 0x00000000 // The load value for the counter
  693. #define PWM_RV_X_GENA 0x00000000 // Controls PWM generator A
  694. #define PWM_RV_CTL 0x00000000 // Master control of the PWM module
  695. #define PWM_RV_FAULT 0x00000000 // Fault handling for the PWM
  696. // output pins
  697. #define PWM_RV_RIS 0x00000000 // Raw interrupt status
  698. #define PWM_RV_X_CMPA 0x00000000 // The comparator A value
  699. #define PWM_RV_INVERT 0x00000000 // Inversion control for PWM output
  700. // pins
  701. #define PWM_RV_X_DBRISE 0x00000000 // The dead band rising edge delay
  702. // count
  703. #define PWM_RV_ENABLE 0x00000000 // Master enable for the PWM output
  704. // pins
  705. #define PWM_RV_X_GENB 0x00000000 // Controls PWM generator B
  706. #define PWM_RV_X_CMPB 0x00000000 // The comparator B value
  707. #define PWM_RV_ISC 0x00000000 // Interrupt status and clearing
  708. #define PWM_RV_INTEN 0x00000000 // Interrupt enable
  709. #define PWM_RV_X_COUNT 0x00000000 // The current counter value
  710. #endif
  711. #endif // __HW_PWM_H__