f2803xbmsk.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. /* ==================================================================================
  2. File name: F2803XBMSK.H
  3. Originator: Digital Control Systems Group
  4. Texas Instruments
  5. Description:
  6. Header file containing handy bitmasks for setting up register values.
  7. This file defines the bitmasks for F2803X.
  8. Target: TMS320F280x family
  9. =====================================================================================
  10. History:
  11. -------------------------------------------------------------------------------------
  12. 04-15-2009 Version 1.0:
  13. ------------------------------------------------------------------------------------*/
  14. #ifndef __F280X_BMSK_H__
  15. #define __F280X_BMSK_H__
  16. /*------------------------------------------------------------------------------
  17. F280X Time-Base Control Register (TBCTL)
  18. ------------------------------------------------------------------------------*/
  19. #define TIMER_CNT_UP 0x0000
  20. #define TIMER_CNT_DN 0x0001
  21. #define TIMER_CNT_UPDN 0x0002
  22. #define TIMER_STOP 0x0003
  23. #define CNTLD_ENABLE 0x0004
  24. #define CNTLD_DISABLE 0x0000
  25. #define PRDLD_IMMEDIATE 0x0008
  26. #define PRDLD_SHADOW 0x0000
  27. #define SYNCOSEL_EPWMSYNCI 0x0000
  28. #define SYNCOSEL_CNT_EQ 0x0010
  29. #define SYNCOSEL_CMPB_EQ 0x0020
  30. #define SYNCOSEL_DISABLE 0x0030
  31. #define HSPCLKDIV_PRESCALE_X_1 0x0000
  32. #define HSPCLKDIV_PRESCALE_X_2 0x0080
  33. #define HSPCLKDIV_PRESCALE_X_4 0x0100
  34. #define HSPCLKDIV_PRESCALE_X_6 0x0180
  35. #define HSPCLKDIV_PRESCALE_X_8 0x0200
  36. #define HSPCLKDIV_PRESCALE_X_10 0x0280
  37. #define HSPCLKDIV_PRESCALE_X_12 0x0300
  38. #define HSPCLKDIV_PRESCALE_X_14 0x0380
  39. #define CLKDIV_PRESCALE_X_1 0x0000
  40. #define CLKDIV_PRESCALE_X_2 0x0400
  41. #define CLKDIV_PRESCALE_X_4 0x0800
  42. #define CLKDIV_PRESCALE_X_8 0x0C00
  43. #define CLKDIV_PRESCALE_X_16 0x1000
  44. #define CLKDIV_PRESCALE_X_32 0x1400
  45. #define CLKDIV_PRESCALE_X_64 0x1800
  46. #define CLKDIV_PRESCALE_X_128 0x1C00
  47. #define PHSDIR_CNT_UP 0x2000
  48. #define PHSDIR_CNT_DN 0x0000
  49. #define FREE_RUN_FLAG 0x8000
  50. #define SOFT_STOP_FLAG 0x4000
  51. /*------------------------------------------------------------------------------
  52. F280X Compare Control Registers (CMPCTL)
  53. ------------------------------------------------------------------------------*/
  54. #define LOADAMODE_ZRO 0x0000
  55. #define LOADAMODE_PRD 0x0001
  56. #define LOADAMODE_ZRO_PRD 0x0002
  57. #define LOADAMODE_FRZ 0x0003
  58. #define LOADBMODE_ZRO 0x0000
  59. #define LOADBMODE_PRD 0x0004
  60. #define LOADBMODE_ZRO_PRD 0x0008
  61. #define LOADBMODE_FRZ 0x000C
  62. #define SHDWAMODE_IMMEDIATE 0x0010
  63. #define SHDWAMODE_SHADOW 0x0000
  64. #define SHDWBMODE_IMMEDIATE 0x0040
  65. #define SHDWBMODE_SHADOW 0x0000
  66. /*------------------------------------------------------------------------------
  67. F280X Action Qualifier Output A/B Control Registers (AQCTLA/AQCTLB)
  68. ------------------------------------------------------------------------------*/
  69. #define ZRO_NOTHING 0x0000
  70. #define ZRO_CLEAR 0x0001
  71. #define ZRO_SET 0x0002
  72. #define ZRO_TOGGLE 0x0003
  73. #define PRD_NOTHING 0x0000
  74. #define PRD_CLEAR 0x0004
  75. #define PRD_SET 0x0008
  76. #define PRD_TOGGLE 0x000C
  77. #define CAU_NOTHING 0x0000
  78. #define CAU_CLEAR 0x0010
  79. #define CAU_SET 0x0020
  80. #define CAU_TOGGLE 0x0030
  81. #define CAD_NOTHING 0x0000
  82. #define CAD_CLEAR 0x0040
  83. #define CAD_SET 0x0080
  84. #define CAD_TOGGLE 0x00C0
  85. #define CBU_NOTHING 0x0000
  86. #define CBU_CLEAR 0x0100
  87. #define CBU_SET 0x0200
  88. #define CBU_TOGGLE 0x0300
  89. #define CBD_NOTHING 0x0000
  90. #define CBD_CLEAR 0x0400
  91. #define CBD_SET 0x0800
  92. #define CBD_TOGGLE 0x0C00
  93. /*------------------------------------------------------------------------------
  94. F280X Action Qualifier S/W Force Register (AQSFRC)
  95. ------------------------------------------------------------------------------*/
  96. #define ACTSFA_NOTHING 0x0000
  97. #define ACTSFA_CLEAR 0x0001
  98. #define ACTSFA_SET 0x0002
  99. #define ACTSFA_TOGGLE 0x0003
  100. #define ACTSFB_NOTHING 0x0000
  101. #define ACTSFB_CLEAR 0x0008
  102. #define ACTSFB_SET 0x0010
  103. #define ACTSFB_TOGGLE 0x0018
  104. #define RLDCSF_ZRO 0x0000
  105. #define RLDCSF_PRD 0x0040
  106. #define RLDCSF_ZRO_PRD 0x0080
  107. #define RLDCSF_IMMEDIATE 0x00C0
  108. /*------------------------------------------------------------------------------
  109. F280X Action Qualifier Continuous S/W Force Register (AQCSFRC)
  110. ------------------------------------------------------------------------------*/
  111. #define CSFA_DISABLE 0x0000
  112. #define CSFA_LOW 0x0001
  113. #define CSFA_HIGH 0x0002
  114. #define CSFB_DISABLE 0x0000
  115. #define CSFB_LOW 0x0004
  116. #define CSFB_HIGH 0x0008
  117. /*------------------------------------------------------------------------------
  118. F280X Dead-Band Generator Control Register (DBCTL)
  119. ------------------------------------------------------------------------------*/
  120. #define BP_DISABLE 0x0000
  121. #define BP_BYPASSA_FLA 0x0001
  122. #define BP_BYPASSB_RSA 0x0002
  123. #define BP_ENABLE 0x0003
  124. #define POLSEL_ACTIVE_HI 0x0000
  125. #define POLSEL_ACTIVE_LO_CMP 0x0004
  126. #define POLSEL_ACTIVE_HI_CMP 0x0008
  127. #define POLSEL_ACTIVE_LO 0x000C
  128. /*------------------------------------------------------------------------------
  129. F280X PWM Chopper Control Register (PCCTL)
  130. ------------------------------------------------------------------------------*/
  131. #define CHPEN_ENABLE 0x0001
  132. #define CHPEN_DISABLE 0x0000
  133. #define OSHTWTH_X_1 0x0000
  134. #define OSHTWTH_X_2 0x0002
  135. #define OSHTWTH_X_3 0x0004
  136. #define OSHTWTH_X_4 0x0006
  137. #define OSHTWTH_X_5 0x0008
  138. #define OSHTWTH_X_6 0x000A
  139. #define OSHTWTH_X_7 0x000C
  140. #define OSHTWTH_X_8 0x000E
  141. #define OSHTWTH_X_9 0x0010
  142. #define OSHTWTH_X_10 0x0012
  143. #define OSHTWTH_X_11 0x0014
  144. #define OSHTWTH_X_12 0x0016
  145. #define OSHTWTH_X_13 0x0018
  146. #define OSHTWTH_X_14 0x001A
  147. #define OSHTWTH_X_15 0x001C
  148. #define OSHTWTH_X_16 0x001E
  149. #define CHPFREQ_X_1 0x0000
  150. #define CHPFREQ_X_2 0x0020
  151. #define CHPFREQ_X_3 0x0040
  152. #define CHPFREQ_X_4 0x0060
  153. #define CHPFREQ_X_5 0x0080
  154. #define CHPFREQ_X_6 0x00A0
  155. #define CHPFREQ_X_7 0x00C0
  156. #define CHPFREQ_X_8 0x00E0
  157. #define CHPDUTY_X_1 0x0000
  158. #define CHPDUTY_X_2 0x0100
  159. #define CHPDUTY_X_3 0x0200
  160. #define CHPDUTY_X_4 0x0300
  161. #define CHPDUTY_X_5 0x0400
  162. #define CHPDUTY_X_6 0x0500
  163. #define CHPDUTY_X_7 0x0600
  164. /*------------------------------------------------------------------------------
  165. F280X Trip Zone Select Register (TZSEL)
  166. ------------------------------------------------------------------------------*/
  167. #define DISABLE_TZSEL 0x0000
  168. #define DISABLE_TZ1_CBC 0x0000
  169. #define ENABLE_TZ1_CBC 0x0001
  170. #define DISABLE_TZ2_CBC 0x0000
  171. #define ENABLE_TZ2_CBC 0x0002
  172. #define DISABLE_TZ3_CBC 0x0000
  173. #define ENABLE_TZ3_CBC 0x0004
  174. #define DISABLE_TZ4_CBC 0x0000
  175. #define ENABLE_TZ4_CBC 0x0008
  176. #define DISABLE_TZ5_CBC 0x0000
  177. #define ENABLE_TZ5_CBC 0x0010
  178. #define DISABLE_TZ6_CBC 0x0000
  179. #define ENABLE_TZ6_CBC 0x0020
  180. #define DISABLE_DCAEVT2_CBC 0x0000
  181. #define ENABLE_DCAEVT2_CBC 0x0040
  182. #define DISABLE_DCBEVT2_CBC 0x0000
  183. #define ENABLE_DCBEVT2_CBC 0x0080
  184. #define DISABLE_TZ1_OST 0x0000
  185. #define ENABLE_TZ1_OST 0x0100
  186. #define DISABLE_TZ2_OST 0x0000
  187. #define ENABLE_TZ2_OST 0x0200
  188. #define DISABLE_TZ3_OST 0x0000
  189. #define ENABLE_TZ3_OST 0x0400
  190. #define DISABLE_TZ4_OST 0x0000
  191. #define ENABLE_TZ4_OST 0x0800
  192. #define DISABLE_TZ5_OST 0x0000
  193. #define ENABLE_TZ5_OST 0x1000
  194. #define DISABLE_TZ6_OST 0x0000
  195. #define ENABLE_TZ6_OST 0x2000
  196. #define DISABLE_DCAEVT1_OST 0x0000
  197. #define ENABLE_DCAEVT1_OST 0x4000
  198. #define DISABLE_DCBEVT1_OST 0x0000
  199. #define ENABLE_DCBEVT1_OST 0x8000
  200. /*------------------------------------------------------------------------------
  201. F280X Trip Zone Control Register (TZCTL)
  202. ------------------------------------------------------------------------------*/
  203. #define TZA_HI_Z 0x0000
  204. #define TZA_FORCE_HI 0x0001
  205. #define TZA_FORCE_LO 0x0002
  206. #define TZA_NOTHING 0x0003
  207. #define TZB_HI_Z 0x0000
  208. #define TZB_FORCE_HI 0x0004
  209. #define TZB_FORCE_LO 0x0008
  210. #define TZB_NOTHING 0x000C
  211. #define DCAEVT1_HI_Z 0x0000
  212. #define DCAEVT1_FORCE_HI 0x0010
  213. #define DCAEVT1_FORCE_LO 0x0020
  214. #define DCAEVT1_NOTHING 0x0030
  215. #define DCAEVT2_HI_Z 0x0000
  216. #define DCAEVT2_FORCE_HI 0x0040
  217. #define DCAEVT2_FORCE_LO 0x0080
  218. #define DCAEVT2_NOTHING 0x00C0
  219. #define DCBEVT1_HI_Z 0x0000
  220. #define DCBEVT1_FORCE_HI 0x0100
  221. #define DCBEVT1_FORCE_LO 0x0200
  222. #define DCBEVT1_NOTHING 0x0300
  223. #define DCBEVT2_HI_Z 0x0000
  224. #define DCBEVT2_FORCE_HI 0x0400
  225. #define DCBEVT2_FORCE_LO 0x0800
  226. #define DCBEVT2_NOTHING 0x0C00
  227. /*------------------------------------------------------------------------------
  228. F280X Trip Enable Interrupt Register (TZEINT)
  229. ------------------------------------------------------------------------------*/
  230. #define DISABLE_CBC_INT 0x0000
  231. #define ENABLE_CBC_INT 0x0002
  232. #define DISABLE_OST_INT 0x0000
  233. #define ENABLE_OST_INT 0x0004
  234. #define DISABLE_DCAEVT1_INT 0x0000
  235. #define ENABLE_DCAEVT1_INT 0x0008
  236. #define DISABLE_DCAEVT2_INT 0x0000
  237. #define ENABLE_DCAEVT2_INT 0x0010
  238. #define DISABLE_DCBEVT1_INT 0x0000
  239. #define ENABLE_DCBEVT1_INT 0x0020
  240. #define DISABLE_DCBEVT2_INT 0x0000
  241. #define ENABLE_DCBEVT2_INT 0x0040
  242. /*------------------------------------------------------------------------------
  243. F280X Event Trigger Selection Register (ETSEL)
  244. ------------------------------------------------------------------------------*/
  245. #define INTSEL_CNT_ZERO 0x0001
  246. #define INTSEL_PRD_EQ 0x0002
  247. #define INTSEL_CMPA_EQ_UC 0x0004
  248. #define INTSEL_CMPA_EQ_DC 0x0005
  249. #define INTSEL_CMPB_EQ_UC 0x0006
  250. #define INTSEL_CMPB_EQ_DC 0x0007
  251. #define INTSEL_DISABLE 0x0000
  252. #define INTSEL_ENABLE 0x0008
  253. #define SOCASEL_CNT_ZERO 0x0100
  254. #define SOCASEL_PRD_EQ 0x0200
  255. #define SOCASEL_CMPA_EQ_UC 0x0400
  256. #define SOCASEL_CMPA_EQ_DC 0x0500
  257. #define SOCASEL_CMPB_EQ_UC 0x0600
  258. #define SOCASEL_CMPB_EQ_DC 0x0700
  259. #define SOCASEL_DISABLE 0x0000
  260. #define SOCASEL_ENABLE 0x0800
  261. #define SOCBSEL_CNT_ZERO 0x1000
  262. #define SOCBSEL_PRD_EQ 0x2000
  263. #define SOCBSEL_CMPA_EQ_UC 0x4000
  264. #define SOCBSEL_CMPA_EQ_DC 0x5000
  265. #define SOCBSEL_CMPB_EQ_UC 0x6000
  266. #define SOCBSEL_CMPB_EQ_DC 0x7000
  267. #define SOCBSEL_DISABLE 0x0000
  268. #define SOCBSEL_ENABLE 0x8000
  269. /*------------------------------------------------------------------------------
  270. F280X Event Trigger Pre-Scale Register (ETPS)
  271. ------------------------------------------------------------------------------*/
  272. #define INTPRD_DISABLE 0x0000
  273. #define INTPRD_ONE_EVENT 0x0001
  274. #define INTPRD_TWO_EVENT 0x0002
  275. #define INTPRD_THREE_EVENT 0x0003
  276. #define SOCAPRD_DISABLE 0x0000
  277. #define SOCAPRD_ONE_EVENT 0x0100
  278. #define SOCAPRD_TWO_EVENT 0x0200
  279. #define SOCAPRD_THREE_EVENT 0x0300
  280. #define SOCBPRD_DISABLE 0x0000
  281. #define SOCBPRD_ONE_EVENT 0x1000
  282. #define SOCBPRD_TWO_EVENT 0x2000
  283. #define SOCBPRD_THREE_EVENT 0x3000
  284. /*------------------------------------------------------------------------------
  285. F280X ECAP Control Register 1 (ECCTL1)
  286. ------------------------------------------------------------------------------*/
  287. #define CAP1POL_RISING_EDGE 0x0000
  288. #define CAP1POL_FALLING_EDGE 0x0001
  289. #define CTRRST1_ABSOLUTE_TS 0x0000
  290. #define CTRRST1_DIFFERENCE_TS 0x0002
  291. #define CAP2POL_RISING_EDGE 0x0000
  292. #define CAP2POL_FALLING_EDGE 0x0004
  293. #define CTRRST2_ABSOLUTE_TS 0x0000
  294. #define CTRRST2_DIFFERENCE_TS 0x0008
  295. #define CAP3POL_RISING_EDGE 0x0000
  296. #define CAP3POL_FALLING_EDGE 0x0010
  297. #define CTRRST3_ABSOLUTE_TS 0x0000
  298. #define CTRRST3_DIFFERENCE_TS 0x0020
  299. #define CAP4POL_RISING_EDGE 0x0000
  300. #define CAP4POL_FALLING_EDGE 0x0040
  301. #define CTRRST4_ABSOLUTE_TS 0x0000
  302. #define CTRRST4_DIFFERENCE_TS 0x0080
  303. #define CAPLDEN_DISABLE 0x0000
  304. #define CAPLDEN_ENABLE 0x0100
  305. #define EVTFLTPS_X_1 0x0000
  306. #define EVTFLTPS_X_2 0x0200
  307. #define EVTFLTPS_X_4 0x0400
  308. #define EVTFLTPS_X_6 0x0600
  309. #define EVTFLTPS_X_8 0x0800
  310. #define EVTFLTPS_X_10 0x0A00
  311. #define EVTFLTPS_X_12 0x0C00
  312. #define EVTFLTPS_X_14 0x0E00
  313. #define EVTFLTPS_X_16 0x1000
  314. #define EVTFLTPS_X_18 0x1200
  315. #define EVTFLTPS_X_20 0x1400
  316. #define EVTFLTPS_X_22 0x1600
  317. #define EVTFLTPS_X_24 0x1800
  318. #define EVTFLTPS_X_26 0x1A00
  319. #define EVTFLTPS_X_28 0x1C00
  320. #define EVTFLTPS_X_30 0x1E00
  321. #define EVTFLTPS_X_32 0x2000
  322. #define EVTFLTPS_X_34 0x2200
  323. #define EVTFLTPS_X_36 0x2400
  324. #define EVTFLTPS_X_38 0x2600
  325. #define EVTFLTPS_X_40 0x2800
  326. #define EVTFLTPS_X_42 0x2A00
  327. #define EVTFLTPS_X_44 0x2C00
  328. #define EVTFLTPS_X_46 0x2E00
  329. #define EVTFLTPS_X_48 0x3000
  330. #define EVTFLTPS_X_50 0x3200
  331. #define EVTFLTPS_X_52 0x3400
  332. #define EVTFLTPS_X_54 0x3600
  333. #define EVTFLTPS_X_56 0x3800
  334. #define EVTFLTPS_X_58 0x3A00
  335. #define EVTFLTPS_X_60 0x3C00
  336. #define EVTFLTPS_X_62 0x3E00
  337. #define EMULATION_SOFT 0x0000
  338. #define EMULATION_FREE 0x8000
  339. /*------------------------------------------------------------------------------
  340. F280X ECAP Control Register 2 (ECCTL2)
  341. ------------------------------------------------------------------------------*/
  342. #define CONTINUOUS_MODE 0x0000
  343. #define ONE_SHOT_MODE 0x0001
  344. #define ONESHT_CAP_EV1 0x0000
  345. #define ONESHT_CAP_EV2 0x0002
  346. #define ONESHT_CAP_EV3 0x0004
  347. #define ONESHT_CAP_EV4 0x0006
  348. #define TSCNTSTP_STOP 0x0000
  349. #define TSCNTSTP_FREE 0x0010
  350. #define SYNCI_DISABLE 0x0000
  351. #define SYNCI_ENABLE 0x0020
  352. #define SYNCO_SYNC_IN 0x0000
  353. #define SYNCO_PRD_EQ 0x0040
  354. #define SYNCO_DISABLE 0x0080
  355. #define CAPTURE_MODE 0x0000
  356. #define APWM_MODE 0x0200
  357. #define APWMPOL_HIGH 0x0000
  358. #define APWMPOL_LOW 0x0400
  359. /*------------------------------------------------------------------------------
  360. F280X EQEP Decode Control Register (QDECCTL)
  361. ------------------------------------------------------------------------------*/
  362. #define QSP_NO_EFFECT 0x0000
  363. #define QSP_NEGATE 0x0020
  364. #define QIP_NO_EFFECT 0x0000
  365. #define QIP_NEGATE 0x0040
  366. #define QBP_NO_EFFECT 0x0000
  367. #define QBP_NEGATE 0x0080
  368. #define QAP_NO_EFFECT 0x0000
  369. #define QAP_NEGATE 0x0100
  370. #define IGATE_DISABLE 0x0000
  371. #define IGATE_WITH_STROBE 0x0200
  372. #define SWAP_DISABLE 0x0000
  373. #define SWAP_ENABLE 0x0400
  374. #define XCR_X2 0x0000
  375. #define XCR_X1 0x0800
  376. #define SPSEL_INDEX 0x0000
  377. #define SPSEL_STROBE 0x1000
  378. #define SOEN_DISABLE 0x0000
  379. #define SOEN_ENABLE 0x2000
  380. #define QSRC_QUAD_MODE 0x0000
  381. #define QSRC_DIR_MODE 0x4000
  382. #define QSRC_UPCNT_MODE 0x8000
  383. #define QSRC_DWNCNT_MODE 0xC000
  384. /*------------------------------------------------------------------------------
  385. F280X EQEP Control Register (QEPCTL)
  386. ------------------------------------------------------------------------------*/
  387. #define WDE_DISABLE 0x0000
  388. #define WDE_ENABLE 0x0001
  389. #define UTE_DISABLE 0x0000
  390. #define UTE_ENABLE 0x0002
  391. #define QCLM_POSCNT 0x0000
  392. #define QCLM_TIME_OUT 0x0004
  393. #define QPEN_RESET 0x0000
  394. #define QPEN_ENABLE 0x0008
  395. #define IEL_RISING 0x0010
  396. #define IEL_FALLING 0x0020
  397. #define IEL_SOFTWARE 0x0030
  398. #define SEL_RISING 0x0000
  399. #define SEL_RISING_FALLING 0x0040
  400. #define SWI_DISABLE 0x0000
  401. #define SWI_POSCNT_INIT 0x0080
  402. #define IEI_RISING 0x0200
  403. #define IEI_FALLING 0x0300
  404. #define SEI_RISING 0x0800
  405. #define SEI_RISING_FALLING 0x0C00
  406. #define PCRM_INDEX 0x0000
  407. #define PCRM_POSMAX 0x1000
  408. #define PCRM_FIRST_INDEX 0x2000
  409. #define PCRM_TIME_EVENT 0x3000
  410. #define QEP_EMULATION_SOFT 0x4000
  411. #define QEP_EMULATION_FREE 0x8000
  412. /*------------------------------------------------------------------------------
  413. F280X EQEP Position-Compare Control Register (QPOSCTL)
  414. ------------------------------------------------------------------------------*/
  415. #define PCE_DISABLE 0x0000
  416. #define PCE_ENABLE 0x1000
  417. #define PCPOL_HIGH 0x0000
  418. #define PCPOL_LOW 0x2000
  419. #define PCLOAD_ZERO 0x0000
  420. #define PCLOAD_QPOSCMP 0x4000
  421. #define PCSHDW_DISABLE 0x0000
  422. #define PCSHDW_ENABLE 0x8000
  423. /*------------------------------------------------------------------------------
  424. F280X EQEP Capture Control Register (QCAPCTL)
  425. ------------------------------------------------------------------------------*/
  426. #define UPPS_X1 0x0000
  427. #define UPPS_X2 0x0001
  428. #define UPPS_X3 0x0002
  429. #define UPPS_X8 0x0003
  430. #define UPPS_X16 0x0004
  431. #define UPPS_X32 0x0005
  432. #define UPPS_X64 0x0006
  433. #define UPPS_X128 0x0007
  434. #define UPPS_X256 0x0008
  435. #define UPPS_X512 0x0009
  436. #define UPPS_X1024 0x000A
  437. #define UPPS_X2048 0x000B
  438. #define CCPS_X1 0x0000
  439. #define CCPS_X2 0x0010
  440. #define CCPS_X4 0x0020
  441. #define CCPS_X8 0x0030
  442. #define CCPS_X16 0x0040
  443. #define CCPS_X32 0x0050
  444. #define CCPS_X64 0x0060
  445. #define CCPS_X128 0x0070
  446. #define CEN_DISABLE 0x0000
  447. #define CEN_ENABLE 0x8000
  448. /*------------------------------------------------------------------------------
  449. F280X Register ADCTRL1
  450. ------------------------------------------------------------------------------*/
  451. #define ADC_SUS_MODE0 0x0000
  452. #define ADC_SUS_MODE1 0X1000
  453. #define ADC_SUS_MODE2 0x2000
  454. #define ADC_SUS_MODE3 0X3000
  455. #define ADC_RESET_FLAG 0x4000
  456. #define ADC_ACQ_PS_1 0x0000
  457. #define ADC_ACQ_PS_2 0x0100
  458. #define ADC_ACQ_PS_3 0x0200
  459. #define ADC_ACQ_PS_4 0x0300
  460. #define ADC_ACQ_PS_5 0x0400
  461. #define ADC_ACQ_PS_6 0x0500
  462. #define ADC_ACQ_PS_7 0x0600
  463. #define ADC_ACQ_PS_8 0x0700
  464. #define ADC_ACQ_PS_9 0x0800
  465. #define ADC_ACQ_PS_10 0x0900
  466. #define ADC_ACQ_PS_11 0x0A00
  467. #define ADC_ACQ_PS_12 0x0B00
  468. #define ADC_ACQ_PS_13 0x0C00
  469. #define ADC_ACQ_PS_14 0x0D00
  470. #define ADC_ACQ_PS_15 0x0E00
  471. #define ADC_ACQ_PS_16 0x0F00
  472. #define ADC_CPS_1 0x0000
  473. #define ADC_CPS_2 0x0080
  474. #define ADC_CONT_RUN 0x0040
  475. #define ADC_SEQ_CASC 0x0010
  476. #define ADC_SEQ_DUAL 0x0000
  477. /*------------------------------------------------------------------------------
  478. F280X Register ADCTRL2
  479. ------------------------------------------------------------------------------*/
  480. #define ADC_EPWM_SOCB 0x8000
  481. #define ADC_RST_SEQ1 0x4000
  482. #define ADC_SOC_SEQ1 0x2000
  483. #define ADC_INT_ENA_SEQ1 0x0800
  484. #define ADC_INT_MODE_SEQ1 0X0400
  485. #define ADC_EPWM_SOCA_SEQ1 0x0100
  486. #define ADC_EXT_SOC_SEQ1 0x0080
  487. #define ADC_RST_SEQ2 0x0040
  488. #define ADC_SOC_SEQ2 0x0020
  489. #define ADC_INT_ENA_SEQ2 0x0008
  490. #define ADC_INT_MODE_SEQ2 0x0004
  491. #define ADC_EPWM_SOCB_SEQ2 0x0001
  492. /*------------------------------------------------------------------------------
  493. F280X Register ADCTRL3
  494. ------------------------------------------------------------------------------*/
  495. #define ADC_RFDN 0x0080
  496. #define ADC_BGDN 0x0040
  497. #define ADC_PWDN 0x0020
  498. #define ADC_CLKPS_X_1 0x0000
  499. #define ADC_CLKPS_X_2 0x0002
  500. #define ADC_CLKPS_X_4 0x0004
  501. #define ADC_CLKPS_X_6 0x0006
  502. #define ADC_CLKPS_X_8 0x0008
  503. #define ADC_CLKPS_X_10 0x000A
  504. #define ADC_CLKPS_X_12 0x000C
  505. #define ADC_CLKPS_X_14 0x000E
  506. #define ADC_CLKPS_X_16 0x0010
  507. #define ADC_CLKPS_X_18 0x0012
  508. #define ADC_CLKPS_X_20 0x0014
  509. #define ADC_CLKPS_X_22 0x0016
  510. #define ADC_CLKPS_X_24 0x0018
  511. #define ADC_CLKPS_X_26 0x001A
  512. #define ADC_CLKPS_X_28 0x001C
  513. #define ADC_CLKPS_X_30 0x001E
  514. #define ADC_SMODE_SIMULTANEOUS 0x0001
  515. #define ADC_SMODE_SEQUENTIAL 0x0000
  516. #endif // __F280X_BMSK_H__
  517. // EOF