hw_adc.h 72 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307
  1. //*****************************************************************************
  2. //
  3. // hw_adc.h - Macros used when accessing the ADC hardware.
  4. //
  5. // Copyright (c) 2005-2014 Texas Instruments Incorporated. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Redistribution and use in source and binary forms, with or without
  9. // modification, are permitted provided that the following conditions
  10. // are met:
  11. //
  12. // Redistributions of source code must retain the above copyright
  13. // notice, this list of conditions and the following disclaimer.
  14. //
  15. // Redistributions in binary form must reproduce the above copyright
  16. // notice, this list of conditions and the following disclaimer in the
  17. // documentation and/or other materials provided with the
  18. // distribution.
  19. //
  20. // Neither the name of Texas Instruments Incorporated nor the names of
  21. // its contributors may be used to endorse or promote products derived
  22. // from this software without specific prior written permission.
  23. //
  24. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  25. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  26. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  27. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  28. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  29. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  30. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  31. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  32. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  33. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  34. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. //
  36. // This is part of revision 2.1.0.12573 of the Tiva Firmware Development Package.
  37. //
  38. //*****************************************************************************
  39. #ifndef __HW_ADC_H__
  40. #define __HW_ADC_H__
  41. //*****************************************************************************
  42. //
  43. // The following are defines for the ADC register offsets.
  44. //
  45. //*****************************************************************************
  46. #define ADC_O_ACTSS 0x00000000 // ADC Active Sample Sequencer
  47. #define ADC_O_RIS 0x00000004 // ADC Raw Interrupt Status
  48. #define ADC_O_IM 0x00000008 // ADC Interrupt Mask
  49. #define ADC_O_ISC 0x0000000C // ADC Interrupt Status and Clear
  50. #define ADC_O_OSTAT 0x00000010 // ADC Overflow Status
  51. #define ADC_O_EMUX 0x00000014 // ADC Event Multiplexer Select
  52. #define ADC_O_USTAT 0x00000018 // ADC Underflow Status
  53. #define ADC_O_TSSEL 0x0000001C // ADC Trigger Source Select
  54. #define ADC_O_SSPRI 0x00000020 // ADC Sample Sequencer Priority
  55. #define ADC_O_SPC 0x00000024 // ADC Sample Phase Control
  56. #define ADC_O_PSSI 0x00000028 // ADC Processor Sample Sequence
  57. // Initiate
  58. #define ADC_O_SAC 0x00000030 // ADC Sample Averaging Control
  59. #define ADC_O_DCISC 0x00000034 // ADC Digital Comparator Interrupt
  60. // Status and Clear
  61. #define ADC_O_CTL 0x00000038 // ADC Control
  62. #define ADC_O_SSMUX0 0x00000040 // ADC Sample Sequence Input
  63. // Multiplexer Select 0
  64. #define ADC_O_SSCTL0 0x00000044 // ADC Sample Sequence Control 0
  65. #define ADC_O_SSFIFO0 0x00000048 // ADC Sample Sequence Result FIFO
  66. // 0
  67. #define ADC_O_SSFSTAT0 0x0000004C // ADC Sample Sequence FIFO 0
  68. // Status
  69. #define ADC_O_SSOP0 0x00000050 // ADC Sample Sequence 0 Operation
  70. #define ADC_O_SSDC0 0x00000054 // ADC Sample Sequence 0 Digital
  71. // Comparator Select
  72. #define ADC_O_SSEMUX0 0x00000058 // ADC Sample Sequence Extended
  73. // Input Multiplexer Select 0
  74. #define ADC_O_SSTSH0 0x0000005C // ADC Sample Sequence 0 Sample and
  75. // Hold Time
  76. #define ADC_O_SSMUX1 0x00000060 // ADC Sample Sequence Input
  77. // Multiplexer Select 1
  78. #define ADC_O_SSCTL1 0x00000064 // ADC Sample Sequence Control 1
  79. #define ADC_O_SSFIFO1 0x00000068 // ADC Sample Sequence Result FIFO
  80. // 1
  81. #define ADC_O_SSFSTAT1 0x0000006C // ADC Sample Sequence FIFO 1
  82. // Status
  83. #define ADC_O_SSOP1 0x00000070 // ADC Sample Sequence 1 Operation
  84. #define ADC_O_SSDC1 0x00000074 // ADC Sample Sequence 1 Digital
  85. // Comparator Select
  86. #define ADC_O_SSEMUX1 0x00000078 // ADC Sample Sequence Extended
  87. // Input Multiplexer Select 1
  88. #define ADC_O_SSTSH1 0x0000007C // ADC Sample Sequence 1 Sample and
  89. // Hold Time
  90. #define ADC_O_SSMUX2 0x00000080 // ADC Sample Sequence Input
  91. // Multiplexer Select 2
  92. #define ADC_O_SSCTL2 0x00000084 // ADC Sample Sequence Control 2
  93. #define ADC_O_SSFIFO2 0x00000088 // ADC Sample Sequence Result FIFO
  94. // 2
  95. #define ADC_O_SSFSTAT2 0x0000008C // ADC Sample Sequence FIFO 2
  96. // Status
  97. #define ADC_O_SSOP2 0x00000090 // ADC Sample Sequence 2 Operation
  98. #define ADC_O_SSDC2 0x00000094 // ADC Sample Sequence 2 Digital
  99. // Comparator Select
  100. #define ADC_O_SSEMUX2 0x00000098 // ADC Sample Sequence Extended
  101. // Input Multiplexer Select 2
  102. #define ADC_O_SSTSH2 0x0000009C // ADC Sample Sequence 2 Sample and
  103. // Hold Time
  104. #define ADC_O_SSMUX3 0x000000A0 // ADC Sample Sequence Input
  105. // Multiplexer Select 3
  106. #define ADC_O_SSCTL3 0x000000A4 // ADC Sample Sequence Control 3
  107. #define ADC_O_SSFIFO3 0x000000A8 // ADC Sample Sequence Result FIFO
  108. // 3
  109. #define ADC_O_SSFSTAT3 0x000000AC // ADC Sample Sequence FIFO 3
  110. // Status
  111. #define ADC_O_SSOP3 0x000000B0 // ADC Sample Sequence 3 Operation
  112. #define ADC_O_SSDC3 0x000000B4 // ADC Sample Sequence 3 Digital
  113. // Comparator Select
  114. #define ADC_O_SSEMUX3 0x000000B8 // ADC Sample Sequence Extended
  115. // Input Multiplexer Select 3
  116. #define ADC_O_SSTSH3 0x000000BC // ADC Sample Sequence 3 Sample and
  117. // Hold Time
  118. #define ADC_O_DCRIC 0x00000D00 // ADC Digital Comparator Reset
  119. // Initial Conditions
  120. #define ADC_O_DCCTL0 0x00000E00 // ADC Digital Comparator Control 0
  121. #define ADC_O_DCCTL1 0x00000E04 // ADC Digital Comparator Control 1
  122. #define ADC_O_DCCTL2 0x00000E08 // ADC Digital Comparator Control 2
  123. #define ADC_O_DCCTL3 0x00000E0C // ADC Digital Comparator Control 3
  124. #define ADC_O_DCCTL4 0x00000E10 // ADC Digital Comparator Control 4
  125. #define ADC_O_DCCTL5 0x00000E14 // ADC Digital Comparator Control 5
  126. #define ADC_O_DCCTL6 0x00000E18 // ADC Digital Comparator Control 6
  127. #define ADC_O_DCCTL7 0x00000E1C // ADC Digital Comparator Control 7
  128. #define ADC_O_DCCMP0 0x00000E40 // ADC Digital Comparator Range 0
  129. #define ADC_O_DCCMP1 0x00000E44 // ADC Digital Comparator Range 1
  130. #define ADC_O_DCCMP2 0x00000E48 // ADC Digital Comparator Range 2
  131. #define ADC_O_DCCMP3 0x00000E4C // ADC Digital Comparator Range 3
  132. #define ADC_O_DCCMP4 0x00000E50 // ADC Digital Comparator Range 4
  133. #define ADC_O_DCCMP5 0x00000E54 // ADC Digital Comparator Range 5
  134. #define ADC_O_DCCMP6 0x00000E58 // ADC Digital Comparator Range 6
  135. #define ADC_O_DCCMP7 0x00000E5C // ADC Digital Comparator Range 7
  136. #define ADC_O_PP 0x00000FC0 // ADC Peripheral Properties
  137. #define ADC_O_PC 0x00000FC4 // ADC Peripheral Configuration
  138. #define ADC_O_CC 0x00000FC8 // ADC Clock Configuration
  139. //*****************************************************************************
  140. //
  141. // The following are defines for the bit fields in the ADC_O_ACTSS register.
  142. //
  143. //*****************************************************************************
  144. #define ADC_ACTSS_BUSY 0x00010000 // ADC Busy
  145. #define ADC_ACTSS_ADEN3 0x00000800 // ADC SS3 DMA Enable
  146. #define ADC_ACTSS_ADEN2 0x00000400 // ADC SS2 DMA Enable
  147. #define ADC_ACTSS_ADEN1 0x00000200 // ADC SS1 DMA Enable
  148. #define ADC_ACTSS_ADEN0 0x00000100 // ADC SS1 DMA Enable
  149. #define ADC_ACTSS_ASEN3 0x00000008 // ADC SS3 Enable
  150. #define ADC_ACTSS_ASEN2 0x00000004 // ADC SS2 Enable
  151. #define ADC_ACTSS_ASEN1 0x00000002 // ADC SS1 Enable
  152. #define ADC_ACTSS_ASEN0 0x00000001 // ADC SS0 Enable
  153. //*****************************************************************************
  154. //
  155. // The following are defines for the bit fields in the ADC_O_RIS register.
  156. //
  157. //*****************************************************************************
  158. #define ADC_RIS_INRDC 0x00010000 // Digital Comparator Raw Interrupt
  159. // Status
  160. #define ADC_RIS_DMAINR3 0x00000800 // SS3 DMA Raw Interrupt Status
  161. #define ADC_RIS_DMAINR2 0x00000400 // SS2 DMA Raw Interrupt Status
  162. #define ADC_RIS_DMAINR1 0x00000200 // SS1 DMA Raw Interrupt Status
  163. #define ADC_RIS_DMAINR0 0x00000100 // SS0 DMA Raw Interrupt Status
  164. #define ADC_RIS_INR3 0x00000008 // SS3 Raw Interrupt Status
  165. #define ADC_RIS_INR2 0x00000004 // SS2 Raw Interrupt Status
  166. #define ADC_RIS_INR1 0x00000002 // SS1 Raw Interrupt Status
  167. #define ADC_RIS_INR0 0x00000001 // SS0 Raw Interrupt Status
  168. //*****************************************************************************
  169. //
  170. // The following are defines for the bit fields in the ADC_O_IM register.
  171. //
  172. //*****************************************************************************
  173. #define ADC_IM_DCONSS3 0x00080000 // Digital Comparator Interrupt on
  174. // SS3
  175. #define ADC_IM_DCONSS2 0x00040000 // Digital Comparator Interrupt on
  176. // SS2
  177. #define ADC_IM_DCONSS1 0x00020000 // Digital Comparator Interrupt on
  178. // SS1
  179. #define ADC_IM_DCONSS0 0x00010000 // Digital Comparator Interrupt on
  180. // SS0
  181. #define ADC_IM_DMAMASK3 0x00000800 // SS3 DMA Interrupt Mask
  182. #define ADC_IM_DMAMASK2 0x00000400 // SS2 DMA Interrupt Mask
  183. #define ADC_IM_DMAMASK1 0x00000200 // SS1 DMA Interrupt Mask
  184. #define ADC_IM_DMAMASK0 0x00000100 // SS0 DMA Interrupt Mask
  185. #define ADC_IM_MASK3 0x00000008 // SS3 Interrupt Mask
  186. #define ADC_IM_MASK2 0x00000004 // SS2 Interrupt Mask
  187. #define ADC_IM_MASK1 0x00000002 // SS1 Interrupt Mask
  188. #define ADC_IM_MASK0 0x00000001 // SS0 Interrupt Mask
  189. //*****************************************************************************
  190. //
  191. // The following are defines for the bit fields in the ADC_O_ISC register.
  192. //
  193. //*****************************************************************************
  194. #define ADC_ISC_DCINSS3 0x00080000 // Digital Comparator Interrupt
  195. // Status on SS3
  196. #define ADC_ISC_DCINSS2 0x00040000 // Digital Comparator Interrupt
  197. // Status on SS2
  198. #define ADC_ISC_DCINSS1 0x00020000 // Digital Comparator Interrupt
  199. // Status on SS1
  200. #define ADC_ISC_DCINSS0 0x00010000 // Digital Comparator Interrupt
  201. // Status on SS0
  202. #define ADC_ISC_DMAIN3 0x00000800 // SS3 DMA Interrupt Status and
  203. // Clear
  204. #define ADC_ISC_DMAIN2 0x00000400 // SS2 DMA Interrupt Status and
  205. // Clear
  206. #define ADC_ISC_DMAIN1 0x00000200 // SS1 DMA Interrupt Status and
  207. // Clear
  208. #define ADC_ISC_DMAIN0 0x00000100 // SS0 DMA Interrupt Status and
  209. // Clear
  210. #define ADC_ISC_IN3 0x00000008 // SS3 Interrupt Status and Clear
  211. #define ADC_ISC_IN2 0x00000004 // SS2 Interrupt Status and Clear
  212. #define ADC_ISC_IN1 0x00000002 // SS1 Interrupt Status and Clear
  213. #define ADC_ISC_IN0 0x00000001 // SS0 Interrupt Status and Clear
  214. //*****************************************************************************
  215. //
  216. // The following are defines for the bit fields in the ADC_O_OSTAT register.
  217. //
  218. //*****************************************************************************
  219. #define ADC_OSTAT_OV3 0x00000008 // SS3 FIFO Overflow
  220. #define ADC_OSTAT_OV2 0x00000004 // SS2 FIFO Overflow
  221. #define ADC_OSTAT_OV1 0x00000002 // SS1 FIFO Overflow
  222. #define ADC_OSTAT_OV0 0x00000001 // SS0 FIFO Overflow
  223. //*****************************************************************************
  224. //
  225. // The following are defines for the bit fields in the ADC_O_EMUX register.
  226. //
  227. //*****************************************************************************
  228. #define ADC_EMUX_EM3_M 0x0000F000 // SS3 Trigger Select
  229. #define ADC_EMUX_EM3_PROCESSOR 0x00000000 // Processor (default)
  230. #define ADC_EMUX_EM3_COMP0 0x00001000 // Analog Comparator 0
  231. #define ADC_EMUX_EM3_COMP1 0x00002000 // Analog Comparator 1
  232. #define ADC_EMUX_EM3_COMP2 0x00003000 // Analog Comparator 2
  233. #define ADC_EMUX_EM3_EXTERNAL 0x00004000 // External (GPIO Pins)
  234. #define ADC_EMUX_EM3_TIMER 0x00005000 // Timer
  235. #define ADC_EMUX_EM3_PWM0 0x00006000 // PWM generator 0
  236. #define ADC_EMUX_EM3_PWM1 0x00007000 // PWM generator 1
  237. #define ADC_EMUX_EM3_PWM2 0x00008000 // PWM generator 2
  238. #define ADC_EMUX_EM3_PWM3 0x00009000 // PWM generator 3
  239. #define ADC_EMUX_EM3_NEVER 0x0000E000 // Never Trigger
  240. #define ADC_EMUX_EM3_ALWAYS 0x0000F000 // Always (continuously sample)
  241. #define ADC_EMUX_EM2_M 0x00000F00 // SS2 Trigger Select
  242. #define ADC_EMUX_EM2_PROCESSOR 0x00000000 // Processor (default)
  243. #define ADC_EMUX_EM2_COMP0 0x00000100 // Analog Comparator 0
  244. #define ADC_EMUX_EM2_COMP1 0x00000200 // Analog Comparator 1
  245. #define ADC_EMUX_EM2_COMP2 0x00000300 // Analog Comparator 2
  246. #define ADC_EMUX_EM2_EXTERNAL 0x00000400 // External (GPIO Pins)
  247. #define ADC_EMUX_EM2_TIMER 0x00000500 // Timer
  248. #define ADC_EMUX_EM2_PWM0 0x00000600 // PWM generator 0
  249. #define ADC_EMUX_EM2_PWM1 0x00000700 // PWM generator 1
  250. #define ADC_EMUX_EM2_PWM2 0x00000800 // PWM generator 2
  251. #define ADC_EMUX_EM2_PWM3 0x00000900 // PWM generator 3
  252. #define ADC_EMUX_EM2_NEVER 0x00000E00 // Never Trigger
  253. #define ADC_EMUX_EM2_ALWAYS 0x00000F00 // Always (continuously sample)
  254. #define ADC_EMUX_EM1_M 0x000000F0 // SS1 Trigger Select
  255. #define ADC_EMUX_EM1_PROCESSOR 0x00000000 // Processor (default)
  256. #define ADC_EMUX_EM1_COMP0 0x00000010 // Analog Comparator 0
  257. #define ADC_EMUX_EM1_COMP1 0x00000020 // Analog Comparator 1
  258. #define ADC_EMUX_EM1_COMP2 0x00000030 // Analog Comparator 2
  259. #define ADC_EMUX_EM1_EXTERNAL 0x00000040 // External (GPIO Pins)
  260. #define ADC_EMUX_EM1_TIMER 0x00000050 // Timer
  261. #define ADC_EMUX_EM1_PWM0 0x00000060 // PWM generator 0
  262. #define ADC_EMUX_EM1_PWM1 0x00000070 // PWM generator 1
  263. #define ADC_EMUX_EM1_PWM2 0x00000080 // PWM generator 2
  264. #define ADC_EMUX_EM1_PWM3 0x00000090 // PWM generator 3
  265. #define ADC_EMUX_EM1_NEVER 0x000000E0 // Never Trigger
  266. #define ADC_EMUX_EM1_ALWAYS 0x000000F0 // Always (continuously sample)
  267. #define ADC_EMUX_EM0_M 0x0000000F // SS0 Trigger Select
  268. #define ADC_EMUX_EM0_PROCESSOR 0x00000000 // Processor (default)
  269. #define ADC_EMUX_EM0_COMP0 0x00000001 // Analog Comparator 0
  270. #define ADC_EMUX_EM0_COMP1 0x00000002 // Analog Comparator 1
  271. #define ADC_EMUX_EM0_COMP2 0x00000003 // Analog Comparator 2
  272. #define ADC_EMUX_EM0_EXTERNAL 0x00000004 // External (GPIO Pins)
  273. #define ADC_EMUX_EM0_TIMER 0x00000005 // Timer
  274. #define ADC_EMUX_EM0_PWM0 0x00000006 // PWM generator 0
  275. #define ADC_EMUX_EM0_PWM1 0x00000007 // PWM generator 1
  276. #define ADC_EMUX_EM0_PWM2 0x00000008 // PWM generator 2
  277. #define ADC_EMUX_EM0_PWM3 0x00000009 // PWM generator 3
  278. #define ADC_EMUX_EM0_NEVER 0x0000000E // Never Trigger
  279. #define ADC_EMUX_EM0_ALWAYS 0x0000000F // Always (continuously sample)
  280. //*****************************************************************************
  281. //
  282. // The following are defines for the bit fields in the ADC_O_USTAT register.
  283. //
  284. //*****************************************************************************
  285. #define ADC_USTAT_UV3 0x00000008 // SS3 FIFO Underflow
  286. #define ADC_USTAT_UV2 0x00000004 // SS2 FIFO Underflow
  287. #define ADC_USTAT_UV1 0x00000002 // SS1 FIFO Underflow
  288. #define ADC_USTAT_UV0 0x00000001 // SS0 FIFO Underflow
  289. //*****************************************************************************
  290. //
  291. // The following are defines for the bit fields in the ADC_O_TSSEL register.
  292. //
  293. //*****************************************************************************
  294. #define ADC_TSSEL_PS3_M 0x30000000 // Generator 3 PWM Module Trigger
  295. // Select
  296. #define ADC_TSSEL_PS3_0 0x00000000 // Use Generator 3 (and its
  297. // trigger) in PWM module 0
  298. #define ADC_TSSEL_PS3_1 0x10000000 // Use Generator 3 (and its
  299. // trigger) in PWM module 1
  300. #define ADC_TSSEL_PS2_M 0x00300000 // Generator 2 PWM Module Trigger
  301. // Select
  302. #define ADC_TSSEL_PS2_0 0x00000000 // Use Generator 2 (and its
  303. // trigger) in PWM module 0
  304. #define ADC_TSSEL_PS2_1 0x00100000 // Use Generator 2 (and its
  305. // trigger) in PWM module 1
  306. #define ADC_TSSEL_PS1_M 0x00003000 // Generator 1 PWM Module Trigger
  307. // Select
  308. #define ADC_TSSEL_PS1_0 0x00000000 // Use Generator 1 (and its
  309. // trigger) in PWM module 0
  310. #define ADC_TSSEL_PS1_1 0x00001000 // Use Generator 1 (and its
  311. // trigger) in PWM module 1
  312. #define ADC_TSSEL_PS0_M 0x00000030 // Generator 0 PWM Module Trigger
  313. // Select
  314. #define ADC_TSSEL_PS0_0 0x00000000 // Use Generator 0 (and its
  315. // trigger) in PWM module 0
  316. #define ADC_TSSEL_PS0_1 0x00000010 // Use Generator 0 (and its
  317. // trigger) in PWM module 1
  318. //*****************************************************************************
  319. //
  320. // The following are defines for the bit fields in the ADC_O_SSPRI register.
  321. //
  322. //*****************************************************************************
  323. #define ADC_SSPRI_SS3_M 0x00003000 // SS3 Priority
  324. #define ADC_SSPRI_SS2_M 0x00000300 // SS2 Priority
  325. #define ADC_SSPRI_SS1_M 0x00000030 // SS1 Priority
  326. #define ADC_SSPRI_SS0_M 0x00000003 // SS0 Priority
  327. //*****************************************************************************
  328. //
  329. // The following are defines for the bit fields in the ADC_O_SPC register.
  330. //
  331. //*****************************************************************************
  332. #define ADC_SPC_PHASE_M 0x0000000F // Phase Difference
  333. #define ADC_SPC_PHASE_0 0x00000000 // ADC sample lags by 0.0
  334. #define ADC_SPC_PHASE_22_5 0x00000001 // ADC sample lags by 22.5
  335. #define ADC_SPC_PHASE_45 0x00000002 // ADC sample lags by 45.0
  336. #define ADC_SPC_PHASE_67_5 0x00000003 // ADC sample lags by 67.5
  337. #define ADC_SPC_PHASE_90 0x00000004 // ADC sample lags by 90.0
  338. #define ADC_SPC_PHASE_112_5 0x00000005 // ADC sample lags by 112.5
  339. #define ADC_SPC_PHASE_135 0x00000006 // ADC sample lags by 135.0
  340. #define ADC_SPC_PHASE_157_5 0x00000007 // ADC sample lags by 157.5
  341. #define ADC_SPC_PHASE_180 0x00000008 // ADC sample lags by 180.0
  342. #define ADC_SPC_PHASE_202_5 0x00000009 // ADC sample lags by 202.5
  343. #define ADC_SPC_PHASE_225 0x0000000A // ADC sample lags by 225.0
  344. #define ADC_SPC_PHASE_247_5 0x0000000B // ADC sample lags by 247.5
  345. #define ADC_SPC_PHASE_270 0x0000000C // ADC sample lags by 270.0
  346. #define ADC_SPC_PHASE_292_5 0x0000000D // ADC sample lags by 292.5
  347. #define ADC_SPC_PHASE_315 0x0000000E // ADC sample lags by 315.0
  348. #define ADC_SPC_PHASE_337_5 0x0000000F // ADC sample lags by 337.5
  349. //*****************************************************************************
  350. //
  351. // The following are defines for the bit fields in the ADC_O_PSSI register.
  352. //
  353. //*****************************************************************************
  354. #define ADC_PSSI_GSYNC 0x80000000 // Global Synchronize
  355. #define ADC_PSSI_SYNCWAIT 0x08000000 // Synchronize Wait
  356. #define ADC_PSSI_SS3 0x00000008 // SS3 Initiate
  357. #define ADC_PSSI_SS2 0x00000004 // SS2 Initiate
  358. #define ADC_PSSI_SS1 0x00000002 // SS1 Initiate
  359. #define ADC_PSSI_SS0 0x00000001 // SS0 Initiate
  360. //*****************************************************************************
  361. //
  362. // The following are defines for the bit fields in the ADC_O_SAC register.
  363. //
  364. //*****************************************************************************
  365. #define ADC_SAC_AVG_M 0x00000007 // Hardware Averaging Control
  366. #define ADC_SAC_AVG_OFF 0x00000000 // No hardware oversampling
  367. #define ADC_SAC_AVG_2X 0x00000001 // 2x hardware oversampling
  368. #define ADC_SAC_AVG_4X 0x00000002 // 4x hardware oversampling
  369. #define ADC_SAC_AVG_8X 0x00000003 // 8x hardware oversampling
  370. #define ADC_SAC_AVG_16X 0x00000004 // 16x hardware oversampling
  371. #define ADC_SAC_AVG_32X 0x00000005 // 32x hardware oversampling
  372. #define ADC_SAC_AVG_64X 0x00000006 // 64x hardware oversampling
  373. //*****************************************************************************
  374. //
  375. // The following are defines for the bit fields in the ADC_O_DCISC register.
  376. //
  377. //*****************************************************************************
  378. #define ADC_DCISC_DCINT7 0x00000080 // Digital Comparator 7 Interrupt
  379. // Status and Clear
  380. #define ADC_DCISC_DCINT6 0x00000040 // Digital Comparator 6 Interrupt
  381. // Status and Clear
  382. #define ADC_DCISC_DCINT5 0x00000020 // Digital Comparator 5 Interrupt
  383. // Status and Clear
  384. #define ADC_DCISC_DCINT4 0x00000010 // Digital Comparator 4 Interrupt
  385. // Status and Clear
  386. #define ADC_DCISC_DCINT3 0x00000008 // Digital Comparator 3 Interrupt
  387. // Status and Clear
  388. #define ADC_DCISC_DCINT2 0x00000004 // Digital Comparator 2 Interrupt
  389. // Status and Clear
  390. #define ADC_DCISC_DCINT1 0x00000002 // Digital Comparator 1 Interrupt
  391. // Status and Clear
  392. #define ADC_DCISC_DCINT0 0x00000001 // Digital Comparator 0 Interrupt
  393. // Status and Clear
  394. //*****************************************************************************
  395. //
  396. // The following are defines for the bit fields in the ADC_O_CTL register.
  397. //
  398. //*****************************************************************************
  399. #define ADC_CTL_DITHER 0x00000040 // Dither Mode Enable
  400. #define ADC_CTL_VREF_M 0x00000003 // Voltage Reference Select
  401. #define ADC_CTL_VREF_INTERNAL 0x00000000 // VDDA and GNDA are the voltage
  402. // references
  403. #define ADC_CTL_VREF_EXT_3V 0x00000001 // The external VREFA+ and VREFA-
  404. // inputs are the voltage
  405. // references
  406. //*****************************************************************************
  407. //
  408. // The following are defines for the bit fields in the ADC_O_SSMUX0 register.
  409. //
  410. //*****************************************************************************
  411. #define ADC_SSMUX0_MUX7_M 0xF0000000 // 8th Sample Input Select
  412. #define ADC_SSMUX0_MUX6_M 0x0F000000 // 7th Sample Input Select
  413. #define ADC_SSMUX0_MUX5_M 0x00F00000 // 6th Sample Input Select
  414. #define ADC_SSMUX0_MUX4_M 0x000F0000 // 5th Sample Input Select
  415. #define ADC_SSMUX0_MUX3_M 0x0000F000 // 4th Sample Input Select
  416. #define ADC_SSMUX0_MUX2_M 0x00000F00 // 3rd Sample Input Select
  417. #define ADC_SSMUX0_MUX1_M 0x000000F0 // 2nd Sample Input Select
  418. #define ADC_SSMUX0_MUX0_M 0x0000000F // 1st Sample Input Select
  419. #define ADC_SSMUX0_MUX7_S 28
  420. #define ADC_SSMUX0_MUX6_S 24
  421. #define ADC_SSMUX0_MUX5_S 20
  422. #define ADC_SSMUX0_MUX4_S 16
  423. #define ADC_SSMUX0_MUX3_S 12
  424. #define ADC_SSMUX0_MUX2_S 8
  425. #define ADC_SSMUX0_MUX1_S 4
  426. #define ADC_SSMUX0_MUX0_S 0
  427. //*****************************************************************************
  428. //
  429. // The following are defines for the bit fields in the ADC_O_SSCTL0 register.
  430. //
  431. //*****************************************************************************
  432. #define ADC_SSCTL0_TS7 0x80000000 // 8th Sample Temp Sensor Select
  433. #define ADC_SSCTL0_IE7 0x40000000 // 8th Sample Interrupt Enable
  434. #define ADC_SSCTL0_END7 0x20000000 // 8th Sample is End of Sequence
  435. #define ADC_SSCTL0_D7 0x10000000 // 8th Sample Differential Input
  436. // Select
  437. #define ADC_SSCTL0_TS6 0x08000000 // 7th Sample Temp Sensor Select
  438. #define ADC_SSCTL0_IE6 0x04000000 // 7th Sample Interrupt Enable
  439. #define ADC_SSCTL0_END6 0x02000000 // 7th Sample is End of Sequence
  440. #define ADC_SSCTL0_D6 0x01000000 // 7th Sample Differential Input
  441. // Select
  442. #define ADC_SSCTL0_TS5 0x00800000 // 6th Sample Temp Sensor Select
  443. #define ADC_SSCTL0_IE5 0x00400000 // 6th Sample Interrupt Enable
  444. #define ADC_SSCTL0_END5 0x00200000 // 6th Sample is End of Sequence
  445. #define ADC_SSCTL0_D5 0x00100000 // 6th Sample Differential Input
  446. // Select
  447. #define ADC_SSCTL0_TS4 0x00080000 // 5th Sample Temp Sensor Select
  448. #define ADC_SSCTL0_IE4 0x00040000 // 5th Sample Interrupt Enable
  449. #define ADC_SSCTL0_END4 0x00020000 // 5th Sample is End of Sequence
  450. #define ADC_SSCTL0_D4 0x00010000 // 5th Sample Differential Input
  451. // Select
  452. #define ADC_SSCTL0_TS3 0x00008000 // 4th Sample Temp Sensor Select
  453. #define ADC_SSCTL0_IE3 0x00004000 // 4th Sample Interrupt Enable
  454. #define ADC_SSCTL0_END3 0x00002000 // 4th Sample is End of Sequence
  455. #define ADC_SSCTL0_D3 0x00001000 // 4th Sample Differential Input
  456. // Select
  457. #define ADC_SSCTL0_TS2 0x00000800 // 3rd Sample Temp Sensor Select
  458. #define ADC_SSCTL0_IE2 0x00000400 // 3rd Sample Interrupt Enable
  459. #define ADC_SSCTL0_END2 0x00000200 // 3rd Sample is End of Sequence
  460. #define ADC_SSCTL0_D2 0x00000100 // 3rd Sample Differential Input
  461. // Select
  462. #define ADC_SSCTL0_TS1 0x00000080 // 2nd Sample Temp Sensor Select
  463. #define ADC_SSCTL0_IE1 0x00000040 // 2nd Sample Interrupt Enable
  464. #define ADC_SSCTL0_END1 0x00000020 // 2nd Sample is End of Sequence
  465. #define ADC_SSCTL0_D1 0x00000010 // 2nd Sample Differential Input
  466. // Select
  467. #define ADC_SSCTL0_TS0 0x00000008 // 1st Sample Temp Sensor Select
  468. #define ADC_SSCTL0_IE0 0x00000004 // 1st Sample Interrupt Enable
  469. #define ADC_SSCTL0_END0 0x00000002 // 1st Sample is End of Sequence
  470. #define ADC_SSCTL0_D0 0x00000001 // 1st Sample Differential Input
  471. // Select
  472. //*****************************************************************************
  473. //
  474. // The following are defines for the bit fields in the ADC_O_SSFIFO0 register.
  475. //
  476. //*****************************************************************************
  477. #define ADC_SSFIFO0_DATA_M 0x00000FFF // Conversion Result Data
  478. #define ADC_SSFIFO0_DATA_S 0
  479. //*****************************************************************************
  480. //
  481. // The following are defines for the bit fields in the ADC_O_SSFSTAT0 register.
  482. //
  483. //*****************************************************************************
  484. #define ADC_SSFSTAT0_FULL 0x00001000 // FIFO Full
  485. #define ADC_SSFSTAT0_EMPTY 0x00000100 // FIFO Empty
  486. #define ADC_SSFSTAT0_HPTR_M 0x000000F0 // FIFO Head Pointer
  487. #define ADC_SSFSTAT0_TPTR_M 0x0000000F // FIFO Tail Pointer
  488. #define ADC_SSFSTAT0_HPTR_S 4
  489. #define ADC_SSFSTAT0_TPTR_S 0
  490. //*****************************************************************************
  491. //
  492. // The following are defines for the bit fields in the ADC_O_SSOP0 register.
  493. //
  494. //*****************************************************************************
  495. #define ADC_SSOP0_S7DCOP 0x10000000 // Sample 7 Digital Comparator
  496. // Operation
  497. #define ADC_SSOP0_S6DCOP 0x01000000 // Sample 6 Digital Comparator
  498. // Operation
  499. #define ADC_SSOP0_S5DCOP 0x00100000 // Sample 5 Digital Comparator
  500. // Operation
  501. #define ADC_SSOP0_S4DCOP 0x00010000 // Sample 4 Digital Comparator
  502. // Operation
  503. #define ADC_SSOP0_S3DCOP 0x00001000 // Sample 3 Digital Comparator
  504. // Operation
  505. #define ADC_SSOP0_S2DCOP 0x00000100 // Sample 2 Digital Comparator
  506. // Operation
  507. #define ADC_SSOP0_S1DCOP 0x00000010 // Sample 1 Digital Comparator
  508. // Operation
  509. #define ADC_SSOP0_S0DCOP 0x00000001 // Sample 0 Digital Comparator
  510. // Operation
  511. //*****************************************************************************
  512. //
  513. // The following are defines for the bit fields in the ADC_O_SSDC0 register.
  514. //
  515. //*****************************************************************************
  516. #define ADC_SSDC0_S7DCSEL_M 0xF0000000 // Sample 7 Digital Comparator
  517. // Select
  518. #define ADC_SSDC0_S6DCSEL_M 0x0F000000 // Sample 6 Digital Comparator
  519. // Select
  520. #define ADC_SSDC0_S5DCSEL_M 0x00F00000 // Sample 5 Digital Comparator
  521. // Select
  522. #define ADC_SSDC0_S4DCSEL_M 0x000F0000 // Sample 4 Digital Comparator
  523. // Select
  524. #define ADC_SSDC0_S3DCSEL_M 0x0000F000 // Sample 3 Digital Comparator
  525. // Select
  526. #define ADC_SSDC0_S2DCSEL_M 0x00000F00 // Sample 2 Digital Comparator
  527. // Select
  528. #define ADC_SSDC0_S1DCSEL_M 0x000000F0 // Sample 1 Digital Comparator
  529. // Select
  530. #define ADC_SSDC0_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator
  531. // Select
  532. #define ADC_SSDC0_S6DCSEL_S 24
  533. #define ADC_SSDC0_S5DCSEL_S 20
  534. #define ADC_SSDC0_S4DCSEL_S 16
  535. #define ADC_SSDC0_S3DCSEL_S 12
  536. #define ADC_SSDC0_S2DCSEL_S 8
  537. #define ADC_SSDC0_S1DCSEL_S 4
  538. #define ADC_SSDC0_S0DCSEL_S 0
  539. //*****************************************************************************
  540. //
  541. // The following are defines for the bit fields in the ADC_O_SSEMUX0 register.
  542. //
  543. //*****************************************************************************
  544. #define ADC_SSEMUX0_EMUX7 0x10000000 // 8th Sample Input Select (Upper
  545. // Bit)
  546. #define ADC_SSEMUX0_EMUX6 0x01000000 // 7th Sample Input Select (Upper
  547. // Bit)
  548. #define ADC_SSEMUX0_EMUX5 0x00100000 // 6th Sample Input Select (Upper
  549. // Bit)
  550. #define ADC_SSEMUX0_EMUX4 0x00010000 // 5th Sample Input Select (Upper
  551. // Bit)
  552. #define ADC_SSEMUX0_EMUX3 0x00001000 // 4th Sample Input Select (Upper
  553. // Bit)
  554. #define ADC_SSEMUX0_EMUX2 0x00000100 // 3rd Sample Input Select (Upper
  555. // Bit)
  556. #define ADC_SSEMUX0_EMUX1 0x00000010 // 2th Sample Input Select (Upper
  557. // Bit)
  558. #define ADC_SSEMUX0_EMUX0 0x00000001 // 1st Sample Input Select (Upper
  559. // Bit)
  560. //*****************************************************************************
  561. //
  562. // The following are defines for the bit fields in the ADC_O_SSTSH0 register.
  563. //
  564. //*****************************************************************************
  565. #define ADC_SSTSH0_TSH7_M 0xF0000000 // 8th Sample and Hold Period
  566. // Select
  567. #define ADC_SSTSH0_TSH6_M 0x0F000000 // 7th Sample and Hold Period
  568. // Select
  569. #define ADC_SSTSH0_TSH5_M 0x00F00000 // 6th Sample and Hold Period
  570. // Select
  571. #define ADC_SSTSH0_TSH4_M 0x000F0000 // 5th Sample and Hold Period
  572. // Select
  573. #define ADC_SSTSH0_TSH3_M 0x0000F000 // 4th Sample and Hold Period
  574. // Select
  575. #define ADC_SSTSH0_TSH2_M 0x00000F00 // 3rd Sample and Hold Period
  576. // Select
  577. #define ADC_SSTSH0_TSH1_M 0x000000F0 // 2nd Sample and Hold Period
  578. // Select
  579. #define ADC_SSTSH0_TSH0_M 0x0000000F // 1st Sample and Hold Period
  580. // Select
  581. #define ADC_SSTSH0_TSH7_S 28
  582. #define ADC_SSTSH0_TSH6_S 24
  583. #define ADC_SSTSH0_TSH5_S 20
  584. #define ADC_SSTSH0_TSH4_S 16
  585. #define ADC_SSTSH0_TSH3_S 12
  586. #define ADC_SSTSH0_TSH2_S 8
  587. #define ADC_SSTSH0_TSH1_S 4
  588. #define ADC_SSTSH0_TSH0_S 0
  589. //*****************************************************************************
  590. //
  591. // The following are defines for the bit fields in the ADC_O_SSMUX1 register.
  592. //
  593. //*****************************************************************************
  594. #define ADC_SSMUX1_MUX3_M 0x0000F000 // 4th Sample Input Select
  595. #define ADC_SSMUX1_MUX2_M 0x00000F00 // 3rd Sample Input Select
  596. #define ADC_SSMUX1_MUX1_M 0x000000F0 // 2nd Sample Input Select
  597. #define ADC_SSMUX1_MUX0_M 0x0000000F // 1st Sample Input Select
  598. #define ADC_SSMUX1_MUX3_S 12
  599. #define ADC_SSMUX1_MUX2_S 8
  600. #define ADC_SSMUX1_MUX1_S 4
  601. #define ADC_SSMUX1_MUX0_S 0
  602. //*****************************************************************************
  603. //
  604. // The following are defines for the bit fields in the ADC_O_SSCTL1 register.
  605. //
  606. //*****************************************************************************
  607. #define ADC_SSCTL1_TS3 0x00008000 // 4th Sample Temp Sensor Select
  608. #define ADC_SSCTL1_IE3 0x00004000 // 4th Sample Interrupt Enable
  609. #define ADC_SSCTL1_END3 0x00002000 // 4th Sample is End of Sequence
  610. #define ADC_SSCTL1_D3 0x00001000 // 4th Sample Differential Input
  611. // Select
  612. #define ADC_SSCTL1_TS2 0x00000800 // 3rd Sample Temp Sensor Select
  613. #define ADC_SSCTL1_IE2 0x00000400 // 3rd Sample Interrupt Enable
  614. #define ADC_SSCTL1_END2 0x00000200 // 3rd Sample is End of Sequence
  615. #define ADC_SSCTL1_D2 0x00000100 // 3rd Sample Differential Input
  616. // Select
  617. #define ADC_SSCTL1_TS1 0x00000080 // 2nd Sample Temp Sensor Select
  618. #define ADC_SSCTL1_IE1 0x00000040 // 2nd Sample Interrupt Enable
  619. #define ADC_SSCTL1_END1 0x00000020 // 2nd Sample is End of Sequence
  620. #define ADC_SSCTL1_D1 0x00000010 // 2nd Sample Differential Input
  621. // Select
  622. #define ADC_SSCTL1_TS0 0x00000008 // 1st Sample Temp Sensor Select
  623. #define ADC_SSCTL1_IE0 0x00000004 // 1st Sample Interrupt Enable
  624. #define ADC_SSCTL1_END0 0x00000002 // 1st Sample is End of Sequence
  625. #define ADC_SSCTL1_D0 0x00000001 // 1st Sample Differential Input
  626. // Select
  627. //*****************************************************************************
  628. //
  629. // The following are defines for the bit fields in the ADC_O_SSFIFO1 register.
  630. //
  631. //*****************************************************************************
  632. #define ADC_SSFIFO1_DATA_M 0x00000FFF // Conversion Result Data
  633. #define ADC_SSFIFO1_DATA_S 0
  634. //*****************************************************************************
  635. //
  636. // The following are defines for the bit fields in the ADC_O_SSFSTAT1 register.
  637. //
  638. //*****************************************************************************
  639. #define ADC_SSFSTAT1_FULL 0x00001000 // FIFO Full
  640. #define ADC_SSFSTAT1_EMPTY 0x00000100 // FIFO Empty
  641. #define ADC_SSFSTAT1_HPTR_M 0x000000F0 // FIFO Head Pointer
  642. #define ADC_SSFSTAT1_TPTR_M 0x0000000F // FIFO Tail Pointer
  643. #define ADC_SSFSTAT1_HPTR_S 4
  644. #define ADC_SSFSTAT1_TPTR_S 0
  645. //*****************************************************************************
  646. //
  647. // The following are defines for the bit fields in the ADC_O_SSOP1 register.
  648. //
  649. //*****************************************************************************
  650. #define ADC_SSOP1_S3DCOP 0x00001000 // Sample 3 Digital Comparator
  651. // Operation
  652. #define ADC_SSOP1_S2DCOP 0x00000100 // Sample 2 Digital Comparator
  653. // Operation
  654. #define ADC_SSOP1_S1DCOP 0x00000010 // Sample 1 Digital Comparator
  655. // Operation
  656. #define ADC_SSOP1_S0DCOP 0x00000001 // Sample 0 Digital Comparator
  657. // Operation
  658. //*****************************************************************************
  659. //
  660. // The following are defines for the bit fields in the ADC_O_SSDC1 register.
  661. //
  662. //*****************************************************************************
  663. #define ADC_SSDC1_S3DCSEL_M 0x0000F000 // Sample 3 Digital Comparator
  664. // Select
  665. #define ADC_SSDC1_S2DCSEL_M 0x00000F00 // Sample 2 Digital Comparator
  666. // Select
  667. #define ADC_SSDC1_S1DCSEL_M 0x000000F0 // Sample 1 Digital Comparator
  668. // Select
  669. #define ADC_SSDC1_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator
  670. // Select
  671. #define ADC_SSDC1_S2DCSEL_S 8
  672. #define ADC_SSDC1_S1DCSEL_S 4
  673. #define ADC_SSDC1_S0DCSEL_S 0
  674. //*****************************************************************************
  675. //
  676. // The following are defines for the bit fields in the ADC_O_SSEMUX1 register.
  677. //
  678. //*****************************************************************************
  679. #define ADC_SSEMUX1_EMUX3 0x00001000 // 4th Sample Input Select (Upper
  680. // Bit)
  681. #define ADC_SSEMUX1_EMUX2 0x00000100 // 3rd Sample Input Select (Upper
  682. // Bit)
  683. #define ADC_SSEMUX1_EMUX1 0x00000010 // 2th Sample Input Select (Upper
  684. // Bit)
  685. #define ADC_SSEMUX1_EMUX0 0x00000001 // 1st Sample Input Select (Upper
  686. // Bit)
  687. //*****************************************************************************
  688. //
  689. // The following are defines for the bit fields in the ADC_O_SSTSH1 register.
  690. //
  691. //*****************************************************************************
  692. #define ADC_SSTSH1_TSH3_M 0x0000F000 // 4th Sample and Hold Period
  693. // Select
  694. #define ADC_SSTSH1_TSH2_M 0x00000F00 // 3rd Sample and Hold Period
  695. // Select
  696. #define ADC_SSTSH1_TSH1_M 0x000000F0 // 2nd Sample and Hold Period
  697. // Select
  698. #define ADC_SSTSH1_TSH0_M 0x0000000F // 1st Sample and Hold Period
  699. // Select
  700. #define ADC_SSTSH1_TSH3_S 12
  701. #define ADC_SSTSH1_TSH2_S 8
  702. #define ADC_SSTSH1_TSH1_S 4
  703. #define ADC_SSTSH1_TSH0_S 0
  704. //*****************************************************************************
  705. //
  706. // The following are defines for the bit fields in the ADC_O_SSMUX2 register.
  707. //
  708. //*****************************************************************************
  709. #define ADC_SSMUX2_MUX3_M 0x0000F000 // 4th Sample Input Select
  710. #define ADC_SSMUX2_MUX2_M 0x00000F00 // 3rd Sample Input Select
  711. #define ADC_SSMUX2_MUX1_M 0x000000F0 // 2nd Sample Input Select
  712. #define ADC_SSMUX2_MUX0_M 0x0000000F // 1st Sample Input Select
  713. #define ADC_SSMUX2_MUX3_S 12
  714. #define ADC_SSMUX2_MUX2_S 8
  715. #define ADC_SSMUX2_MUX1_S 4
  716. #define ADC_SSMUX2_MUX0_S 0
  717. //*****************************************************************************
  718. //
  719. // The following are defines for the bit fields in the ADC_O_SSCTL2 register.
  720. //
  721. //*****************************************************************************
  722. #define ADC_SSCTL2_TS3 0x00008000 // 4th Sample Temp Sensor Select
  723. #define ADC_SSCTL2_IE3 0x00004000 // 4th Sample Interrupt Enable
  724. #define ADC_SSCTL2_END3 0x00002000 // 4th Sample is End of Sequence
  725. #define ADC_SSCTL2_D3 0x00001000 // 4th Sample Differential Input
  726. // Select
  727. #define ADC_SSCTL2_TS2 0x00000800 // 3rd Sample Temp Sensor Select
  728. #define ADC_SSCTL2_IE2 0x00000400 // 3rd Sample Interrupt Enable
  729. #define ADC_SSCTL2_END2 0x00000200 // 3rd Sample is End of Sequence
  730. #define ADC_SSCTL2_D2 0x00000100 // 3rd Sample Differential Input
  731. // Select
  732. #define ADC_SSCTL2_TS1 0x00000080 // 2nd Sample Temp Sensor Select
  733. #define ADC_SSCTL2_IE1 0x00000040 // 2nd Sample Interrupt Enable
  734. #define ADC_SSCTL2_END1 0x00000020 // 2nd Sample is End of Sequence
  735. #define ADC_SSCTL2_D1 0x00000010 // 2nd Sample Differential Input
  736. // Select
  737. #define ADC_SSCTL2_TS0 0x00000008 // 1st Sample Temp Sensor Select
  738. #define ADC_SSCTL2_IE0 0x00000004 // 1st Sample Interrupt Enable
  739. #define ADC_SSCTL2_END0 0x00000002 // 1st Sample is End of Sequence
  740. #define ADC_SSCTL2_D0 0x00000001 // 1st Sample Differential Input
  741. // Select
  742. //*****************************************************************************
  743. //
  744. // The following are defines for the bit fields in the ADC_O_SSFIFO2 register.
  745. //
  746. //*****************************************************************************
  747. #define ADC_SSFIFO2_DATA_M 0x00000FFF // Conversion Result Data
  748. #define ADC_SSFIFO2_DATA_S 0
  749. //*****************************************************************************
  750. //
  751. // The following are defines for the bit fields in the ADC_O_SSFSTAT2 register.
  752. //
  753. //*****************************************************************************
  754. #define ADC_SSFSTAT2_FULL 0x00001000 // FIFO Full
  755. #define ADC_SSFSTAT2_EMPTY 0x00000100 // FIFO Empty
  756. #define ADC_SSFSTAT2_HPTR_M 0x000000F0 // FIFO Head Pointer
  757. #define ADC_SSFSTAT2_TPTR_M 0x0000000F // FIFO Tail Pointer
  758. #define ADC_SSFSTAT2_HPTR_S 4
  759. #define ADC_SSFSTAT2_TPTR_S 0
  760. //*****************************************************************************
  761. //
  762. // The following are defines for the bit fields in the ADC_O_SSOP2 register.
  763. //
  764. //*****************************************************************************
  765. #define ADC_SSOP2_S3DCOP 0x00001000 // Sample 3 Digital Comparator
  766. // Operation
  767. #define ADC_SSOP2_S2DCOP 0x00000100 // Sample 2 Digital Comparator
  768. // Operation
  769. #define ADC_SSOP2_S1DCOP 0x00000010 // Sample 1 Digital Comparator
  770. // Operation
  771. #define ADC_SSOP2_S0DCOP 0x00000001 // Sample 0 Digital Comparator
  772. // Operation
  773. //*****************************************************************************
  774. //
  775. // The following are defines for the bit fields in the ADC_O_SSDC2 register.
  776. //
  777. //*****************************************************************************
  778. #define ADC_SSDC2_S3DCSEL_M 0x0000F000 // Sample 3 Digital Comparator
  779. // Select
  780. #define ADC_SSDC2_S2DCSEL_M 0x00000F00 // Sample 2 Digital Comparator
  781. // Select
  782. #define ADC_SSDC2_S1DCSEL_M 0x000000F0 // Sample 1 Digital Comparator
  783. // Select
  784. #define ADC_SSDC2_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator
  785. // Select
  786. #define ADC_SSDC2_S2DCSEL_S 8
  787. #define ADC_SSDC2_S1DCSEL_S 4
  788. #define ADC_SSDC2_S0DCSEL_S 0
  789. //*****************************************************************************
  790. //
  791. // The following are defines for the bit fields in the ADC_O_SSEMUX2 register.
  792. //
  793. //*****************************************************************************
  794. #define ADC_SSEMUX2_EMUX3 0x00001000 // 4th Sample Input Select (Upper
  795. // Bit)
  796. #define ADC_SSEMUX2_EMUX2 0x00000100 // 3rd Sample Input Select (Upper
  797. // Bit)
  798. #define ADC_SSEMUX2_EMUX1 0x00000010 // 2th Sample Input Select (Upper
  799. // Bit)
  800. #define ADC_SSEMUX2_EMUX0 0x00000001 // 1st Sample Input Select (Upper
  801. // Bit)
  802. //*****************************************************************************
  803. //
  804. // The following are defines for the bit fields in the ADC_O_SSTSH2 register.
  805. //
  806. //*****************************************************************************
  807. #define ADC_SSTSH2_TSH3_M 0x0000F000 // 4th Sample and Hold Period
  808. // Select
  809. #define ADC_SSTSH2_TSH2_M 0x00000F00 // 3rd Sample and Hold Period
  810. // Select
  811. #define ADC_SSTSH2_TSH1_M 0x000000F0 // 2nd Sample and Hold Period
  812. // Select
  813. #define ADC_SSTSH2_TSH0_M 0x0000000F // 1st Sample and Hold Period
  814. // Select
  815. #define ADC_SSTSH2_TSH3_S 12
  816. #define ADC_SSTSH2_TSH2_S 8
  817. #define ADC_SSTSH2_TSH1_S 4
  818. #define ADC_SSTSH2_TSH0_S 0
  819. //*****************************************************************************
  820. //
  821. // The following are defines for the bit fields in the ADC_O_SSMUX3 register.
  822. //
  823. //*****************************************************************************
  824. #define ADC_SSMUX3_MUX0_M 0x0000000F // 1st Sample Input Select
  825. #define ADC_SSMUX3_MUX0_S 0
  826. //*****************************************************************************
  827. //
  828. // The following are defines for the bit fields in the ADC_O_SSCTL3 register.
  829. //
  830. //*****************************************************************************
  831. #define ADC_SSCTL3_TS0 0x00000008 // 1st Sample Temp Sensor Select
  832. #define ADC_SSCTL3_IE0 0x00000004 // Sample Interrupt Enable
  833. #define ADC_SSCTL3_END0 0x00000002 // End of Sequence
  834. #define ADC_SSCTL3_D0 0x00000001 // Sample Differential Input Select
  835. //*****************************************************************************
  836. //
  837. // The following are defines for the bit fields in the ADC_O_SSFIFO3 register.
  838. //
  839. //*****************************************************************************
  840. #define ADC_SSFIFO3_DATA_M 0x00000FFF // Conversion Result Data
  841. #define ADC_SSFIFO3_DATA_S 0
  842. //*****************************************************************************
  843. //
  844. // The following are defines for the bit fields in the ADC_O_SSFSTAT3 register.
  845. //
  846. //*****************************************************************************
  847. #define ADC_SSFSTAT3_FULL 0x00001000 // FIFO Full
  848. #define ADC_SSFSTAT3_EMPTY 0x00000100 // FIFO Empty
  849. #define ADC_SSFSTAT3_HPTR_M 0x000000F0 // FIFO Head Pointer
  850. #define ADC_SSFSTAT3_TPTR_M 0x0000000F // FIFO Tail Pointer
  851. #define ADC_SSFSTAT3_HPTR_S 4
  852. #define ADC_SSFSTAT3_TPTR_S 0
  853. //*****************************************************************************
  854. //
  855. // The following are defines for the bit fields in the ADC_O_SSOP3 register.
  856. //
  857. //*****************************************************************************
  858. #define ADC_SSOP3_S0DCOP 0x00000001 // Sample 0 Digital Comparator
  859. // Operation
  860. //*****************************************************************************
  861. //
  862. // The following are defines for the bit fields in the ADC_O_SSDC3 register.
  863. //
  864. //*****************************************************************************
  865. #define ADC_SSDC3_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator
  866. // Select
  867. //*****************************************************************************
  868. //
  869. // The following are defines for the bit fields in the ADC_O_SSEMUX3 register.
  870. //
  871. //*****************************************************************************
  872. #define ADC_SSEMUX3_EMUX0 0x00000001 // 1st Sample Input Select (Upper
  873. // Bit)
  874. //*****************************************************************************
  875. //
  876. // The following are defines for the bit fields in the ADC_O_SSTSH3 register.
  877. //
  878. //*****************************************************************************
  879. #define ADC_SSTSH3_TSH0_M 0x0000000F // 1st Sample and Hold Period
  880. // Select
  881. #define ADC_SSTSH3_TSH0_S 0
  882. //*****************************************************************************
  883. //
  884. // The following are defines for the bit fields in the ADC_O_DCRIC register.
  885. //
  886. //*****************************************************************************
  887. #define ADC_DCRIC_DCTRIG7 0x00800000 // Digital Comparator Trigger 7
  888. #define ADC_DCRIC_DCTRIG6 0x00400000 // Digital Comparator Trigger 6
  889. #define ADC_DCRIC_DCTRIG5 0x00200000 // Digital Comparator Trigger 5
  890. #define ADC_DCRIC_DCTRIG4 0x00100000 // Digital Comparator Trigger 4
  891. #define ADC_DCRIC_DCTRIG3 0x00080000 // Digital Comparator Trigger 3
  892. #define ADC_DCRIC_DCTRIG2 0x00040000 // Digital Comparator Trigger 2
  893. #define ADC_DCRIC_DCTRIG1 0x00020000 // Digital Comparator Trigger 1
  894. #define ADC_DCRIC_DCTRIG0 0x00010000 // Digital Comparator Trigger 0
  895. #define ADC_DCRIC_DCINT7 0x00000080 // Digital Comparator Interrupt 7
  896. #define ADC_DCRIC_DCINT6 0x00000040 // Digital Comparator Interrupt 6
  897. #define ADC_DCRIC_DCINT5 0x00000020 // Digital Comparator Interrupt 5
  898. #define ADC_DCRIC_DCINT4 0x00000010 // Digital Comparator Interrupt 4
  899. #define ADC_DCRIC_DCINT3 0x00000008 // Digital Comparator Interrupt 3
  900. #define ADC_DCRIC_DCINT2 0x00000004 // Digital Comparator Interrupt 2
  901. #define ADC_DCRIC_DCINT1 0x00000002 // Digital Comparator Interrupt 1
  902. #define ADC_DCRIC_DCINT0 0x00000001 // Digital Comparator Interrupt 0
  903. //*****************************************************************************
  904. //
  905. // The following are defines for the bit fields in the ADC_O_DCCTL0 register.
  906. //
  907. //*****************************************************************************
  908. #define ADC_DCCTL0_CTE 0x00001000 // Comparison Trigger Enable
  909. #define ADC_DCCTL0_CTC_M 0x00000C00 // Comparison Trigger Condition
  910. #define ADC_DCCTL0_CTC_LOW 0x00000000 // Low Band
  911. #define ADC_DCCTL0_CTC_MID 0x00000400 // Mid Band
  912. #define ADC_DCCTL0_CTC_HIGH 0x00000C00 // High Band
  913. #define ADC_DCCTL0_CTM_M 0x00000300 // Comparison Trigger Mode
  914. #define ADC_DCCTL0_CTM_ALWAYS 0x00000000 // Always
  915. #define ADC_DCCTL0_CTM_ONCE 0x00000100 // Once
  916. #define ADC_DCCTL0_CTM_HALWAYS 0x00000200 // Hysteresis Always
  917. #define ADC_DCCTL0_CTM_HONCE 0x00000300 // Hysteresis Once
  918. #define ADC_DCCTL0_CIE 0x00000010 // Comparison Interrupt Enable
  919. #define ADC_DCCTL0_CIC_M 0x0000000C // Comparison Interrupt Condition
  920. #define ADC_DCCTL0_CIC_LOW 0x00000000 // Low Band
  921. #define ADC_DCCTL0_CIC_MID 0x00000004 // Mid Band
  922. #define ADC_DCCTL0_CIC_HIGH 0x0000000C // High Band
  923. #define ADC_DCCTL0_CIM_M 0x00000003 // Comparison Interrupt Mode
  924. #define ADC_DCCTL0_CIM_ALWAYS 0x00000000 // Always
  925. #define ADC_DCCTL0_CIM_ONCE 0x00000001 // Once
  926. #define ADC_DCCTL0_CIM_HALWAYS 0x00000002 // Hysteresis Always
  927. #define ADC_DCCTL0_CIM_HONCE 0x00000003 // Hysteresis Once
  928. //*****************************************************************************
  929. //
  930. // The following are defines for the bit fields in the ADC_O_DCCTL1 register.
  931. //
  932. //*****************************************************************************
  933. #define ADC_DCCTL1_CTE 0x00001000 // Comparison Trigger Enable
  934. #define ADC_DCCTL1_CTC_M 0x00000C00 // Comparison Trigger Condition
  935. #define ADC_DCCTL1_CTC_LOW 0x00000000 // Low Band
  936. #define ADC_DCCTL1_CTC_MID 0x00000400 // Mid Band
  937. #define ADC_DCCTL1_CTC_HIGH 0x00000C00 // High Band
  938. #define ADC_DCCTL1_CTM_M 0x00000300 // Comparison Trigger Mode
  939. #define ADC_DCCTL1_CTM_ALWAYS 0x00000000 // Always
  940. #define ADC_DCCTL1_CTM_ONCE 0x00000100 // Once
  941. #define ADC_DCCTL1_CTM_HALWAYS 0x00000200 // Hysteresis Always
  942. #define ADC_DCCTL1_CTM_HONCE 0x00000300 // Hysteresis Once
  943. #define ADC_DCCTL1_CIE 0x00000010 // Comparison Interrupt Enable
  944. #define ADC_DCCTL1_CIC_M 0x0000000C // Comparison Interrupt Condition
  945. #define ADC_DCCTL1_CIC_LOW 0x00000000 // Low Band
  946. #define ADC_DCCTL1_CIC_MID 0x00000004 // Mid Band
  947. #define ADC_DCCTL1_CIC_HIGH 0x0000000C // High Band
  948. #define ADC_DCCTL1_CIM_M 0x00000003 // Comparison Interrupt Mode
  949. #define ADC_DCCTL1_CIM_ALWAYS 0x00000000 // Always
  950. #define ADC_DCCTL1_CIM_ONCE 0x00000001 // Once
  951. #define ADC_DCCTL1_CIM_HALWAYS 0x00000002 // Hysteresis Always
  952. #define ADC_DCCTL1_CIM_HONCE 0x00000003 // Hysteresis Once
  953. //*****************************************************************************
  954. //
  955. // The following are defines for the bit fields in the ADC_O_DCCTL2 register.
  956. //
  957. //*****************************************************************************
  958. #define ADC_DCCTL2_CTE 0x00001000 // Comparison Trigger Enable
  959. #define ADC_DCCTL2_CTC_M 0x00000C00 // Comparison Trigger Condition
  960. #define ADC_DCCTL2_CTC_LOW 0x00000000 // Low Band
  961. #define ADC_DCCTL2_CTC_MID 0x00000400 // Mid Band
  962. #define ADC_DCCTL2_CTC_HIGH 0x00000C00 // High Band
  963. #define ADC_DCCTL2_CTM_M 0x00000300 // Comparison Trigger Mode
  964. #define ADC_DCCTL2_CTM_ALWAYS 0x00000000 // Always
  965. #define ADC_DCCTL2_CTM_ONCE 0x00000100 // Once
  966. #define ADC_DCCTL2_CTM_HALWAYS 0x00000200 // Hysteresis Always
  967. #define ADC_DCCTL2_CTM_HONCE 0x00000300 // Hysteresis Once
  968. #define ADC_DCCTL2_CIE 0x00000010 // Comparison Interrupt Enable
  969. #define ADC_DCCTL2_CIC_M 0x0000000C // Comparison Interrupt Condition
  970. #define ADC_DCCTL2_CIC_LOW 0x00000000 // Low Band
  971. #define ADC_DCCTL2_CIC_MID 0x00000004 // Mid Band
  972. #define ADC_DCCTL2_CIC_HIGH 0x0000000C // High Band
  973. #define ADC_DCCTL2_CIM_M 0x00000003 // Comparison Interrupt Mode
  974. #define ADC_DCCTL2_CIM_ALWAYS 0x00000000 // Always
  975. #define ADC_DCCTL2_CIM_ONCE 0x00000001 // Once
  976. #define ADC_DCCTL2_CIM_HALWAYS 0x00000002 // Hysteresis Always
  977. #define ADC_DCCTL2_CIM_HONCE 0x00000003 // Hysteresis Once
  978. //*****************************************************************************
  979. //
  980. // The following are defines for the bit fields in the ADC_O_DCCTL3 register.
  981. //
  982. //*****************************************************************************
  983. #define ADC_DCCTL3_CTE 0x00001000 // Comparison Trigger Enable
  984. #define ADC_DCCTL3_CTC_M 0x00000C00 // Comparison Trigger Condition
  985. #define ADC_DCCTL3_CTC_LOW 0x00000000 // Low Band
  986. #define ADC_DCCTL3_CTC_MID 0x00000400 // Mid Band
  987. #define ADC_DCCTL3_CTC_HIGH 0x00000C00 // High Band
  988. #define ADC_DCCTL3_CTM_M 0x00000300 // Comparison Trigger Mode
  989. #define ADC_DCCTL3_CTM_ALWAYS 0x00000000 // Always
  990. #define ADC_DCCTL3_CTM_ONCE 0x00000100 // Once
  991. #define ADC_DCCTL3_CTM_HALWAYS 0x00000200 // Hysteresis Always
  992. #define ADC_DCCTL3_CTM_HONCE 0x00000300 // Hysteresis Once
  993. #define ADC_DCCTL3_CIE 0x00000010 // Comparison Interrupt Enable
  994. #define ADC_DCCTL3_CIC_M 0x0000000C // Comparison Interrupt Condition
  995. #define ADC_DCCTL3_CIC_LOW 0x00000000 // Low Band
  996. #define ADC_DCCTL3_CIC_MID 0x00000004 // Mid Band
  997. #define ADC_DCCTL3_CIC_HIGH 0x0000000C // High Band
  998. #define ADC_DCCTL3_CIM_M 0x00000003 // Comparison Interrupt Mode
  999. #define ADC_DCCTL3_CIM_ALWAYS 0x00000000 // Always
  1000. #define ADC_DCCTL3_CIM_ONCE 0x00000001 // Once
  1001. #define ADC_DCCTL3_CIM_HALWAYS 0x00000002 // Hysteresis Always
  1002. #define ADC_DCCTL3_CIM_HONCE 0x00000003 // Hysteresis Once
  1003. //*****************************************************************************
  1004. //
  1005. // The following are defines for the bit fields in the ADC_O_DCCTL4 register.
  1006. //
  1007. //*****************************************************************************
  1008. #define ADC_DCCTL4_CTE 0x00001000 // Comparison Trigger Enable
  1009. #define ADC_DCCTL4_CTC_M 0x00000C00 // Comparison Trigger Condition
  1010. #define ADC_DCCTL4_CTC_LOW 0x00000000 // Low Band
  1011. #define ADC_DCCTL4_CTC_MID 0x00000400 // Mid Band
  1012. #define ADC_DCCTL4_CTC_HIGH 0x00000C00 // High Band
  1013. #define ADC_DCCTL4_CTM_M 0x00000300 // Comparison Trigger Mode
  1014. #define ADC_DCCTL4_CTM_ALWAYS 0x00000000 // Always
  1015. #define ADC_DCCTL4_CTM_ONCE 0x00000100 // Once
  1016. #define ADC_DCCTL4_CTM_HALWAYS 0x00000200 // Hysteresis Always
  1017. #define ADC_DCCTL4_CTM_HONCE 0x00000300 // Hysteresis Once
  1018. #define ADC_DCCTL4_CIE 0x00000010 // Comparison Interrupt Enable
  1019. #define ADC_DCCTL4_CIC_M 0x0000000C // Comparison Interrupt Condition
  1020. #define ADC_DCCTL4_CIC_LOW 0x00000000 // Low Band
  1021. #define ADC_DCCTL4_CIC_MID 0x00000004 // Mid Band
  1022. #define ADC_DCCTL4_CIC_HIGH 0x0000000C // High Band
  1023. #define ADC_DCCTL4_CIM_M 0x00000003 // Comparison Interrupt Mode
  1024. #define ADC_DCCTL4_CIM_ALWAYS 0x00000000 // Always
  1025. #define ADC_DCCTL4_CIM_ONCE 0x00000001 // Once
  1026. #define ADC_DCCTL4_CIM_HALWAYS 0x00000002 // Hysteresis Always
  1027. #define ADC_DCCTL4_CIM_HONCE 0x00000003 // Hysteresis Once
  1028. //*****************************************************************************
  1029. //
  1030. // The following are defines for the bit fields in the ADC_O_DCCTL5 register.
  1031. //
  1032. //*****************************************************************************
  1033. #define ADC_DCCTL5_CTE 0x00001000 // Comparison Trigger Enable
  1034. #define ADC_DCCTL5_CTC_M 0x00000C00 // Comparison Trigger Condition
  1035. #define ADC_DCCTL5_CTC_LOW 0x00000000 // Low Band
  1036. #define ADC_DCCTL5_CTC_MID 0x00000400 // Mid Band
  1037. #define ADC_DCCTL5_CTC_HIGH 0x00000C00 // High Band
  1038. #define ADC_DCCTL5_CTM_M 0x00000300 // Comparison Trigger Mode
  1039. #define ADC_DCCTL5_CTM_ALWAYS 0x00000000 // Always
  1040. #define ADC_DCCTL5_CTM_ONCE 0x00000100 // Once
  1041. #define ADC_DCCTL5_CTM_HALWAYS 0x00000200 // Hysteresis Always
  1042. #define ADC_DCCTL5_CTM_HONCE 0x00000300 // Hysteresis Once
  1043. #define ADC_DCCTL5_CIE 0x00000010 // Comparison Interrupt Enable
  1044. #define ADC_DCCTL5_CIC_M 0x0000000C // Comparison Interrupt Condition
  1045. #define ADC_DCCTL5_CIC_LOW 0x00000000 // Low Band
  1046. #define ADC_DCCTL5_CIC_MID 0x00000004 // Mid Band
  1047. #define ADC_DCCTL5_CIC_HIGH 0x0000000C // High Band
  1048. #define ADC_DCCTL5_CIM_M 0x00000003 // Comparison Interrupt Mode
  1049. #define ADC_DCCTL5_CIM_ALWAYS 0x00000000 // Always
  1050. #define ADC_DCCTL5_CIM_ONCE 0x00000001 // Once
  1051. #define ADC_DCCTL5_CIM_HALWAYS 0x00000002 // Hysteresis Always
  1052. #define ADC_DCCTL5_CIM_HONCE 0x00000003 // Hysteresis Once
  1053. //*****************************************************************************
  1054. //
  1055. // The following are defines for the bit fields in the ADC_O_DCCTL6 register.
  1056. //
  1057. //*****************************************************************************
  1058. #define ADC_DCCTL6_CTE 0x00001000 // Comparison Trigger Enable
  1059. #define ADC_DCCTL6_CTC_M 0x00000C00 // Comparison Trigger Condition
  1060. #define ADC_DCCTL6_CTC_LOW 0x00000000 // Low Band
  1061. #define ADC_DCCTL6_CTC_MID 0x00000400 // Mid Band
  1062. #define ADC_DCCTL6_CTC_HIGH 0x00000C00 // High Band
  1063. #define ADC_DCCTL6_CTM_M 0x00000300 // Comparison Trigger Mode
  1064. #define ADC_DCCTL6_CTM_ALWAYS 0x00000000 // Always
  1065. #define ADC_DCCTL6_CTM_ONCE 0x00000100 // Once
  1066. #define ADC_DCCTL6_CTM_HALWAYS 0x00000200 // Hysteresis Always
  1067. #define ADC_DCCTL6_CTM_HONCE 0x00000300 // Hysteresis Once
  1068. #define ADC_DCCTL6_CIE 0x00000010 // Comparison Interrupt Enable
  1069. #define ADC_DCCTL6_CIC_M 0x0000000C // Comparison Interrupt Condition
  1070. #define ADC_DCCTL6_CIC_LOW 0x00000000 // Low Band
  1071. #define ADC_DCCTL6_CIC_MID 0x00000004 // Mid Band
  1072. #define ADC_DCCTL6_CIC_HIGH 0x0000000C // High Band
  1073. #define ADC_DCCTL6_CIM_M 0x00000003 // Comparison Interrupt Mode
  1074. #define ADC_DCCTL6_CIM_ALWAYS 0x00000000 // Always
  1075. #define ADC_DCCTL6_CIM_ONCE 0x00000001 // Once
  1076. #define ADC_DCCTL6_CIM_HALWAYS 0x00000002 // Hysteresis Always
  1077. #define ADC_DCCTL6_CIM_HONCE 0x00000003 // Hysteresis Once
  1078. //*****************************************************************************
  1079. //
  1080. // The following are defines for the bit fields in the ADC_O_DCCTL7 register.
  1081. //
  1082. //*****************************************************************************
  1083. #define ADC_DCCTL7_CTE 0x00001000 // Comparison Trigger Enable
  1084. #define ADC_DCCTL7_CTC_M 0x00000C00 // Comparison Trigger Condition
  1085. #define ADC_DCCTL7_CTC_LOW 0x00000000 // Low Band
  1086. #define ADC_DCCTL7_CTC_MID 0x00000400 // Mid Band
  1087. #define ADC_DCCTL7_CTC_HIGH 0x00000C00 // High Band
  1088. #define ADC_DCCTL7_CTM_M 0x00000300 // Comparison Trigger Mode
  1089. #define ADC_DCCTL7_CTM_ALWAYS 0x00000000 // Always
  1090. #define ADC_DCCTL7_CTM_ONCE 0x00000100 // Once
  1091. #define ADC_DCCTL7_CTM_HALWAYS 0x00000200 // Hysteresis Always
  1092. #define ADC_DCCTL7_CTM_HONCE 0x00000300 // Hysteresis Once
  1093. #define ADC_DCCTL7_CIE 0x00000010 // Comparison Interrupt Enable
  1094. #define ADC_DCCTL7_CIC_M 0x0000000C // Comparison Interrupt Condition
  1095. #define ADC_DCCTL7_CIC_LOW 0x00000000 // Low Band
  1096. #define ADC_DCCTL7_CIC_MID 0x00000004 // Mid Band
  1097. #define ADC_DCCTL7_CIC_HIGH 0x0000000C // High Band
  1098. #define ADC_DCCTL7_CIM_M 0x00000003 // Comparison Interrupt Mode
  1099. #define ADC_DCCTL7_CIM_ALWAYS 0x00000000 // Always
  1100. #define ADC_DCCTL7_CIM_ONCE 0x00000001 // Once
  1101. #define ADC_DCCTL7_CIM_HALWAYS 0x00000002 // Hysteresis Always
  1102. #define ADC_DCCTL7_CIM_HONCE 0x00000003 // Hysteresis Once
  1103. //*****************************************************************************
  1104. //
  1105. // The following are defines for the bit fields in the ADC_O_DCCMP0 register.
  1106. //
  1107. //*****************************************************************************
  1108. #define ADC_DCCMP0_COMP1_M 0x0FFF0000 // Compare 1
  1109. #define ADC_DCCMP0_COMP0_M 0x00000FFF // Compare 0
  1110. #define ADC_DCCMP0_COMP1_S 16
  1111. #define ADC_DCCMP0_COMP0_S 0
  1112. //*****************************************************************************
  1113. //
  1114. // The following are defines for the bit fields in the ADC_O_DCCMP1 register.
  1115. //
  1116. //*****************************************************************************
  1117. #define ADC_DCCMP1_COMP1_M 0x0FFF0000 // Compare 1
  1118. #define ADC_DCCMP1_COMP0_M 0x00000FFF // Compare 0
  1119. #define ADC_DCCMP1_COMP1_S 16
  1120. #define ADC_DCCMP1_COMP0_S 0
  1121. //*****************************************************************************
  1122. //
  1123. // The following are defines for the bit fields in the ADC_O_DCCMP2 register.
  1124. //
  1125. //*****************************************************************************
  1126. #define ADC_DCCMP2_COMP1_M 0x0FFF0000 // Compare 1
  1127. #define ADC_DCCMP2_COMP0_M 0x00000FFF // Compare 0
  1128. #define ADC_DCCMP2_COMP1_S 16
  1129. #define ADC_DCCMP2_COMP0_S 0
  1130. //*****************************************************************************
  1131. //
  1132. // The following are defines for the bit fields in the ADC_O_DCCMP3 register.
  1133. //
  1134. //*****************************************************************************
  1135. #define ADC_DCCMP3_COMP1_M 0x0FFF0000 // Compare 1
  1136. #define ADC_DCCMP3_COMP0_M 0x00000FFF // Compare 0
  1137. #define ADC_DCCMP3_COMP1_S 16
  1138. #define ADC_DCCMP3_COMP0_S 0
  1139. //*****************************************************************************
  1140. //
  1141. // The following are defines for the bit fields in the ADC_O_DCCMP4 register.
  1142. //
  1143. //*****************************************************************************
  1144. #define ADC_DCCMP4_COMP1_M 0x0FFF0000 // Compare 1
  1145. #define ADC_DCCMP4_COMP0_M 0x00000FFF // Compare 0
  1146. #define ADC_DCCMP4_COMP1_S 16
  1147. #define ADC_DCCMP4_COMP0_S 0
  1148. //*****************************************************************************
  1149. //
  1150. // The following are defines for the bit fields in the ADC_O_DCCMP5 register.
  1151. //
  1152. //*****************************************************************************
  1153. #define ADC_DCCMP5_COMP1_M 0x0FFF0000 // Compare 1
  1154. #define ADC_DCCMP5_COMP0_M 0x00000FFF // Compare 0
  1155. #define ADC_DCCMP5_COMP1_S 16
  1156. #define ADC_DCCMP5_COMP0_S 0
  1157. //*****************************************************************************
  1158. //
  1159. // The following are defines for the bit fields in the ADC_O_DCCMP6 register.
  1160. //
  1161. //*****************************************************************************
  1162. #define ADC_DCCMP6_COMP1_M 0x0FFF0000 // Compare 1
  1163. #define ADC_DCCMP6_COMP0_M 0x00000FFF // Compare 0
  1164. #define ADC_DCCMP6_COMP1_S 16
  1165. #define ADC_DCCMP6_COMP0_S 0
  1166. //*****************************************************************************
  1167. //
  1168. // The following are defines for the bit fields in the ADC_O_DCCMP7 register.
  1169. //
  1170. //*****************************************************************************
  1171. #define ADC_DCCMP7_COMP1_M 0x0FFF0000 // Compare 1
  1172. #define ADC_DCCMP7_COMP0_M 0x00000FFF // Compare 0
  1173. #define ADC_DCCMP7_COMP1_S 16
  1174. #define ADC_DCCMP7_COMP0_S 0
  1175. //*****************************************************************************
  1176. //
  1177. // The following are defines for the bit fields in the ADC_O_PP register.
  1178. //
  1179. //*****************************************************************************
  1180. #define ADC_PP_APSHT 0x01000000 // Application-Programmable
  1181. // Sample-and-Hold Time
  1182. #define ADC_PP_TS 0x00800000 // Temperature Sensor
  1183. #define ADC_PP_RSL_M 0x007C0000 // Resolution
  1184. #define ADC_PP_TYPE_M 0x00030000 // ADC Architecture
  1185. #define ADC_PP_TYPE_SAR 0x00000000 // SAR
  1186. #define ADC_PP_DC_M 0x0000FC00 // Digital Comparator Count
  1187. #define ADC_PP_CH_M 0x000003F0 // ADC Channel Count
  1188. #define ADC_PP_MCR_M 0x0000000F // Maximum Conversion Rate
  1189. #define ADC_PP_MCR_FULL 0x00000007 // Full conversion rate (FCONV) as
  1190. // defined by TADC and NSH
  1191. #define ADC_PP_MSR_M 0x0000000F // Maximum ADC Sample Rate
  1192. #define ADC_PP_MSR_125K 0x00000001 // 125 ksps
  1193. #define ADC_PP_MSR_250K 0x00000003 // 250 ksps
  1194. #define ADC_PP_MSR_500K 0x00000005 // 500 ksps
  1195. #define ADC_PP_MSR_1M 0x00000007 // 1 Msps
  1196. #define ADC_PP_RSL_S 18
  1197. #define ADC_PP_DC_S 10
  1198. #define ADC_PP_CH_S 4
  1199. //*****************************************************************************
  1200. //
  1201. // The following are defines for the bit fields in the ADC_O_PC register.
  1202. //
  1203. //*****************************************************************************
  1204. #define ADC_PC_SR_M 0x0000000F // ADC Sample Rate
  1205. #define ADC_PC_SR_125K 0x00000001 // 125 ksps
  1206. #define ADC_PC_SR_250K 0x00000003 // 250 ksps
  1207. #define ADC_PC_SR_500K 0x00000005 // 500 ksps
  1208. #define ADC_PC_SR_1M 0x00000007 // 1 Msps
  1209. #define ADC_PC_MCR_M 0x0000000F // Conversion Rate
  1210. #define ADC_PC_MCR_1_8 0x00000001 // Eighth conversion rate. After a
  1211. // conversion completes, the logic
  1212. // pauses for 112 TADC periods
  1213. // before starting the next
  1214. // conversion
  1215. #define ADC_PC_MCR_1_4 0x00000003 // Quarter conversion rate. After a
  1216. // conversion completes, the logic
  1217. // pauses for 48 TADC periods
  1218. // before starting the next
  1219. // conversion
  1220. #define ADC_PC_MCR_1_2 0x00000005 // Half conversion rate. After a
  1221. // conversion completes, the logic
  1222. // pauses for 16 TADC periods
  1223. // before starting the next
  1224. // conversion
  1225. #define ADC_PC_MCR_FULL 0x00000007 // Full conversion rate (FCONV) as
  1226. // defined by TADC and NSH
  1227. //*****************************************************************************
  1228. //
  1229. // The following are defines for the bit fields in the ADC_O_CC register.
  1230. //
  1231. //*****************************************************************************
  1232. #define ADC_CC_CLKDIV_M 0x000003F0 // PLL VCO Clock Divisor
  1233. #define ADC_CC_CS_M 0x0000000F // ADC Clock Source
  1234. #define ADC_CC_CS_SYSPLL 0x00000000 // PLL VCO divided by CLKDIV
  1235. #define ADC_CC_CS_PIOSC 0x00000001 // PIOSC
  1236. #define ADC_CC_CS_MOSC 0x00000002 // MOSC
  1237. #define ADC_CC_CLKDIV_S 4
  1238. #endif // __HW_ADC_H__