hw_timer.h 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778
  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. //*****************************************************************************
  36. //
  37. // hw_timer.h - Defines and macros used when accessing the timer.
  38. //
  39. //*****************************************************************************
  40. //##### INTERNAL BEGIN #####
  41. //
  42. // This is an auto-generated file. Do not edit by hand.
  43. // Created by version 6779 of DriverLib.
  44. //
  45. //##### INTERNAL END #####
  46. #ifndef __HW_TIMER_H__
  47. #define __HW_TIMER_H__
  48. //*****************************************************************************
  49. //
  50. // The following are defines for the Timer register offsets.
  51. //
  52. //*****************************************************************************
  53. #define TIMER_O_CFG 0x00000000 // GPTM Configuration
  54. #define TIMER_O_TAMR 0x00000004 // GPTM Timer A Mode
  55. #define TIMER_O_TBMR 0x00000008 // GPTM Timer B Mode
  56. #define TIMER_O_CTL 0x0000000C // GPTM Control
  57. //##### GARNET BEGIN #####
  58. #define TIMER_O_SYNC 0x00000010 // GPTM Synchronize
  59. //##### GARNET END #####
  60. #define TIMER_O_IMR 0x00000018 // GPTM Interrupt Mask
  61. #define TIMER_O_RIS 0x0000001C // GPTM Raw Interrupt Status
  62. #define TIMER_O_MIS 0x00000020 // GPTM Masked Interrupt Status
  63. #define TIMER_O_ICR 0x00000024 // GPTM Interrupt Clear
  64. #define TIMER_O_TAILR 0x00000028 // GPTM Timer A Interval Load
  65. #define TIMER_O_TBILR 0x0000002C // GPTM Timer B Interval Load
  66. #define TIMER_O_TAMATCHR 0x00000030 // GPTM Timer A Match
  67. #define TIMER_O_TBMATCHR 0x00000034 // GPTM Timer B Match
  68. #define TIMER_O_TAPR 0x00000038 // GPTM Timer A Prescale
  69. #define TIMER_O_TBPR 0x0000003C // GPTM Timer B Prescale
  70. #define TIMER_O_TAPMR 0x00000040 // GPTM TimerA Prescale Match
  71. #define TIMER_O_TBPMR 0x00000044 // GPTM TimerB Prescale Match
  72. #define TIMER_O_TAR 0x00000048 // GPTM Timer A
  73. #define TIMER_O_TBR 0x0000004C // GPTM Timer B
  74. #define TIMER_O_TAV 0x00000050 // GPTM Timer A Value
  75. #define TIMER_O_TBV 0x00000054 // GPTM Timer B Value
  76. #define TIMER_O_RTCPD 0x00000058 // GPTM RTC Predivide
  77. #define TIMER_O_TAPS 0x0000005C // GPTM Timer A Prescale Snapshot
  78. #define TIMER_O_TBPS 0x00000060 // GPTM Timer B Prescale Snapshot
  79. #define TIMER_O_TAPV 0x00000064 // GPTM Timer A Prescale Value
  80. #define TIMER_O_TBPV 0x00000068 // GPTM Timer B Prescale Value
  81. #define TIMER_O_DMAEV 0x0000006C // GPTM DMA Event
  82. #define TIMER_O_PP 0x00000FC0 // GPTM Peripheral Properties
  83. //*****************************************************************************
  84. //
  85. // The following are defines for the bit fields in the TIMER_O_CFG register.
  86. //
  87. //*****************************************************************************
  88. #define TIMER_CFG_M 0x00000007 // GPTM Configuration
  89. #define TIMER_CFG_32_BIT_TIMER 0x00000000 // 32-bit timer configuration
  90. #define TIMER_CFG_32_BIT_RTC 0x00000001 // 32-bit real-time clock (RTC)
  91. // counter configuration
  92. #define TIMER_CFG_16_BIT 0x00000004 // 16-bit timer configuration. The
  93. // function is controlled by bits
  94. // 1:0 of GPTMTAMR and GPTMTBMR
  95. //*****************************************************************************
  96. //
  97. // The following are defines for the bit fields in the TIMER_O_TAMR register.
  98. //
  99. //*****************************************************************************
  100. //##### GARNET BEGIN #####
  101. #define TIMER_TAMR_TAPLO 0x00000800 // GPTM Timer A PWM Legacy
  102. // Operation
  103. #define TIMER_TAMR_TAMRSU 0x00000400 // GPTM Timer A Match Register
  104. // Update
  105. #define TIMER_TAMR_TAPWMIE 0x00000200 // GPTM Timer A PWM Interrupt
  106. // Enable
  107. #define TIMER_TAMR_TAILD 0x00000100 // GPTM Timer A Interval Load Write
  108. //##### GARNET END #####
  109. #define TIMER_TAMR_TASNAPS 0x00000080 // GPTM Timer A Snap-Shot Mode
  110. #define TIMER_TAMR_TAWOT 0x00000040 // GPTM Timer A Wait-on-Trigger
  111. #define TIMER_TAMR_TAMIE 0x00000020 // GPTM Timer A Match Interrupt
  112. // Enable
  113. #define TIMER_TAMR_TACDIR 0x00000010 // GPTM Timer A Count Direction
  114. #define TIMER_TAMR_TAAMS 0x00000008 // GPTM Timer A Alternate Mode
  115. // Select
  116. #define TIMER_TAMR_TACMR 0x00000004 // GPTM Timer A Capture Mode
  117. #define TIMER_TAMR_TAMR_M 0x00000003 // GPTM Timer A Mode
  118. #define TIMER_TAMR_TAMR_1_SHOT 0x00000001 // One-Shot Timer mode
  119. #define TIMER_TAMR_TAMR_PERIOD 0x00000002 // Periodic Timer mode
  120. #define TIMER_TAMR_TAMR_CAP 0x00000003 // Capture mode
  121. //*****************************************************************************
  122. //
  123. // The following are defines for the bit fields in the TIMER_O_TBMR register.
  124. //
  125. //*****************************************************************************
  126. //##### GARNET BEGIN #####
  127. #define TIMER_TBMR_TBPLO 0x00000800 // GPTM Timer B PWM Legacy
  128. // Operation
  129. #define TIMER_TBMR_TBMRSU 0x00000400 // GPTM Timer B Match Register
  130. // Update
  131. #define TIMER_TBMR_TBPWMIE 0x00000200 // GPTM Timer B PWM Interrupt
  132. // Enable
  133. #define TIMER_TBMR_TBILD 0x00000100 // GPTM Timer B Interval Load Write
  134. //##### GARNET END #####
  135. #define TIMER_TBMR_TBSNAPS 0x00000080 // GPTM Timer B Snap-Shot Mode
  136. #define TIMER_TBMR_TBWOT 0x00000040 // GPTM Timer B Wait-on-Trigger
  137. #define TIMER_TBMR_TBMIE 0x00000020 // GPTM Timer B Match Interrupt
  138. // Enable
  139. #define TIMER_TBMR_TBCDIR 0x00000010 // GPTM Timer B Count Direction
  140. #define TIMER_TBMR_TBAMS 0x00000008 // GPTM Timer B Alternate Mode
  141. // Select
  142. #define TIMER_TBMR_TBCMR 0x00000004 // GPTM Timer B Capture Mode
  143. #define TIMER_TBMR_TBMR_M 0x00000003 // GPTM Timer B Mode
  144. #define TIMER_TBMR_TBMR_1_SHOT 0x00000001 // One-Shot Timer mode
  145. #define TIMER_TBMR_TBMR_PERIOD 0x00000002 // Periodic Timer mode
  146. #define TIMER_TBMR_TBMR_CAP 0x00000003 // Capture mode
  147. //*****************************************************************************
  148. //
  149. // The following are defines for the bit fields in the TIMER_O_CTL register.
  150. //
  151. //*****************************************************************************
  152. #define TIMER_CTL_TBPWML 0x00004000 // GPTM Timer B PWM Output Level
  153. #define TIMER_CTL_TBOTE 0x00002000 // GPTM Timer B Output Trigger
  154. // Enable
  155. #define TIMER_CTL_TBEVENT_M 0x00000C00 // GPTM Timer B Event Mode
  156. #define TIMER_CTL_TBEVENT_POS 0x00000000 // Positive edge
  157. #define TIMER_CTL_TBEVENT_NEG 0x00000400 // Negative edge
  158. #define TIMER_CTL_TBEVENT_BOTH 0x00000C00 // Both edges
  159. #define TIMER_CTL_TBSTALL 0x00000200 // GPTM Timer B Stall Enable
  160. #define TIMER_CTL_TBEN 0x00000100 // GPTM Timer B Enable
  161. #define TIMER_CTL_TAPWML 0x00000040 // GPTM Timer A PWM Output Level
  162. #define TIMER_CTL_TAOTE 0x00000020 // GPTM Timer A Output Trigger
  163. // Enable
  164. #define TIMER_CTL_RTCEN 0x00000010 // GPTM RTC Enable
  165. #define TIMER_CTL_TAEVENT_M 0x0000000C // GPTM Timer A Event Mode
  166. #define TIMER_CTL_TAEVENT_POS 0x00000000 // Positive edge
  167. #define TIMER_CTL_TAEVENT_NEG 0x00000004 // Negative edge
  168. #define TIMER_CTL_TAEVENT_BOTH 0x0000000C // Both edges
  169. #define TIMER_CTL_TASTALL 0x00000002 // GPTM Timer A Stall Enable
  170. #define TIMER_CTL_TAEN 0x00000001 // GPTM Timer A Enable
  171. //##### GARNET BEGIN #####
  172. //*****************************************************************************
  173. //
  174. // The following are defines for the bit fields in the TIMER_O_SYNC register.
  175. //
  176. //*****************************************************************************
  177. #define TIMER_SYNC_SYNC11_M 0x00C00000 // Synchronize GPTM Timer 11
  178. #define TIMER_SYNC_SYNC11_TA 0x00400000 // A timeout event for Timer A of
  179. // GPTM11 is triggered
  180. #define TIMER_SYNC_SYNC11_TB 0x00800000 // A timeout event for Timer B of
  181. // GPTM11 is triggered
  182. #define TIMER_SYNC_SYNC11_TATB 0x00C00000 // A timeout event for both Timer A
  183. // and Timer B of GPTM11 is
  184. // triggered
  185. #define TIMER_SYNC_SYNC10_M 0x00300000 // Synchronize GPTM Timer 10
  186. #define TIMER_SYNC_SYNC10_TA 0x00100000 // A timeout event for Timer A of
  187. // GPTM10 is triggered
  188. #define TIMER_SYNC_SYNC10_TB 0x00200000 // A timeout event for Timer B of
  189. // GPTM10 is triggered
  190. #define TIMER_SYNC_SYNC10_TATB 0x00300000 // A timeout event for both Timer A
  191. // and Timer B of GPTM10 is
  192. // triggered
  193. #define TIMER_SYNC_SYNC9_M 0x000C0000 // Synchronize GPTM Timer 9
  194. #define TIMER_SYNC_SYNC9_TA 0x00040000 // A timeout event for Timer A of
  195. // GPTM9 is triggered
  196. #define TIMER_SYNC_SYNC9_TB 0x00080000 // A timeout event for Timer B of
  197. // GPTM9 is triggered
  198. #define TIMER_SYNC_SYNC9_TATB 0x000C0000 // A timeout event for both Timer A
  199. // and Timer B of GPTM9 is
  200. // triggered
  201. #define TIMER_SYNC_SYNC8_M 0x00030000 // Synchronize GPTM Timer 8
  202. #define TIMER_SYNC_SYNC8_TA 0x00010000 // A timeout event for Timer A of
  203. // GPTM8 is triggered
  204. #define TIMER_SYNC_SYNC8_TB 0x00020000 // A timeout event for Timer B of
  205. // GPTM8 is triggered
  206. #define TIMER_SYNC_SYNC8_TATB 0x00030000 // A timeout event for both Timer A
  207. // and Timer B of GPTM8 is
  208. // triggered
  209. #define TIMER_SYNC_SYNC7_M 0x0000C000 // Synchronize GPTM Timer 7
  210. #define TIMER_SYNC_SYNC7_TA 0x00004000 // A timeout event for Timer A of
  211. // GPTM7 is triggered
  212. #define TIMER_SYNC_SYNC7_TB 0x00008000 // A timeout event for Timer B of
  213. // GPTM7 is triggered
  214. #define TIMER_SYNC_SYNC7_TATB 0x0000C000 // A timeout event for both Timer A
  215. // and Timer B of GPTM7 is
  216. // triggered
  217. #define TIMER_SYNC_SYNC6_M 0x00003000 // Synchronize GPTM Timer 6
  218. #define TIMER_SYNC_SYNC6_TA 0x00001000 // A timeout event for Timer A of
  219. // GPTM6 is triggered
  220. #define TIMER_SYNC_SYNC6_TB 0x00002000 // A timeout event for Timer B of
  221. // GPTM6 is triggered
  222. #define TIMER_SYNC_SYNC6_TATB 0x00003000 // A timeout event for both Timer A
  223. // and Timer B of GPTM6 is
  224. // triggered
  225. #define TIMER_SYNC_SYNC5_M 0x00000C00 // Synchronize GPTM Timer 5
  226. #define TIMER_SYNC_SYNC5_TA 0x00000400 // A timeout event for Timer A of
  227. // GPTM5 is triggered
  228. #define TIMER_SYNC_SYNC5_TB 0x00000800 // A timeout event for Timer B of
  229. // GPTM5 is triggered
  230. #define TIMER_SYNC_SYNC5_TATB 0x00000C00 // A timeout event for both Timer A
  231. // and Timer B of GPTM5 is
  232. // triggered
  233. #define TIMER_SYNC_SYNC4_M 0x00000300 // Synchronize GPTM Timer 4
  234. #define TIMER_SYNC_SYNC4_TA 0x00000100 // A timeout event for Timer A of
  235. // GPTM4 is triggered
  236. #define TIMER_SYNC_SYNC4_TB 0x00000200 // A timeout event for Timer B of
  237. // GPTM4 is triggered
  238. #define TIMER_SYNC_SYNC4_TATB 0x00000300 // A timeout event for both Timer A
  239. // and Timer B of GPTM4 is
  240. // triggered
  241. #define TIMER_SYNC_SYNC3_M 0x000000C0 // Synchronize GPTM Timer 3
  242. #define TIMER_SYNC_SYNC3_TA 0x00000040 // A timeout event for Timer A of
  243. // GPTM3 is triggered
  244. #define TIMER_SYNC_SYNC3_TB 0x00000080 // A timeout event for Timer B of
  245. // GPTM3 is triggered
  246. #define TIMER_SYNC_SYNC3_TATB 0x000000C0 // A timeout event for both Timer A
  247. // and Timer B of GPTM3 is
  248. // triggered
  249. #define TIMER_SYNC_SYNC2_M 0x00000030 // Synchronize GPTM Timer 2
  250. #define TIMER_SYNC_SYNC2_TA 0x00000010 // A timeout event for Timer A of
  251. // GPTM2 is triggered
  252. #define TIMER_SYNC_SYNC2_TB 0x00000020 // A timeout event for Timer B of
  253. // GPTM2 is triggered
  254. #define TIMER_SYNC_SYNC2_TATB 0x00000030 // A timeout event for both Timer A
  255. // and Timer B of GPTM2 is
  256. // triggered
  257. #define TIMER_SYNC_SYNC1_M 0x0000000C // Synchronize GPTM Timer 1
  258. #define TIMER_SYNC_SYNC1_TA 0x00000004 // A timeout event for Timer A of
  259. // GPTM1 is triggered
  260. #define TIMER_SYNC_SYNC1_TB 0x00000008 // A timeout event for Timer B of
  261. // GPTM1 is triggered
  262. #define TIMER_SYNC_SYNC1_TATB 0x0000000C // A timeout event for both Timer A
  263. // and Timer B of GPTM1 is
  264. // triggered
  265. #define TIMER_SYNC_SYNC0_M 0x00000003 // Synchronize GPTM Timer 0
  266. #define TIMER_SYNC_SYNC0_TA 0x00000001 // A timeout event for Timer A of
  267. // GPTM0 is triggered
  268. #define TIMER_SYNC_SYNC0_TB 0x00000002 // A timeout event for Timer B of
  269. // GPTM0 is triggered
  270. #define TIMER_SYNC_SYNC0_TATB 0x00000003 // A timeout event for both Timer A
  271. // and Timer B of GPTM0 is
  272. // triggered
  273. //##### GARNET END #####
  274. //*****************************************************************************
  275. //
  276. // The following are defines for the bit fields in the TIMER_O_IMR register.
  277. //
  278. //*****************************************************************************
  279. //##### GARNET BEGIN #####
  280. #define TIMER_IMR_WUEIM 0x00010000 // 32/64-Bit GPTM Write Update
  281. // Error Interrupt Mask
  282. //##### GARNET END #####
  283. #define TIMER_IMR_TBMIM 0x00000800 // GPTM Timer B Mode Match
  284. // Interrupt Mask
  285. #define TIMER_IMR_CBEIM 0x00000400 // GPTM Capture B Event Interrupt
  286. // Mask
  287. #define TIMER_IMR_CBMIM 0x00000200 // GPTM Capture B Match Interrupt
  288. // Mask
  289. #define TIMER_IMR_TBTOIM 0x00000100 // GPTM Timer B Time-Out Interrupt
  290. // Mask
  291. #define TIMER_IMR_TAMIM 0x00000010 // GPTM Timer A Mode Match
  292. // Interrupt Mask
  293. #define TIMER_IMR_RTCIM 0x00000008 // GPTM RTC Interrupt Mask
  294. #define TIMER_IMR_CAEIM 0x00000004 // GPTM Capture A Event Interrupt
  295. // Mask
  296. #define TIMER_IMR_CAMIM 0x00000002 // GPTM Capture A Match Interrupt
  297. // Mask
  298. #define TIMER_IMR_TATOIM 0x00000001 // GPTM Timer A Time-Out Interrupt
  299. // Mask
  300. //*****************************************************************************
  301. //
  302. // The following are defines for the bit fields in the TIMER_O_RIS register.
  303. //
  304. //*****************************************************************************
  305. //##### GARNET BEGIN #####
  306. #define TIMER_RIS_WUERIS 0x00010000 // 32/64-Bit GPTM Write Update
  307. // Error Raw Interrupt Status
  308. //##### GARNET END #####
  309. #define TIMER_RIS_TBMRIS 0x00000800 // GPTM Timer B Mode Match Raw
  310. // Interrupt
  311. #define TIMER_RIS_CBERIS 0x00000400 // GPTM Capture B Event Raw
  312. // Interrupt
  313. #define TIMER_RIS_CBMRIS 0x00000200 // GPTM Capture B Match Raw
  314. // Interrupt
  315. #define TIMER_RIS_TBTORIS 0x00000100 // GPTM Timer B Time-Out Raw
  316. // Interrupt
  317. #define TIMER_RIS_TAMRIS 0x00000010 // GPTM Timer A Mode Match Raw
  318. // Interrupt
  319. #define TIMER_RIS_RTCRIS 0x00000008 // GPTM RTC Raw Interrupt
  320. #define TIMER_RIS_CAERIS 0x00000004 // GPTM Capture A Event Raw
  321. // Interrupt
  322. #define TIMER_RIS_CAMRIS 0x00000002 // GPTM Capture A Match Raw
  323. // Interrupt
  324. #define TIMER_RIS_TATORIS 0x00000001 // GPTM Timer A Time-Out Raw
  325. // Interrupt
  326. //*****************************************************************************
  327. //
  328. // The following are defines for the bit fields in the TIMER_O_MIS register.
  329. //
  330. //*****************************************************************************
  331. //##### GARNET BEGIN #####
  332. #define TIMER_MIS_WUEMIS 0x00010000 // 32/64-Bit GPTM Write Update
  333. // Error Masked Interrupt Status
  334. //##### GARNET END #####
  335. #define TIMER_MIS_TBMMIS 0x00000800 // GPTM Timer B Mode Match Masked
  336. // Interrupt
  337. #define TIMER_MIS_CBEMIS 0x00000400 // GPTM Capture B Event Masked
  338. // Interrupt
  339. #define TIMER_MIS_CBMMIS 0x00000200 // GPTM Capture B Match Masked
  340. // Interrupt
  341. #define TIMER_MIS_TBTOMIS 0x00000100 // GPTM Timer B Time-Out Masked
  342. // Interrupt
  343. #define TIMER_MIS_TAMMIS 0x00000010 // GPTM Timer A Mode Match Masked
  344. // Interrupt
  345. #define TIMER_MIS_RTCMIS 0x00000008 // GPTM RTC Masked Interrupt
  346. #define TIMER_MIS_CAEMIS 0x00000004 // GPTM Capture A Event Masked
  347. // Interrupt
  348. #define TIMER_MIS_CAMMIS 0x00000002 // GPTM Capture A Match Masked
  349. // Interrupt
  350. #define TIMER_MIS_TATOMIS 0x00000001 // GPTM Timer A Time-Out Masked
  351. // Interrupt
  352. //*****************************************************************************
  353. //
  354. // The following are defines for the bit fields in the TIMER_O_ICR register.
  355. //
  356. //*****************************************************************************
  357. //##### GARNET BEGIN #####
  358. #define TIMER_ICR_WUECINT 0x00010000 // 32/64-Bit GPTM Write Update
  359. // Error Interrupt Clear
  360. //##### GARNET END #####
  361. #define TIMER_ICR_TBMCINT 0x00000800 // GPTM Timer B Mode Match
  362. // Interrupt Clear
  363. #define TIMER_ICR_CBECINT 0x00000400 // GPTM Capture B Event Interrupt
  364. // Clear
  365. #define TIMER_ICR_CBMCINT 0x00000200 // GPTM Capture B Match Interrupt
  366. // Clear
  367. #define TIMER_ICR_TBTOCINT 0x00000100 // GPTM Timer B Time-Out Interrupt
  368. // Clear
  369. #define TIMER_ICR_TAMCINT 0x00000010 // GPTM Timer A Mode Match
  370. // Interrupt Clear
  371. #define TIMER_ICR_RTCCINT 0x00000008 // GPTM RTC Interrupt Clear
  372. #define TIMER_ICR_CAECINT 0x00000004 // GPTM Capture A Event Interrupt
  373. // Clear
  374. #define TIMER_ICR_CAMCINT 0x00000002 // GPTM Capture A Match Interrupt
  375. // Clear
  376. #define TIMER_ICR_TATOCINT 0x00000001 // GPTM Timer A Time-Out Raw
  377. // Interrupt
  378. //*****************************************************************************
  379. //
  380. // The following are defines for the bit fields in the TIMER_O_TAILR register.
  381. //
  382. //*****************************************************************************
  383. //##### GARNET BEGIN #####
  384. #define TIMER_TAILR_M 0xFFFFFFFF // GPTM Timer A Interval Load
  385. // Register
  386. //##### GARNET END #####
  387. #define TIMER_TAILR_TAILRH_M 0xFFFF0000 // GPTM Timer A Interval Load
  388. // Register High
  389. #define TIMER_TAILR_TAILRL_M 0x0000FFFF // GPTM Timer A Interval Load
  390. // Register Low
  391. #define TIMER_TAILR_TAILRH_S 16
  392. #define TIMER_TAILR_TAILRL_S 0
  393. //##### GARNET BEGIN #####
  394. #define TIMER_TAILR_S 0
  395. //##### GARNET END #####
  396. //*****************************************************************************
  397. //
  398. // The following are defines for the bit fields in the TIMER_O_TBILR register.
  399. //
  400. //*****************************************************************************
  401. //##### GARNET BEGIN #####
  402. #define TIMER_TBILR_M 0xFFFFFFFF // GPTM Timer B Interval Load
  403. // Register
  404. //##### GARNET END #####
  405. #define TIMER_TBILR_TBILRL_M 0x0000FFFF // GPTM Timer B Interval Load
  406. // Register
  407. #define TIMER_TBILR_TBILRL_S 0
  408. //##### GARNET BEGIN #####
  409. #define TIMER_TBILR_S 0
  410. //##### GARNET END #####
  411. //*****************************************************************************
  412. //
  413. // The following are defines for the bit fields in the TIMER_O_TAMATCHR
  414. // register.
  415. //
  416. //*****************************************************************************
  417. //##### GARNET BEGIN #####
  418. #define TIMER_TAMATCHR_TAMR_M 0xFFFFFFFF // GPTM Timer A Match Register
  419. //##### GARNET END #####
  420. #define TIMER_TAMATCHR_TAMRH_M 0xFFFF0000 // GPTM Timer A Match Register High
  421. #define TIMER_TAMATCHR_TAMRL_M 0x0000FFFF // GPTM Timer A Match Register Low
  422. #define TIMER_TAMATCHR_TAMRH_S 16
  423. #define TIMER_TAMATCHR_TAMRL_S 0
  424. //##### GARNET BEGIN #####
  425. #define TIMER_TAMATCHR_TAMR_S 0
  426. //##### GARNET END #####
  427. //*****************************************************************************
  428. //
  429. // The following are defines for the bit fields in the TIMER_O_TBMATCHR
  430. // register.
  431. //
  432. //*****************************************************************************
  433. //##### GARNET BEGIN #####
  434. #define TIMER_TBMATCHR_TBMR_M 0xFFFFFFFF // GPTM Timer B Match Register
  435. //##### GARNET END #####
  436. #define TIMER_TBMATCHR_TBMRL_M 0x0000FFFF // GPTM Timer B Match Register Low
  437. //##### GARNET BEGIN #####
  438. #define TIMER_TBMATCHR_TBMR_S 0
  439. //##### GARNET END #####
  440. #define TIMER_TBMATCHR_TBMRL_S 0
  441. //*****************************************************************************
  442. //
  443. // The following are defines for the bit fields in the TIMER_O_TAPR register.
  444. //
  445. //*****************************************************************************
  446. //##### GARNET BEGIN #####
  447. #define TIMER_TAPR_TAPSRH_M 0x0000FF00 // GPTM Timer A Prescale High Byte
  448. //##### GARNET END #####
  449. #define TIMER_TAPR_TAPSR_M 0x000000FF // GPTM Timer A Prescale
  450. //##### GARNET BEGIN #####
  451. #define TIMER_TAPR_TAPSRH_S 8
  452. //##### GARNET END #####
  453. #define TIMER_TAPR_TAPSR_S 0
  454. //*****************************************************************************
  455. //
  456. // The following are defines for the bit fields in the TIMER_O_TBPR register.
  457. //
  458. //*****************************************************************************
  459. //##### GARNET BEGIN #####
  460. #define TIMER_TBPR_TBPSRH_M 0x0000FF00 // GPTM Timer B Prescale High Byte
  461. //##### GARNET END #####
  462. #define TIMER_TBPR_TBPSR_M 0x000000FF // GPTM Timer B Prescale
  463. //##### GARNET BEGIN #####
  464. #define TIMER_TBPR_TBPSRH_S 8
  465. //##### GARNET END #####
  466. #define TIMER_TBPR_TBPSR_S 0
  467. //*****************************************************************************
  468. //
  469. // The following are defines for the bit fields in the TIMER_O_TAPMR register.
  470. //
  471. //*****************************************************************************
  472. //##### GARNET BEGIN #####
  473. #define TIMER_TAPMR_TAPSMRH_M 0x0000FF00 // GPTM Timer A Prescale Match High
  474. // Byte
  475. //##### GARNET END #####
  476. #define TIMER_TAPMR_TAPSMR_M 0x000000FF // GPTM TimerA Prescale Match
  477. //##### GARNET BEGIN #####
  478. #define TIMER_TAPMR_TAPSMRH_S 8
  479. //##### GARNET END #####
  480. #define TIMER_TAPMR_TAPSMR_S 0
  481. //*****************************************************************************
  482. //
  483. // The following are defines for the bit fields in the TIMER_O_TBPMR register.
  484. //
  485. //*****************************************************************************
  486. //##### GARNET BEGIN #####
  487. #define TIMER_TBPMR_TBPSMRH_M 0x0000FF00 // GPTM Timer B Prescale Match High
  488. // Byte
  489. //##### GARNET END #####
  490. #define TIMER_TBPMR_TBPSMR_M 0x000000FF // GPTM TimerB Prescale Match
  491. //##### GARNET BEGIN #####
  492. #define TIMER_TBPMR_TBPSMRH_S 8
  493. //##### GARNET END #####
  494. #define TIMER_TBPMR_TBPSMR_S 0
  495. //*****************************************************************************
  496. //
  497. // The following are defines for the bit fields in the TIMER_O_TAR register.
  498. //
  499. //*****************************************************************************
  500. //##### GARNET BEGIN #####
  501. #define TIMER_TAR_M 0xFFFFFFFF // GPTM Timer A Register
  502. //##### GARNET END #####
  503. #define TIMER_TAR_TARH_M 0xFFFF0000 // GPTM Timer A Register High
  504. #define TIMER_TAR_TARL_M 0x0000FFFF // GPTM Timer A Register Low
  505. #define TIMER_TAR_TARH_S 16
  506. #define TIMER_TAR_TARL_S 0
  507. //##### GARNET BEGIN #####
  508. #define TIMER_TAR_S 0
  509. //##### GARNET END #####
  510. //*****************************************************************************
  511. //
  512. // The following are defines for the bit fields in the TIMER_O_TBR register.
  513. //
  514. //*****************************************************************************
  515. //##### GARNET BEGIN #####
  516. #define TIMER_TBR_M 0xFFFFFFFF // GPTM Timer B Register
  517. //##### GARNET END #####
  518. #define TIMER_TBR_TBRL_M 0x00FFFFFF // GPTM Timer B
  519. #define TIMER_TBR_TBRL_S 0
  520. //##### GARNET BEGIN #####
  521. #define TIMER_TBR_S 0
  522. //##### GARNET END #####
  523. //*****************************************************************************
  524. //
  525. // The following are defines for the bit fields in the TIMER_O_TAV register.
  526. //
  527. //*****************************************************************************
  528. //##### GARNET BEGIN #####
  529. #define TIMER_TAV_M 0xFFFFFFFF // GPTM Timer A Value
  530. //##### GARNET END #####
  531. #define TIMER_TAV_TAVH_M 0xFFFF0000 // GPTM Timer A Value High
  532. #define TIMER_TAV_TAVL_M 0x0000FFFF // GPTM Timer A Register Low
  533. #define TIMER_TAV_TAVH_S 16
  534. #define TIMER_TAV_TAVL_S 0
  535. //##### GARNET BEGIN #####
  536. #define TIMER_TAV_S 0
  537. //##### GARNET END #####
  538. //*****************************************************************************
  539. //
  540. // The following are defines for the bit fields in the TIMER_O_TBV register.
  541. //
  542. //*****************************************************************************
  543. //##### GARNET BEGIN #####
  544. #define TIMER_TBV_M 0xFFFFFFFF // GPTM Timer B Value
  545. //##### GARNET END #####
  546. #define TIMER_TBV_TBVL_M 0x0000FFFF // GPTM Timer B Register
  547. #define TIMER_TBV_TBVL_S 0
  548. //##### GARNET BEGIN #####
  549. #define TIMER_TBV_S 0
  550. //*****************************************************************************
  551. //
  552. // The following are defines for the bit fields in the TIMER_O_RTCPD register.
  553. //
  554. //*****************************************************************************
  555. #define TIMER_RTCPD_RTCPD_M 0x0000FFFF // RTC Predivide Counter Value
  556. #define TIMER_RTCPD_RTCPD_S 0
  557. //*****************************************************************************
  558. //
  559. // The following are defines for the bit fields in the TIMER_O_TAPS register.
  560. //
  561. //*****************************************************************************
  562. #define TIMER_TAPS_PSS_M 0x0000FFFF // GPTM Timer A Prescaler Snapshot
  563. #define TIMER_TAPS_PSS_S 0
  564. //*****************************************************************************
  565. //
  566. // The following are defines for the bit fields in the TIMER_O_TBPS register.
  567. //
  568. //*****************************************************************************
  569. #define TIMER_TBPS_PSS_M 0x0000FFFF // GPTM Timer A Prescaler Value
  570. #define TIMER_TBPS_PSS_S 0
  571. //*****************************************************************************
  572. //
  573. // The following are defines for the bit fields in the TIMER_O_TAPV register.
  574. //
  575. //*****************************************************************************
  576. #define TIMER_TAPV_PSV_M 0x0000FFFF // GPTM Timer A Prescaler Value
  577. #define TIMER_TAPV_PSV_S 0
  578. //*****************************************************************************
  579. //
  580. // The following are defines for the bit fields in the TIMER_O_TBPV register.
  581. //
  582. //*****************************************************************************
  583. #define TIMER_TBPV_PSV_M 0x0000FFFF // GPTM Timer B Prescaler Value
  584. #define TIMER_TBPV_PSV_S 0
  585. //*****************************************************************************
  586. //
  587. // The following are defines for the bit fields in the TIMER_O_PP register.
  588. //
  589. //*****************************************************************************
  590. #define TIMER_PP_SYNCCNT 0x00000020 // Synchronize Start
  591. #define TIMER_PP_CHAIN 0x00000010 // Chain with Other Timers
  592. #define TIMER_PP_SIZE_M 0x0000000F // Count Size
  593. #define TIMER_PP_SIZE__0 0x00000000 // Timer A and Timer B counters are
  594. // 16 bits each with an 8-bit
  595. // prescale counter
  596. #define TIMER_PP_SIZE__1 0x00000001 // Timer A and Timer B counters are
  597. // 32 bits each with an 16-bit
  598. // prescale counter
  599. //##### GARNET END #####
  600. //*****************************************************************************
  601. //
  602. // The following definitions are deprecated.
  603. //
  604. //*****************************************************************************
  605. #ifndef DEPRECATED
  606. //*****************************************************************************
  607. //
  608. // The following are deprecated defines for the bit fields in the TIMER_O_CFG
  609. // register.
  610. //
  611. //*****************************************************************************
  612. #define TIMER_CFG_CFG_MSK 0x00000007 // Configuration options mask
  613. //*****************************************************************************
  614. //
  615. // The following are deprecated defines for the bit fields in the TIMER_O_CTL
  616. // register.
  617. //
  618. //*****************************************************************************
  619. #define TIMER_CTL_TBEVENT_MSK 0x00000C00 // TimerB event mode mask
  620. #define TIMER_CTL_TAEVENT_MSK 0x0000000C // TimerA event mode mask
  621. //*****************************************************************************
  622. //
  623. // The following are deprecated defines for the bit fields in the TIMER_O_RIS
  624. // register.
  625. //
  626. //*****************************************************************************
  627. #define TIMER_RIS_CBEMIS 0x00000400 // CaptureB event masked int status
  628. #define TIMER_RIS_CBMMIS 0x00000200 // CaptureB match masked int status
  629. #define TIMER_RIS_TBTOMIS 0x00000100 // TimerB time out masked int stat
  630. #define TIMER_RIS_RTCMIS 0x00000008 // RTC masked int status
  631. #define TIMER_RIS_CAEMIS 0x00000004 // CaptureA event masked int status
  632. #define TIMER_RIS_CAMMIS 0x00000002 // CaptureA match masked int status
  633. #define TIMER_RIS_TATOMIS 0x00000001 // TimerA time out masked int stat
  634. //*****************************************************************************
  635. //
  636. // The following are deprecated defines for the bit fields in the TIMER_O_TAILR
  637. // register.
  638. //
  639. //*****************************************************************************
  640. #define TIMER_TAILR_TAILRH 0xFFFF0000 // TimerB load val in 32 bit mode
  641. #define TIMER_TAILR_TAILRL 0x0000FFFF // TimerA interval load value
  642. //*****************************************************************************
  643. //
  644. // The following are deprecated defines for the bit fields in the TIMER_O_TBILR
  645. // register.
  646. //
  647. //*****************************************************************************
  648. #define TIMER_TBILR_TBILRL 0x0000FFFF // TimerB interval load value
  649. //*****************************************************************************
  650. //
  651. // The following are deprecated defines for the bit fields in the
  652. // TIMER_O_TAMATCHR register.
  653. //
  654. //*****************************************************************************
  655. #define TIMER_TAMATCHR_TAMRH 0xFFFF0000 // TimerB match val in 32 bit mode
  656. #define TIMER_TAMATCHR_TAMRL 0x0000FFFF // TimerA match value
  657. //*****************************************************************************
  658. //
  659. // The following are deprecated defines for the bit fields in the
  660. // TIMER_O_TBMATCHR register.
  661. //
  662. //*****************************************************************************
  663. #define TIMER_TBMATCHR_TBMRL 0x0000FFFF // TimerB match load value
  664. //*****************************************************************************
  665. //
  666. // The following are deprecated defines for the bit fields in the TIMER_O_TAR
  667. // register.
  668. //
  669. //*****************************************************************************
  670. #define TIMER_TAR_TARH 0xFFFF0000 // TimerB val in 32 bit mode
  671. #define TIMER_TAR_TARL 0x0000FFFF // TimerA value
  672. //*****************************************************************************
  673. //
  674. // The following are deprecated defines for the bit fields in the TIMER_O_TBR
  675. // register.
  676. //
  677. //*****************************************************************************
  678. #define TIMER_TBR_TBRL 0x0000FFFF // TimerB value
  679. //*****************************************************************************
  680. //
  681. // The following are deprecated defines for the reset values of the timer
  682. // registers.
  683. //
  684. //*****************************************************************************
  685. #define TIMER_RV_TAILR 0xFFFFFFFF // TimerA interval load reg RV
  686. #define TIMER_RV_TAR 0xFFFFFFFF // TimerA register RV
  687. #define TIMER_RV_TAMATCHR 0xFFFFFFFF // TimerA match register RV
  688. #define TIMER_RV_TBILR 0x0000FFFF // TimerB interval load reg RV
  689. #define TIMER_RV_TBMATCHR 0x0000FFFF // TimerB match register RV
  690. #define TIMER_RV_TBR 0x0000FFFF // TimerB register RV
  691. #define TIMER_RV_TAPR 0x00000000 // TimerA prescale register RV
  692. #define TIMER_RV_CFG 0x00000000 // Configuration register RV
  693. #define TIMER_RV_TBPMR 0x00000000 // TimerB prescale match regi RV
  694. #define TIMER_RV_TAPMR 0x00000000 // TimerA prescale match reg RV
  695. #define TIMER_RV_CTL 0x00000000 // Control register RV
  696. #define TIMER_RV_ICR 0x00000000 // Interrupt clear register RV
  697. #define TIMER_RV_TBMR 0x00000000 // TimerB mode register RV
  698. #define TIMER_RV_MIS 0x00000000 // Masked interrupt status reg RV
  699. #define TIMER_RV_RIS 0x00000000 // Interrupt status register RV
  700. #define TIMER_RV_TBPR 0x00000000 // TimerB prescale register RV
  701. #define TIMER_RV_IMR 0x00000000 // Interrupt mask register RV
  702. #define TIMER_RV_TAMR 0x00000000 // TimerA mode register RV
  703. //*****************************************************************************
  704. //
  705. // The following are deprecated defines for the bit fields in the TIMER_TnMR
  706. // register.
  707. //
  708. //*****************************************************************************
  709. #define TIMER_TNMR_TNAMS 0x00000008 // Alternate mode select
  710. #define TIMER_TNMR_TNCMR 0x00000004 // Capture mode - count or time
  711. #define TIMER_TNMR_TNTMR_MSK 0x00000003 // Timer mode mask
  712. #define TIMER_TNMR_TNTMR_1_SHOT 0x00000001 // Mode - one shot
  713. #define TIMER_TNMR_TNTMR_PERIOD 0x00000002 // Mode - periodic
  714. #define TIMER_TNMR_TNTMR_CAP 0x00000003 // Mode - capture
  715. //*****************************************************************************
  716. //
  717. // The following are deprecated defines for the bit fields in the TIMER_TnPR
  718. // register.
  719. //
  720. //*****************************************************************************
  721. #define TIMER_TNPR_TNPSR 0x000000FF // TimerN prescale value
  722. //*****************************************************************************
  723. //
  724. // The following are deprecated defines for the bit fields in the TIMER_TnPMR
  725. // register.
  726. //
  727. //*****************************************************************************
  728. #define TIMER_TNPMR_TNPSMR 0x000000FF // TimerN prescale match value
  729. #endif
  730. #endif // __HW_TIMER_H__