hw_adc.h 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888
  1. //*****************************************************************************
  2. //
  3. // Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
  4. //
  5. //
  6. // Redistribution and use in source and binary forms, with or without
  7. // modification, are permitted provided that the following conditions
  8. // are met:
  9. //
  10. // Redistributions of source code must retain the above copyright
  11. // notice, this list of conditions and the following disclaimer.
  12. //
  13. // Redistributions in binary form must reproduce the above copyright
  14. // notice, this list of conditions and the following disclaimer in the
  15. // documentation and/or other materials provided with the
  16. // distribution.
  17. //
  18. // Neither the name of Texas Instruments Incorporated nor the names of
  19. // its contributors may be used to endorse or promote products derived
  20. // from this software without specific prior written permission.
  21. //
  22. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  23. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  24. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  25. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  26. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  27. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  28. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  29. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  30. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  31. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  32. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33. //
  34. //*****************************************************************************
  35. #ifndef __HW_ADC_H__
  36. #define __HW_ADC_H__
  37. //*****************************************************************************
  38. //
  39. // The following are defines for the ADC register offsets.
  40. //
  41. //*****************************************************************************
  42. #define ADC_O_ADC_CTRL 0x00000000 // ADC control register.
  43. #define ADC_O_adc_ch0_gain 0x00000004 // Channel 0 gain setting
  44. #define ADC_O_adc_ch1_gain 0x00000008 // Channel 1 gain setting
  45. #define ADC_O_adc_ch2_gain 0x0000000C // Channel 2 gain setting
  46. #define ADC_O_adc_ch3_gain 0x00000010 // Channel 3 gain setting
  47. #define ADC_O_adc_ch4_gain 0x00000014 // Channel 4 gain setting
  48. #define ADC_O_adc_ch5_gain 0x00000018 // Channel 5 gain setting
  49. #define ADC_O_adc_ch6_gain 0x0000001C // Channel 6 gain setting
  50. #define ADC_O_adc_ch7_gain 0x00000020 // Channel 7 gain setting
  51. #define ADC_O_adc_ch0_irq_en 0x00000024 // Channel 0 interrupt enable
  52. // register
  53. #define ADC_O_adc_ch1_irq_en 0x00000028 // Channel 1 interrupt enable
  54. // register
  55. #define ADC_O_adc_ch2_irq_en 0x0000002C // Channel 2 interrupt enable
  56. // register
  57. #define ADC_O_adc_ch3_irq_en 0x00000030 // Channel 3 interrupt enable
  58. // register
  59. #define ADC_O_adc_ch4_irq_en 0x00000034 // Channel 4 interrupt enable
  60. // register
  61. #define ADC_O_adc_ch5_irq_en 0x00000038 // Channel 5 interrupt enable
  62. // register
  63. #define ADC_O_adc_ch6_irq_en 0x0000003C // Channel 6 interrupt enable
  64. // register
  65. #define ADC_O_adc_ch7_irq_en 0x00000040 // Channel 7 interrupt enable
  66. // register
  67. #define ADC_O_adc_ch0_irq_status \
  68. 0x00000044 // Channel 0 interrupt status
  69. // register
  70. #define ADC_O_adc_ch1_irq_status \
  71. 0x00000048 // Channel 1 interrupt status
  72. // register
  73. #define ADC_O_adc_ch2_irq_status \
  74. 0x0000004C
  75. #define ADC_O_adc_ch3_irq_status \
  76. 0x00000050 // Channel 3 interrupt status
  77. // register
  78. #define ADC_O_adc_ch4_irq_status \
  79. 0x00000054 // Channel 4 interrupt status
  80. // register
  81. #define ADC_O_adc_ch5_irq_status \
  82. 0x00000058
  83. #define ADC_O_adc_ch6_irq_status \
  84. 0x0000005C // Channel 6 interrupt status
  85. // register
  86. #define ADC_O_adc_ch7_irq_status \
  87. 0x00000060 // Channel 7 interrupt status
  88. // register
  89. #define ADC_O_adc_dma_mode_en 0x00000064 // DMA mode enable register
  90. #define ADC_O_adc_timer_configuration \
  91. 0x00000068 // ADC timer configuration register
  92. #define ADC_O_adc_timer_current_count \
  93. 0x00000070 // ADC timer current count register
  94. #define ADC_O_channel0FIFODATA 0x00000074 // CH0 FIFO DATA register
  95. #define ADC_O_channel1FIFODATA 0x00000078 // CH1 FIFO DATA register
  96. #define ADC_O_channel2FIFODATA 0x0000007C // CH2 FIFO DATA register
  97. #define ADC_O_channel3FIFODATA 0x00000080 // CH3 FIFO DATA register
  98. #define ADC_O_channel4FIFODATA 0x00000084 // CH4 FIFO DATA register
  99. #define ADC_O_channel5FIFODATA 0x00000088 // CH5 FIFO DATA register
  100. #define ADC_O_channel6FIFODATA 0x0000008C // CH6 FIFO DATA register
  101. #define ADC_O_channel7FIFODATA 0x00000090 // CH7 FIFO DATA register
  102. #define ADC_O_adc_ch0_fifo_lvl 0x00000094 // channel 0 FIFO Level register
  103. #define ADC_O_adc_ch1_fifo_lvl 0x00000098 // Channel 1 interrupt status
  104. // register
  105. #define ADC_O_adc_ch2_fifo_lvl 0x0000009C
  106. #define ADC_O_adc_ch3_fifo_lvl 0x000000A0 // Channel 3 interrupt status
  107. // register
  108. #define ADC_O_adc_ch4_fifo_lvl 0x000000A4 // Channel 4 interrupt status
  109. // register
  110. #define ADC_O_adc_ch5_fifo_lvl 0x000000A8
  111. #define ADC_O_adc_ch6_fifo_lvl 0x000000AC // Channel 6 interrupt status
  112. // register
  113. #define ADC_O_adc_ch7_fifo_lvl 0x000000B0 // Channel 7 interrupt status
  114. // register
  115. #define ADC_O_ADC_CH_ENABLE 0x000000B8
  116. //******************************************************************************
  117. //
  118. // The following are defines for the bit fields in the ADC_O_ADC_CTRL register.
  119. //
  120. //******************************************************************************
  121. #define ADC_ADC_CTRL_adc_cap_scale \
  122. 0x00000020 // ADC CAP SCALE.
  123. #define ADC_ADC_CTRL_adc_buf_bypass \
  124. 0x00000010 // ADC ANA CIO buffer bypass.
  125. // Signal is modelled in ANA TOP.
  126. // When '1': ADC buffer is bypassed.
  127. #define ADC_ADC_CTRL_adc_buf_en 0x00000008 // ADC ANA buffer enable. When 1:
  128. // ADC buffer is enabled.
  129. #define ADC_ADC_CTRL_adc_core_en \
  130. 0x00000004 // ANA ADC core en. This signal act
  131. // as glbal enable to ADC CIO. When
  132. // 1: ADC core is enabled.
  133. #define ADC_ADC_CTRL_adc_soft_reset \
  134. 0x00000002 // ADC soft reset. When '1' : reset
  135. // ADC internal logic.
  136. #define ADC_ADC_CTRL_adc_en 0x00000001 // ADC global enable. When set ADC
  137. // module is enabled
  138. //******************************************************************************
  139. //
  140. // The following are defines for the bit fields in the
  141. // ADC_O_adc_ch0_gain register.
  142. //
  143. //******************************************************************************
  144. #define ADC_adc_ch0_gain_adc_channel0_gain_M \
  145. 0x00000003 // gain setting for ADC channel 0.
  146. // when "00": 1x when "01: 2x when
  147. // "10":3x when "11" 4x
  148. #define ADC_adc_ch0_gain_adc_channel0_gain_S 0
  149. //******************************************************************************
  150. //
  151. // The following are defines for the bit fields in the
  152. // ADC_O_adc_ch1_gain register.
  153. //
  154. //******************************************************************************
  155. #define ADC_adc_ch1_gain_adc_channel1_gain_M \
  156. 0x00000003 // gain setting for ADC channel 1.
  157. // when "00": 1x when "01: 2x when
  158. // "10":3x when "11" 4x
  159. #define ADC_adc_ch1_gain_adc_channel1_gain_S 0
  160. //******************************************************************************
  161. //
  162. // The following are defines for the bit fields in the
  163. // ADC_O_adc_ch2_gain register.
  164. //
  165. //******************************************************************************
  166. #define ADC_adc_ch2_gain_adc_channel2_gain_M \
  167. 0x00000003 // gain setting for ADC channel 2.
  168. // when "00": 1x when "01: 2x when
  169. // "10":3x when "11" 4x
  170. #define ADC_adc_ch2_gain_adc_channel2_gain_S 0
  171. //******************************************************************************
  172. //
  173. // The following are defines for the bit fields in the
  174. // ADC_O_adc_ch3_gain register.
  175. //
  176. //******************************************************************************
  177. #define ADC_adc_ch3_gain_adc_channel3_gain_M \
  178. 0x00000003 // gain setting for ADC channel 3.
  179. // when "00": 1x when "01: 2x when
  180. // "10":3x when "11" 4x
  181. #define ADC_adc_ch3_gain_adc_channel3_gain_S 0
  182. //******************************************************************************
  183. //
  184. // The following are defines for the bit fields in the
  185. // ADC_O_adc_ch4_gain register.
  186. //
  187. //******************************************************************************
  188. #define ADC_adc_ch4_gain_adc_channel4_gain_M \
  189. 0x00000003 // gain setting for ADC channel 4
  190. // when "00": 1x when "01: 2x when
  191. // "10":3x when "11" 4x
  192. #define ADC_adc_ch4_gain_adc_channel4_gain_S 0
  193. //******************************************************************************
  194. //
  195. // The following are defines for the bit fields in the
  196. // ADC_O_adc_ch5_gain register.
  197. //
  198. //******************************************************************************
  199. #define ADC_adc_ch5_gain_adc_channel5_gain_M \
  200. 0x00000003 // gain setting for ADC channel 5.
  201. // when "00": 1x when "01: 2x when
  202. // "10":3x when "11" 4x
  203. #define ADC_adc_ch5_gain_adc_channel5_gain_S 0
  204. //******************************************************************************
  205. //
  206. // The following are defines for the bit fields in the
  207. // ADC_O_adc_ch6_gain register.
  208. //
  209. //******************************************************************************
  210. #define ADC_adc_ch6_gain_adc_channel6_gain_M \
  211. 0x00000003 // gain setting for ADC channel 6
  212. // when "00": 1x when "01: 2x when
  213. // "10":3x when "11" 4x
  214. #define ADC_adc_ch6_gain_adc_channel6_gain_S 0
  215. //******************************************************************************
  216. //
  217. // The following are defines for the bit fields in the
  218. // ADC_O_adc_ch7_gain register.
  219. //
  220. //******************************************************************************
  221. #define ADC_adc_ch7_gain_adc_channel7_gain_M \
  222. 0x00000003 // gain setting for ADC channel 7.
  223. // when "00": 1x when "01: 2x when
  224. // "10":3x when "11" 4x
  225. #define ADC_adc_ch7_gain_adc_channel7_gain_S 0
  226. //******************************************************************************
  227. //
  228. // The following are defines for the bit fields in the
  229. // ADC_O_adc_ch0_irq_en register.
  230. //
  231. //******************************************************************************
  232. #define ADC_adc_ch0_irq_en_adc_channel0_irq_en_M \
  233. 0x0000000F // interrupt enable register for
  234. // per ADC channel bit 3: when '1'
  235. // -> enable FIFO overflow interrupt
  236. // bit 2: when '1' -> enable FIFO
  237. // underflow interrupt bit 1: when
  238. // "1' -> enable FIFO empty
  239. // interrupt bit 0: when "1" ->
  240. // enable FIFO full interrupt
  241. #define ADC_adc_ch0_irq_en_adc_channel0_irq_en_S 0
  242. //******************************************************************************
  243. //
  244. // The following are defines for the bit fields in the
  245. // ADC_O_adc_ch1_irq_en register.
  246. //
  247. //******************************************************************************
  248. #define ADC_adc_ch1_irq_en_adc_channel1_irq_en_M \
  249. 0x0000000F // interrupt enable register for
  250. // per ADC channel bit 3: when '1'
  251. // -> enable FIFO overflow interrupt
  252. // bit 2: when '1' -> enable FIFO
  253. // underflow interrupt bit 1: when
  254. // "1' -> enable FIFO empty
  255. // interrupt bit 0: when "1" ->
  256. // enable FIFO full interrupt
  257. #define ADC_adc_ch1_irq_en_adc_channel1_irq_en_S 0
  258. //******************************************************************************
  259. //
  260. // The following are defines for the bit fields in the
  261. // ADC_O_adc_ch2_irq_en register.
  262. //
  263. //******************************************************************************
  264. #define ADC_adc_ch2_irq_en_adc_channel2_irq_en_M \
  265. 0x0000000F // interrupt enable register for
  266. // per ADC channel bit 3: when '1'
  267. // -> enable FIFO overflow interrupt
  268. // bit 2: when '1' -> enable FIFO
  269. // underflow interrupt bit 1: when
  270. // "1' -> enable FIFO empty
  271. // interrupt bit 0: when "1" ->
  272. // enable FIFO full interrupt
  273. #define ADC_adc_ch2_irq_en_adc_channel2_irq_en_S 0
  274. //******************************************************************************
  275. //
  276. // The following are defines for the bit fields in the
  277. // ADC_O_adc_ch3_irq_en register.
  278. //
  279. //******************************************************************************
  280. #define ADC_adc_ch3_irq_en_adc_channel3_irq_en_M \
  281. 0x0000000F // interrupt enable register for
  282. // per ADC channel bit 3: when '1'
  283. // -> enable FIFO overflow interrupt
  284. // bit 2: when '1' -> enable FIFO
  285. // underflow interrupt bit 1: when
  286. // "1' -> enable FIFO empty
  287. // interrupt bit 0: when "1" ->
  288. // enable FIFO full interrupt
  289. #define ADC_adc_ch3_irq_en_adc_channel3_irq_en_S 0
  290. //******************************************************************************
  291. //
  292. // The following are defines for the bit fields in the
  293. // ADC_O_adc_ch4_irq_en register.
  294. //
  295. //******************************************************************************
  296. #define ADC_adc_ch4_irq_en_adc_channel4_irq_en_M \
  297. 0x0000000F // interrupt enable register for
  298. // per ADC channel bit 3: when '1'
  299. // -> enable FIFO overflow interrupt
  300. // bit 2: when '1' -> enable FIFO
  301. // underflow interrupt bit 1: when
  302. // "1' -> enable FIFO empty
  303. // interrupt bit 0: when "1" ->
  304. // enable FIFO full interrupt
  305. #define ADC_adc_ch4_irq_en_adc_channel4_irq_en_S 0
  306. //******************************************************************************
  307. //
  308. // The following are defines for the bit fields in the
  309. // ADC_O_adc_ch5_irq_en register.
  310. //
  311. //******************************************************************************
  312. #define ADC_adc_ch5_irq_en_adc_channel5_irq_en_M \
  313. 0x0000000F // interrupt enable register for
  314. // per ADC channel bit 3: when '1'
  315. // -> enable FIFO overflow interrupt
  316. // bit 2: when '1' -> enable FIFO
  317. // underflow interrupt bit 1: when
  318. // "1' -> enable FIFO empty
  319. // interrupt bit 0: when "1" ->
  320. // enable FIFO full interrupt
  321. #define ADC_adc_ch5_irq_en_adc_channel5_irq_en_S 0
  322. //******************************************************************************
  323. //
  324. // The following are defines for the bit fields in the
  325. // ADC_O_adc_ch6_irq_en register.
  326. //
  327. //******************************************************************************
  328. #define ADC_adc_ch6_irq_en_adc_channel6_irq_en_M \
  329. 0x0000000F // interrupt enable register for
  330. // per ADC channel bit 3: when '1'
  331. // -> enable FIFO overflow interrupt
  332. // bit 2: when '1' -> enable FIFO
  333. // underflow interrupt bit 1: when
  334. // "1' -> enable FIFO empty
  335. // interrupt bit 0: when "1" ->
  336. // enable FIFO full interrupt
  337. #define ADC_adc_ch6_irq_en_adc_channel6_irq_en_S 0
  338. //******************************************************************************
  339. //
  340. // The following are defines for the bit fields in the
  341. // ADC_O_adc_ch7_irq_en register.
  342. //
  343. //******************************************************************************
  344. #define ADC_adc_ch7_irq_en_adc_channel7_irq_en_M \
  345. 0x0000000F // interrupt enable register for
  346. // per ADC channel bit 3: when '1'
  347. // -> enable FIFO overflow interrupt
  348. // bit 2: when '1' -> enable FIFO
  349. // underflow interrupt bit 1: when
  350. // "1' -> enable FIFO empty
  351. // interrupt bit 0: when "1" ->
  352. // enable FIFO full interrupt
  353. #define ADC_adc_ch7_irq_en_adc_channel7_irq_en_S 0
  354. //******************************************************************************
  355. //
  356. // The following are defines for the bit fields in the
  357. // ADC_O_adc_ch0_irq_status register.
  358. //
  359. //******************************************************************************
  360. #define ADC_adc_ch0_irq_status_adc_channel0_irq_status_M \
  361. 0x0000000F // interrupt status register for
  362. // per ADC channel. Interrupt status
  363. // can be cleared on write. bit 3:
  364. // when value '1' is written ->
  365. // would clear FIFO overflow
  366. // interrupt status in the next
  367. // cycle. if same interrupt is set
  368. // in the same cycle then interurpt
  369. // would be set and clear command
  370. // will be ignored. bit 2: when
  371. // value '1' is written -> would
  372. // clear FIFO underflow interrupt
  373. // status in the next cycle. bit 1:
  374. // when value '1' is written ->
  375. // would clear FIFO empty interrupt
  376. // status in the next cycle. bit 0:
  377. // when value '1' is written ->
  378. // would clear FIFO full interrupt
  379. // status in the next cycle.
  380. #define ADC_adc_ch0_irq_status_adc_channel0_irq_status_S 0
  381. //******************************************************************************
  382. //
  383. // The following are defines for the bit fields in the
  384. // ADC_O_adc_ch1_irq_status register.
  385. //
  386. //******************************************************************************
  387. #define ADC_adc_ch1_irq_status_adc_channel1_irq_status_M \
  388. 0x0000000F // interrupt status register for
  389. // per ADC channel. Interrupt status
  390. // can be cleared on write. bit 3:
  391. // when value '1' is written ->
  392. // would clear FIFO overflow
  393. // interrupt status in the next
  394. // cycle. if same interrupt is set
  395. // in the same cycle then interurpt
  396. // would be set and clear command
  397. // will be ignored. bit 2: when
  398. // value '1' is written -> would
  399. // clear FIFO underflow interrupt
  400. // status in the next cycle. bit 1:
  401. // when value '1' is written ->
  402. // would clear FIFO empty interrupt
  403. // status in the next cycle. bit 0:
  404. // when value '1' is written ->
  405. // would clear FIFO full interrupt
  406. // status in the next cycle.
  407. #define ADC_adc_ch1_irq_status_adc_channel1_irq_status_S 0
  408. //******************************************************************************
  409. //
  410. // The following are defines for the bit fields in the
  411. // ADC_O_adc_ch2_irq_status register.
  412. //
  413. //******************************************************************************
  414. #define ADC_adc_ch2_irq_status_adc_channel2_irq_status_M \
  415. 0x0000000F // interrupt status register for
  416. // per ADC channel. Interrupt status
  417. // can be cleared on write. bit 3:
  418. // when value '1' is written ->
  419. // would clear FIFO overflow
  420. // interrupt status in the next
  421. // cycle. if same interrupt is set
  422. // in the same cycle then interurpt
  423. // would be set and clear command
  424. // will be ignored. bit 2: when
  425. // value '1' is written -> would
  426. // clear FIFO underflow interrupt
  427. // status in the next cycle. bit 1:
  428. // when value '1' is written ->
  429. // would clear FIFO empty interrupt
  430. // status in the next cycle. bit 0:
  431. // when value '1' is written ->
  432. // would clear FIFO full interrupt
  433. // status in the next cycle.
  434. #define ADC_adc_ch2_irq_status_adc_channel2_irq_status_S 0
  435. //******************************************************************************
  436. //
  437. // The following are defines for the bit fields in the
  438. // ADC_O_adc_ch3_irq_status register.
  439. //
  440. //******************************************************************************
  441. #define ADC_adc_ch3_irq_status_adc_channel3_irq_status_M \
  442. 0x0000000F // interrupt status register for
  443. // per ADC channel. Interrupt status
  444. // can be cleared on write. bit 3:
  445. // when value '1' is written ->
  446. // would clear FIFO overflow
  447. // interrupt status in the next
  448. // cycle. if same interrupt is set
  449. // in the same cycle then interurpt
  450. // would be set and clear command
  451. // will be ignored. bit 2: when
  452. // value '1' is written -> would
  453. // clear FIFO underflow interrupt
  454. // status in the next cycle. bit 1:
  455. // when value '1' is written ->
  456. // would clear FIFO empty interrupt
  457. // status in the next cycle. bit 0:
  458. // when value '1' is written ->
  459. // would clear FIFO full interrupt
  460. // status in the next cycle.
  461. #define ADC_adc_ch3_irq_status_adc_channel3_irq_status_S 0
  462. //******************************************************************************
  463. //
  464. // The following are defines for the bit fields in the
  465. // ADC_O_adc_ch4_irq_status register.
  466. //
  467. //******************************************************************************
  468. #define ADC_adc_ch4_irq_status_adc_channel4_irq_status_M \
  469. 0x0000000F // interrupt status register for
  470. // per ADC channel. Interrupt status
  471. // can be cleared on write. bit 3:
  472. // when value '1' is written ->
  473. // would clear FIFO overflow
  474. // interrupt status in the next
  475. // cycle. if same interrupt is set
  476. // in the same cycle then interurpt
  477. // would be set and clear command
  478. // will be ignored. bit 2: when
  479. // value '1' is written -> would
  480. // clear FIFO underflow interrupt
  481. // status in the next cycle. bit 1:
  482. // when value '1' is written ->
  483. // would clear FIFO empty interrupt
  484. // status in the next cycle. bit 0:
  485. // when value '1' is written ->
  486. // would clear FIFO full interrupt
  487. // status in the next cycle.
  488. #define ADC_adc_ch4_irq_status_adc_channel4_irq_status_S 0
  489. //******************************************************************************
  490. //
  491. // The following are defines for the bit fields in the
  492. // ADC_O_adc_ch5_irq_status register.
  493. //
  494. //******************************************************************************
  495. #define ADC_adc_ch5_irq_status_adc_channel5_irq_status_M \
  496. 0x0000000F // interrupt status register for
  497. // per ADC channel. Interrupt status
  498. // can be cleared on write. bit 3:
  499. // when value '1' is written ->
  500. // would clear FIFO overflow
  501. // interrupt status in the next
  502. // cycle. if same interrupt is set
  503. // in the same cycle then interurpt
  504. // would be set and clear command
  505. // will be ignored. bit 2: when
  506. // value '1' is written -> would
  507. // clear FIFO underflow interrupt
  508. // status in the next cycle. bit 1:
  509. // when value '1' is written ->
  510. // would clear FIFO empty interrupt
  511. // status in the next cycle. bit 0:
  512. // when value '1' is written ->
  513. // would clear FIFO full interrupt
  514. // status in the next cycle.
  515. #define ADC_adc_ch5_irq_status_adc_channel5_irq_status_S 0
  516. //******************************************************************************
  517. //
  518. // The following are defines for the bit fields in the
  519. // ADC_O_adc_ch6_irq_status register.
  520. //
  521. //******************************************************************************
  522. #define ADC_adc_ch6_irq_status_adc_channel6_irq_status_M \
  523. 0x0000000F // interrupt status register for
  524. // per ADC channel. Interrupt status
  525. // can be cleared on write. bit 3:
  526. // when value '1' is written ->
  527. // would clear FIFO overflow
  528. // interrupt status in the next
  529. // cycle. if same interrupt is set
  530. // in the same cycle then interurpt
  531. // would be set and clear command
  532. // will be ignored. bit 2: when
  533. // value '1' is written -> would
  534. // clear FIFO underflow interrupt
  535. // status in the next cycle. bit 1:
  536. // when value '1' is written ->
  537. // would clear FIFO empty interrupt
  538. // status in the next cycle. bit 0:
  539. // when value '1' is written ->
  540. // would clear FIFO full interrupt
  541. // status in the next cycle.
  542. #define ADC_adc_ch6_irq_status_adc_channel6_irq_status_S 0
  543. //******************************************************************************
  544. //
  545. // The following are defines for the bit fields in the
  546. // ADC_O_adc_ch7_irq_status register.
  547. //
  548. //******************************************************************************
  549. #define ADC_adc_ch7_irq_status_adc_channel7_irq_status_M \
  550. 0x0000000F // interrupt status register for
  551. // per ADC channel. Interrupt status
  552. // can be cleared on write. bit 3:
  553. // when value '1' is written ->
  554. // would clear FIFO overflow
  555. // interrupt status in the next
  556. // cycle. if same interrupt is set
  557. // in the same cycle then interurpt
  558. // would be set and clear command
  559. // will be ignored. bit 2: when
  560. // value '1' is written -> would
  561. // clear FIFO underflow interrupt
  562. // status in the next cycle. bit 1:
  563. // when value '1' is written ->
  564. // would clear FIFO empty interrupt
  565. // status in the next cycle. bit 0:
  566. // when value '1' is written ->
  567. // would clear FIFO full interrupt
  568. // status in the next cycle.
  569. #define ADC_adc_ch7_irq_status_adc_channel7_irq_status_S 0
  570. //******************************************************************************
  571. //
  572. // The following are defines for the bit fields in the
  573. // ADC_O_adc_dma_mode_en register.
  574. //
  575. //******************************************************************************
  576. #define ADC_adc_dma_mode_en_DMA_MODEenable_M \
  577. 0x000000FF // this register enable DMA mode.
  578. // when '1' respective ADC channel
  579. // is enabled for DMA. When '0' only
  580. // interrupt mode is enabled. Bit 0:
  581. // channel 0 DMA mode enable. Bit 1:
  582. // channel 1 DMA mode enable. Bit 2:
  583. // channel 2 DMA mode enable. Bit 3:
  584. // channel 3 DMA mode enable. bit 4:
  585. // channel 4 DMA mode enable. bit 5:
  586. // channel 5 DMA mode enable. bit 6:
  587. // channel 6 DMA mode enable. bit 7:
  588. // channel 7 DMA mode enable.
  589. #define ADC_adc_dma_mode_en_DMA_MODEenable_S 0
  590. //******************************************************************************
  591. //
  592. // The following are defines for the bit fields in the
  593. // ADC_O_adc_timer_configuration register.
  594. //
  595. //******************************************************************************
  596. #define ADC_adc_timer_configuration_timeren \
  597. 0x02000000 // when '1' timer is enabled.
  598. #define ADC_adc_timer_configuration_timerreset \
  599. 0x01000000 // when '1' reset timer.
  600. #define ADC_adc_timer_configuration_timercount_M \
  601. 0x00FFFFFF // Timer count configuration. 17
  602. // bit counter is supported. Other
  603. // MSB's are redundent.
  604. #define ADC_adc_timer_configuration_timercount_S 0
  605. //******************************************************************************
  606. //
  607. // The following are defines for the bit fields in the
  608. // ADC_O_adc_timer_current_count register.
  609. //
  610. //******************************************************************************
  611. #define ADC_adc_timer_current_count_timercurrentcount_M \
  612. 0x0001FFFF // Timer count configuration
  613. #define ADC_adc_timer_current_count_timercurrentcount_S 0
  614. //******************************************************************************
  615. //
  616. // The following are defines for the bit fields in the
  617. // ADC_O_channel0FIFODATA register.
  618. //
  619. //******************************************************************************
  620. #define ADC_channel0FIFODATA_FIFO_RD_DATA_M \
  621. 0xFFFFFFFF // read to this register would
  622. // return ADC data along with time
  623. // stamp information in following
  624. // format: bits [13:0] : ADC sample
  625. // bits [31:14]: : time stamp per
  626. // ADC sample
  627. #define ADC_channel0FIFODATA_FIFO_RD_DATA_S 0
  628. //******************************************************************************
  629. //
  630. // The following are defines for the bit fields in the
  631. // ADC_O_channel1FIFODATA register.
  632. //
  633. //******************************************************************************
  634. #define ADC_channel1FIFODATA_FIFO_RD_DATA_M \
  635. 0xFFFFFFFF // read to this register would
  636. // return ADC data along with time
  637. // stamp information in following
  638. // format: bits [13:0] : ADC sample
  639. // bits [31:14]: : time stamp per
  640. // ADC sample
  641. #define ADC_channel1FIFODATA_FIFO_RD_DATA_S 0
  642. //******************************************************************************
  643. //
  644. // The following are defines for the bit fields in the
  645. // ADC_O_channel2FIFODATA register.
  646. //
  647. //******************************************************************************
  648. #define ADC_channel2FIFODATA_FIFO_RD_DATA_M \
  649. 0xFFFFFFFF // read to this register would
  650. // return ADC data along with time
  651. // stamp information in following
  652. // format: bits [13:0] : ADC sample
  653. // bits [31:14]: : time stamp per
  654. // ADC sample
  655. #define ADC_channel2FIFODATA_FIFO_RD_DATA_S 0
  656. //******************************************************************************
  657. //
  658. // The following are defines for the bit fields in the
  659. // ADC_O_channel3FIFODATA register.
  660. //
  661. //******************************************************************************
  662. #define ADC_channel3FIFODATA_FIFO_RD_DATA_M \
  663. 0xFFFFFFFF // read to this register would
  664. // return ADC data along with time
  665. // stamp information in following
  666. // format: bits [13:0] : ADC sample
  667. // bits [31:14]: : time stamp per
  668. // ADC sample
  669. #define ADC_channel3FIFODATA_FIFO_RD_DATA_S 0
  670. //******************************************************************************
  671. //
  672. // The following are defines for the bit fields in the
  673. // ADC_O_channel4FIFODATA register.
  674. //
  675. //******************************************************************************
  676. #define ADC_channel4FIFODATA_FIFO_RD_DATA_M \
  677. 0xFFFFFFFF // read to this register would
  678. // return ADC data along with time
  679. // stamp information in following
  680. // format: bits [13:0] : ADC sample
  681. // bits [31:14]: : time stamp per
  682. // ADC sample
  683. #define ADC_channel4FIFODATA_FIFO_RD_DATA_S 0
  684. //******************************************************************************
  685. //
  686. // The following are defines for the bit fields in the
  687. // ADC_O_channel5FIFODATA register.
  688. //
  689. //******************************************************************************
  690. #define ADC_channel5FIFODATA_FIFO_RD_DATA_M \
  691. 0xFFFFFFFF // read to this register would
  692. // return ADC data along with time
  693. // stamp information in following
  694. // format: bits [13:0] : ADC sample
  695. // bits [31:14]: : time stamp per
  696. // ADC sample
  697. #define ADC_channel5FIFODATA_FIFO_RD_DATA_S 0
  698. //******************************************************************************
  699. //
  700. // The following are defines for the bit fields in the
  701. // ADC_O_channel6FIFODATA register.
  702. //
  703. //******************************************************************************
  704. #define ADC_channel6FIFODATA_FIFO_RD_DATA_M \
  705. 0xFFFFFFFF // read to this register would
  706. // return ADC data along with time
  707. // stamp information in following
  708. // format: bits [13:0] : ADC sample
  709. // bits [31:14]: : time stamp per
  710. // ADC sample
  711. #define ADC_channel6FIFODATA_FIFO_RD_DATA_S 0
  712. //******************************************************************************
  713. //
  714. // The following are defines for the bit fields in the
  715. // ADC_O_channel7FIFODATA register.
  716. //
  717. //******************************************************************************
  718. #define ADC_channel7FIFODATA_FIFO_RD_DATA_M \
  719. 0xFFFFFFFF // read to this register would
  720. // return ADC data along with time
  721. // stamp information in following
  722. // format: bits [13:0] : ADC sample
  723. // bits [31:14]: : time stamp per
  724. // ADC sample
  725. #define ADC_channel7FIFODATA_FIFO_RD_DATA_S 0
  726. //******************************************************************************
  727. //
  728. // The following are defines for the bit fields in the
  729. // ADC_O_adc_ch0_fifo_lvl register.
  730. //
  731. //******************************************************************************
  732. #define ADC_adc_ch0_fifo_lvl_adc_channel0_fifo_lvl_M \
  733. 0x00000007 // This register shows current FIFO
  734. // level. FIFO is 4 word wide.
  735. // Possible supported levels are :
  736. // 0x0 to 0x3
  737. #define ADC_adc_ch0_fifo_lvl_adc_channel0_fifo_lvl_S 0
  738. //******************************************************************************
  739. //
  740. // The following are defines for the bit fields in the
  741. // ADC_O_adc_ch1_fifo_lvl register.
  742. //
  743. //******************************************************************************
  744. #define ADC_adc_ch1_fifo_lvl_adc_channel1_fifo_lvl_M \
  745. 0x00000007 // This register shows current FIFO
  746. // level. FIFO is 4 word wide.
  747. // Possible supported levels are :
  748. // 0x0 to 0x3
  749. #define ADC_adc_ch1_fifo_lvl_adc_channel1_fifo_lvl_S 0
  750. //******************************************************************************
  751. //
  752. // The following are defines for the bit fields in the
  753. // ADC_O_adc_ch2_fifo_lvl register.
  754. //
  755. //******************************************************************************
  756. #define ADC_adc_ch2_fifo_lvl_adc_channel2_fifo_lvl_M \
  757. 0x00000007 // This register shows current FIFO
  758. // level. FIFO is 4 word wide.
  759. // Possible supported levels are :
  760. // 0x0 to 0x3
  761. #define ADC_adc_ch2_fifo_lvl_adc_channel2_fifo_lvl_S 0
  762. //******************************************************************************
  763. //
  764. // The following are defines for the bit fields in the
  765. // ADC_O_adc_ch3_fifo_lvl register.
  766. //
  767. //******************************************************************************
  768. #define ADC_adc_ch3_fifo_lvl_adc_channel3_fifo_lvl_M \
  769. 0x00000007 // This register shows current FIFO
  770. // level. FIFO is 4 word wide.
  771. // Possible supported levels are :
  772. // 0x0 to 0x3
  773. #define ADC_adc_ch3_fifo_lvl_adc_channel3_fifo_lvl_S 0
  774. //******************************************************************************
  775. //
  776. // The following are defines for the bit fields in the
  777. // ADC_O_adc_ch4_fifo_lvl register.
  778. //
  779. //******************************************************************************
  780. #define ADC_adc_ch4_fifo_lvl_adc_channel4_fifo_lvl_M \
  781. 0x00000007 // This register shows current FIFO
  782. // level. FIFO is 4 word wide.
  783. // Possible supported levels are :
  784. // 0x0 to 0x3
  785. #define ADC_adc_ch4_fifo_lvl_adc_channel4_fifo_lvl_S 0
  786. //******************************************************************************
  787. //
  788. // The following are defines for the bit fields in the
  789. // ADC_O_adc_ch5_fifo_lvl register.
  790. //
  791. //******************************************************************************
  792. #define ADC_adc_ch5_fifo_lvl_adc_channel5_fifo_lvl_M \
  793. 0x00000007 // This register shows current FIFO
  794. // level. FIFO is 4 word wide.
  795. // Possible supported levels are :
  796. // 0x0 to 0x3
  797. #define ADC_adc_ch5_fifo_lvl_adc_channel5_fifo_lvl_S 0
  798. //******************************************************************************
  799. //
  800. // The following are defines for the bit fields in the
  801. // ADC_O_adc_ch6_fifo_lvl register.
  802. //
  803. //******************************************************************************
  804. #define ADC_adc_ch6_fifo_lvl_adc_channel6_fifo_lvl_M \
  805. 0x00000007 // This register shows current FIFO
  806. // level. FIFO is 4 word wide.
  807. // Possible supported levels are :
  808. // 0x0 to 0x3
  809. #define ADC_adc_ch6_fifo_lvl_adc_channel6_fifo_lvl_S 0
  810. //******************************************************************************
  811. //
  812. // The following are defines for the bit fields in the
  813. // ADC_O_adc_ch7_fifo_lvl register.
  814. //
  815. //******************************************************************************
  816. #define ADC_adc_ch7_fifo_lvl_adc_channel7_fifo_lvl_M \
  817. 0x00000007 // This register shows current FIFO
  818. // level. FIFO is 4 word wide.
  819. // Possible supported levels are :
  820. // 0x0 to 0x3
  821. #define ADC_adc_ch7_fifo_lvl_adc_channel7_fifo_lvl_S 0
  822. #endif // __HW_ADC_H__