hw_timer.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. //*****************************************************************************
  2. //
  3. // hw_timer.h - Defines and macros used when accessing the timer.
  4. //
  5. // Copyright (c) 2005-2010 Texas Instruments Incorporated. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Texas Instruments (TI) is supplying this software for use solely and
  9. // exclusively on TI's microcontroller products. The software is owned by
  10. // TI and/or its suppliers, and is protected under applicable copyright
  11. // laws. You may not combine this software with "viral" open-source
  12. // software in order to form a larger program.
  13. //
  14. // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
  15. // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
  16. // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  17. // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
  18. // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
  19. // DAMAGES, FOR ANY REASON WHATSOEVER.
  20. //
  21. // This is part of revision 6459 of the Stellaris Firmware Development Package.
  22. //
  23. //*****************************************************************************
  24. #ifndef __HW_TIMER_H__
  25. #define __HW_TIMER_H__
  26. //*****************************************************************************
  27. //
  28. // The following are defines for the Timer register offsets.
  29. //
  30. //*****************************************************************************
  31. #define TIMER_O_CFG 0x00000000 // GPTM Configuration
  32. #define TIMER_O_TAMR 0x00000004 // GPTM Timer A Mode
  33. #define TIMER_O_TBMR 0x00000008 // GPTM Timer B Mode
  34. #define TIMER_O_CTL 0x0000000C // GPTM Control
  35. #define TIMER_O_IMR 0x00000018 // GPTM Interrupt Mask
  36. #define TIMER_O_RIS 0x0000001C // GPTM Raw Interrupt Status
  37. #define TIMER_O_MIS 0x00000020 // GPTM Masked Interrupt Status
  38. #define TIMER_O_ICR 0x00000024 // GPTM Interrupt Clear
  39. #define TIMER_O_TAILR 0x00000028 // GPTM Timer A Interval Load
  40. #define TIMER_O_TBILR 0x0000002C // GPTM Timer B Interval Load
  41. #define TIMER_O_TAMATCHR 0x00000030 // GPTM Timer A Match
  42. #define TIMER_O_TBMATCHR 0x00000034 // GPTM Timer B Match
  43. #define TIMER_O_TAPR 0x00000038 // GPTM Timer A Prescale
  44. #define TIMER_O_TBPR 0x0000003C // GPTM Timer B Prescale
  45. #define TIMER_O_TAPMR 0x00000040 // GPTM TimerA Prescale Match
  46. #define TIMER_O_TBPMR 0x00000044 // GPTM TimerB Prescale Match
  47. #define TIMER_O_TAR 0x00000048 // GPTM Timer A
  48. #define TIMER_O_TBR 0x0000004C // GPTM Timer B
  49. #define TIMER_O_TAV 0x00000050 // GPTM Timer A Value
  50. #define TIMER_O_TBV 0x00000054 // GPTM Timer B Value
  51. //*****************************************************************************
  52. //
  53. // The following are defines for the bit fields in the TIMER_O_CFG register.
  54. //
  55. //*****************************************************************************
  56. #define TIMER_CFG_M 0x00000007 // GPTM Configuration
  57. #define TIMER_CFG_32_BIT_TIMER 0x00000000 // 32-bit timer configuration
  58. #define TIMER_CFG_32_BIT_RTC 0x00000001 // 32-bit real-time clock (RTC)
  59. // counter configuration
  60. #define TIMER_CFG_16_BIT 0x00000004 // 16-bit timer configuration. The
  61. // function is controlled by bits
  62. // 1:0 of GPTMTAMR and GPTMTBMR
  63. //*****************************************************************************
  64. //
  65. // The following are defines for the bit fields in the TIMER_O_TAMR register.
  66. //
  67. //*****************************************************************************
  68. #define TIMER_TAMR_TASNAPS 0x00000080 // GPTM Timer A Snap-Shot Mode
  69. #define TIMER_TAMR_TAWOT 0x00000040 // GPTM Timer A Wait-on-Trigger
  70. #define TIMER_TAMR_TAMIE 0x00000020 // GPTM Timer A Match Interrupt
  71. // Enable
  72. #define TIMER_TAMR_TACDIR 0x00000010 // GPTM Timer A Count Direction
  73. #define TIMER_TAMR_TAAMS 0x00000008 // GPTM Timer A Alternate Mode
  74. // Select
  75. #define TIMER_TAMR_TACMR 0x00000004 // GPTM Timer A Capture Mode
  76. #define TIMER_TAMR_TAMR_M 0x00000003 // GPTM Timer A Mode
  77. #define TIMER_TAMR_TAMR_1_SHOT 0x00000001 // One-Shot Timer mode
  78. #define TIMER_TAMR_TAMR_PERIOD 0x00000002 // Periodic Timer mode
  79. #define TIMER_TAMR_TAMR_CAP 0x00000003 // Capture mode
  80. //*****************************************************************************
  81. //
  82. // The following are defines for the bit fields in the TIMER_O_TBMR register.
  83. //
  84. //*****************************************************************************
  85. #define TIMER_TBMR_TBSNAPS 0x00000080 // GPTM Timer B Snap-Shot Mode
  86. #define TIMER_TBMR_TBWOT 0x00000040 // GPTM Timer B Wait-on-Trigger
  87. #define TIMER_TBMR_TBMIE 0x00000020 // GPTM Timer B Match Interrupt
  88. // Enable
  89. #define TIMER_TBMR_TBCDIR 0x00000010 // GPTM Timer B Count Direction
  90. #define TIMER_TBMR_TBAMS 0x00000008 // GPTM Timer B Alternate Mode
  91. // Select
  92. #define TIMER_TBMR_TBCMR 0x00000004 // GPTM Timer B Capture Mode
  93. #define TIMER_TBMR_TBMR_M 0x00000003 // GPTM Timer B Mode
  94. #define TIMER_TBMR_TBMR_1_SHOT 0x00000001 // One-Shot Timer mode
  95. #define TIMER_TBMR_TBMR_PERIOD 0x00000002 // Periodic Timer mode
  96. #define TIMER_TBMR_TBMR_CAP 0x00000003 // Capture mode
  97. //*****************************************************************************
  98. //
  99. // The following are defines for the bit fields in the TIMER_O_CTL register.
  100. //
  101. //*****************************************************************************
  102. #define TIMER_CTL_TBPWML 0x00004000 // GPTM Timer B PWM Output Level
  103. #define TIMER_CTL_TBOTE 0x00002000 // GPTM Timer B Output Trigger
  104. // Enable
  105. #define TIMER_CTL_TBEVENT_M 0x00000C00 // GPTM Timer B Event Mode
  106. #define TIMER_CTL_TBEVENT_POS 0x00000000 // Positive edge
  107. #define TIMER_CTL_TBEVENT_NEG 0x00000400 // Negative edge
  108. #define TIMER_CTL_TBEVENT_BOTH 0x00000C00 // Both edges
  109. #define TIMER_CTL_TBSTALL 0x00000200 // GPTM Timer B Stall Enable
  110. #define TIMER_CTL_TBEN 0x00000100 // GPTM Timer B Enable
  111. #define TIMER_CTL_TAPWML 0x00000040 // GPTM Timer A PWM Output Level
  112. #define TIMER_CTL_TAOTE 0x00000020 // GPTM Timer A Output Trigger
  113. // Enable
  114. #define TIMER_CTL_RTCEN 0x00000010 // GPTM RTC Enable
  115. #define TIMER_CTL_TAEVENT_M 0x0000000C // GPTM Timer A Event Mode
  116. #define TIMER_CTL_TAEVENT_POS 0x00000000 // Positive edge
  117. #define TIMER_CTL_TAEVENT_NEG 0x00000004 // Negative edge
  118. #define TIMER_CTL_TAEVENT_BOTH 0x0000000C // Both edges
  119. #define TIMER_CTL_TASTALL 0x00000002 // GPTM Timer A Stall Enable
  120. #define TIMER_CTL_TAEN 0x00000001 // GPTM Timer A Enable
  121. //*****************************************************************************
  122. //
  123. // The following are defines for the bit fields in the TIMER_O_IMR register.
  124. //
  125. //*****************************************************************************
  126. #define TIMER_IMR_TBMIM 0x00000800 // GPTM Timer B Mode Match
  127. // Interrupt Mask
  128. #define TIMER_IMR_CBEIM 0x00000400 // GPTM Capture B Event Interrupt
  129. // Mask
  130. #define TIMER_IMR_CBMIM 0x00000200 // GPTM Capture B Match Interrupt
  131. // Mask
  132. #define TIMER_IMR_TBTOIM 0x00000100 // GPTM Timer B Time-Out Interrupt
  133. // Mask
  134. #define TIMER_IMR_TAMIM 0x00000010 // GPTM Timer A Mode Match
  135. // Interrupt Mask
  136. #define TIMER_IMR_RTCIM 0x00000008 // GPTM RTC Interrupt Mask
  137. #define TIMER_IMR_CAEIM 0x00000004 // GPTM Capture A Event Interrupt
  138. // Mask
  139. #define TIMER_IMR_CAMIM 0x00000002 // GPTM Capture A Match Interrupt
  140. // Mask
  141. #define TIMER_IMR_TATOIM 0x00000001 // GPTM Timer A Time-Out Interrupt
  142. // Mask
  143. //*****************************************************************************
  144. //
  145. // The following are defines for the bit fields in the TIMER_O_RIS register.
  146. //
  147. //*****************************************************************************
  148. #define TIMER_RIS_TBMRIS 0x00000800 // GPTM Timer B Mode Match Raw
  149. // Interrupt
  150. #define TIMER_RIS_CBERIS 0x00000400 // GPTM Capture B Event Raw
  151. // Interrupt
  152. #define TIMER_RIS_CBMRIS 0x00000200 // GPTM Capture B Match Raw
  153. // Interrupt
  154. #define TIMER_RIS_TBTORIS 0x00000100 // GPTM Timer B Time-Out Raw
  155. // Interrupt
  156. #define TIMER_RIS_TAMRIS 0x00000010 // GPTM Timer A Mode Match Raw
  157. // Interrupt
  158. #define TIMER_RIS_RTCRIS 0x00000008 // GPTM RTC Raw Interrupt
  159. #define TIMER_RIS_CAERIS 0x00000004 // GPTM Capture A Event Raw
  160. // Interrupt
  161. #define TIMER_RIS_CAMRIS 0x00000002 // GPTM Capture A Match Raw
  162. // Interrupt
  163. #define TIMER_RIS_TATORIS 0x00000001 // GPTM Timer A Time-Out Raw
  164. // Interrupt
  165. //*****************************************************************************
  166. //
  167. // The following are defines for the bit fields in the TIMER_O_MIS register.
  168. //
  169. //*****************************************************************************
  170. #define TIMER_MIS_TBMMIS 0x00000800 // GPTM Timer B Mode Match Masked
  171. // Interrupt
  172. #define TIMER_MIS_CBEMIS 0x00000400 // GPTM Capture B Event Masked
  173. // Interrupt
  174. #define TIMER_MIS_CBMMIS 0x00000200 // GPTM Capture B Match Masked
  175. // Interrupt
  176. #define TIMER_MIS_TBTOMIS 0x00000100 // GPTM Timer B Time-Out Masked
  177. // Interrupt
  178. #define TIMER_MIS_TAMMIS 0x00000010 // GPTM Timer A Mode Match Masked
  179. // Interrupt
  180. #define TIMER_MIS_RTCMIS 0x00000008 // GPTM RTC Masked Interrupt
  181. #define TIMER_MIS_CAEMIS 0x00000004 // GPTM Capture A Event Masked
  182. // Interrupt
  183. #define TIMER_MIS_CAMMIS 0x00000002 // GPTM Capture A Match Masked
  184. // Interrupt
  185. #define TIMER_MIS_TATOMIS 0x00000001 // GPTM Timer A Time-Out Masked
  186. // Interrupt
  187. //*****************************************************************************
  188. //
  189. // The following are defines for the bit fields in the TIMER_O_ICR register.
  190. //
  191. //*****************************************************************************
  192. #define TIMER_ICR_TBMCINT 0x00000800 // GPTM Timer B Mode Match
  193. // Interrupt Clear
  194. #define TIMER_ICR_CBECINT 0x00000400 // GPTM Capture B Event Interrupt
  195. // Clear
  196. #define TIMER_ICR_CBMCINT 0x00000200 // GPTM Capture B Match Interrupt
  197. // Clear
  198. #define TIMER_ICR_TBTOCINT 0x00000100 // GPTM Timer B Time-Out Interrupt
  199. // Clear
  200. #define TIMER_ICR_TAMCINT 0x00000010 // GPTM Timer A Mode Match
  201. // Interrupt Clear
  202. #define TIMER_ICR_RTCCINT 0x00000008 // GPTM RTC Interrupt Clear
  203. #define TIMER_ICR_CAECINT 0x00000004 // GPTM Capture A Event Interrupt
  204. // Clear
  205. #define TIMER_ICR_CAMCINT 0x00000002 // GPTM Capture A Match Interrupt
  206. // Clear
  207. #define TIMER_ICR_TATOCINT 0x00000001 // GPTM Timer A Time-Out Raw
  208. // Interrupt
  209. //*****************************************************************************
  210. //
  211. // The following are defines for the bit fields in the TIMER_O_TAILR register.
  212. //
  213. //*****************************************************************************
  214. #define TIMER_TAILR_TAILRH_M 0xFFFF0000 // GPTM Timer A Interval Load
  215. // Register High
  216. #define TIMER_TAILR_TAILRL_M 0x0000FFFF // GPTM Timer A Interval Load
  217. // Register Low
  218. #define TIMER_TAILR_TAILRH_S 16
  219. #define TIMER_TAILR_TAILRL_S 0
  220. //*****************************************************************************
  221. //
  222. // The following are defines for the bit fields in the TIMER_O_TBILR register.
  223. //
  224. //*****************************************************************************
  225. #define TIMER_TBILR_TBILRL_M 0x0000FFFF // GPTM Timer B Interval Load
  226. // Register
  227. #define TIMER_TBILR_TBILRL_S 0
  228. //*****************************************************************************
  229. //
  230. // The following are defines for the bit fields in the TIMER_O_TAMATCHR
  231. // register.
  232. //
  233. //*****************************************************************************
  234. #define TIMER_TAMATCHR_TAMRH_M 0xFFFF0000 // GPTM Timer A Match Register High
  235. #define TIMER_TAMATCHR_TAMRL_M 0x0000FFFF // GPTM Timer A Match Register Low
  236. #define TIMER_TAMATCHR_TAMRH_S 16
  237. #define TIMER_TAMATCHR_TAMRL_S 0
  238. //*****************************************************************************
  239. //
  240. // The following are defines for the bit fields in the TIMER_O_TBMATCHR
  241. // register.
  242. //
  243. //*****************************************************************************
  244. #define TIMER_TBMATCHR_TBMRL_M 0x0000FFFF // GPTM Timer B Match Register Low
  245. #define TIMER_TBMATCHR_TBMRL_S 0
  246. //*****************************************************************************
  247. //
  248. // The following are defines for the bit fields in the TIMER_O_TAPR register.
  249. //
  250. //*****************************************************************************
  251. #define TIMER_TAPR_TAPSR_M 0x000000FF // GPTM Timer A Prescale
  252. #define TIMER_TAPR_TAPSR_S 0
  253. //*****************************************************************************
  254. //
  255. // The following are defines for the bit fields in the TIMER_O_TBPR register.
  256. //
  257. //*****************************************************************************
  258. #define TIMER_TBPR_TBPSR_M 0x000000FF // GPTM Timer B Prescale
  259. #define TIMER_TBPR_TBPSR_S 0
  260. //*****************************************************************************
  261. //
  262. // The following are defines for the bit fields in the TIMER_O_TAPMR register.
  263. //
  264. //*****************************************************************************
  265. #define TIMER_TAPMR_TAPSMR_M 0x000000FF // GPTM TimerA Prescale Match
  266. #define TIMER_TAPMR_TAPSMR_S 0
  267. //*****************************************************************************
  268. //
  269. // The following are defines for the bit fields in the TIMER_O_TBPMR register.
  270. //
  271. //*****************************************************************************
  272. #define TIMER_TBPMR_TBPSMR_M 0x000000FF // GPTM TimerB Prescale Match
  273. #define TIMER_TBPMR_TBPSMR_S 0
  274. //*****************************************************************************
  275. //
  276. // The following are defines for the bit fields in the TIMER_O_TAR register.
  277. //
  278. //*****************************************************************************
  279. #define TIMER_TAR_TARH_M 0xFFFF0000 // GPTM Timer A Register High
  280. #define TIMER_TAR_TARL_M 0x0000FFFF // GPTM Timer A Register Low
  281. #define TIMER_TAR_TARH_S 16
  282. #define TIMER_TAR_TARL_S 0
  283. //*****************************************************************************
  284. //
  285. // The following are defines for the bit fields in the TIMER_O_TBR register.
  286. //
  287. //*****************************************************************************
  288. #define TIMER_TBR_TBRL_M 0x00FFFFFF // GPTM Timer B
  289. #define TIMER_TBR_TBRL_S 0
  290. //*****************************************************************************
  291. //
  292. // The following are defines for the bit fields in the TIMER_O_TAV register.
  293. //
  294. //*****************************************************************************
  295. #define TIMER_TAV_TAVH_M 0xFFFF0000 // GPTM Timer A Value High
  296. #define TIMER_TAV_TAVL_M 0x0000FFFF // GPTM Timer A Register Low
  297. #define TIMER_TAV_TAVH_S 16
  298. #define TIMER_TAV_TAVL_S 0
  299. //*****************************************************************************
  300. //
  301. // The following are defines for the bit fields in the TIMER_O_TBV register.
  302. //
  303. //*****************************************************************************
  304. #define TIMER_TBV_TBVL_M 0x0000FFFF // GPTM Timer B Register
  305. #define TIMER_TBV_TBVL_S 0
  306. //*****************************************************************************
  307. //
  308. // The following definitions are deprecated.
  309. //
  310. //*****************************************************************************
  311. #ifndef DEPRECATED
  312. //*****************************************************************************
  313. //
  314. // The following are deprecated defines for the bit fields in the TIMER_O_CFG
  315. // register.
  316. //
  317. //*****************************************************************************
  318. #define TIMER_CFG_CFG_MSK 0x00000007 // Configuration options mask
  319. //*****************************************************************************
  320. //
  321. // The following are deprecated defines for the bit fields in the TIMER_O_CTL
  322. // register.
  323. //
  324. //*****************************************************************************
  325. #define TIMER_CTL_TBEVENT_MSK 0x00000C00 // TimerB event mode mask
  326. #define TIMER_CTL_TAEVENT_MSK 0x0000000C // TimerA event mode mask
  327. //*****************************************************************************
  328. //
  329. // The following are deprecated defines for the bit fields in the TIMER_O_RIS
  330. // register.
  331. //
  332. //*****************************************************************************
  333. #define TIMER_RIS_CBEMIS 0x00000400 // CaptureB event masked int status
  334. #define TIMER_RIS_CBMMIS 0x00000200 // CaptureB match masked int status
  335. #define TIMER_RIS_TBTOMIS 0x00000100 // TimerB time out masked int stat
  336. #define TIMER_RIS_RTCMIS 0x00000008 // RTC masked int status
  337. #define TIMER_RIS_CAEMIS 0x00000004 // CaptureA event masked int status
  338. #define TIMER_RIS_CAMMIS 0x00000002 // CaptureA match masked int status
  339. #define TIMER_RIS_TATOMIS 0x00000001 // TimerA time out masked int stat
  340. //*****************************************************************************
  341. //
  342. // The following are deprecated defines for the bit fields in the TIMER_O_TAILR
  343. // register.
  344. //
  345. //*****************************************************************************
  346. #define TIMER_TAILR_TAILRH 0xFFFF0000 // TimerB load val in 32 bit mode
  347. #define TIMER_TAILR_TAILRL 0x0000FFFF // TimerA interval load value
  348. //*****************************************************************************
  349. //
  350. // The following are deprecated defines for the bit fields in the TIMER_O_TBILR
  351. // register.
  352. //
  353. //*****************************************************************************
  354. #define TIMER_TBILR_TBILRL 0x0000FFFF // TimerB interval load value
  355. //*****************************************************************************
  356. //
  357. // The following are deprecated defines for the bit fields in the
  358. // TIMER_O_TAMATCHR register.
  359. //
  360. //*****************************************************************************
  361. #define TIMER_TAMATCHR_TAMRH 0xFFFF0000 // TimerB match val in 32 bit mode
  362. #define TIMER_TAMATCHR_TAMRL 0x0000FFFF // TimerA match value
  363. //*****************************************************************************
  364. //
  365. // The following are deprecated defines for the bit fields in the
  366. // TIMER_O_TBMATCHR register.
  367. //
  368. //*****************************************************************************
  369. #define TIMER_TBMATCHR_TBMRL 0x0000FFFF // TimerB match load value
  370. //*****************************************************************************
  371. //
  372. // The following are deprecated defines for the bit fields in the TIMER_O_TAR
  373. // register.
  374. //
  375. //*****************************************************************************
  376. #define TIMER_TAR_TARH 0xFFFF0000 // TimerB val in 32 bit mode
  377. #define TIMER_TAR_TARL 0x0000FFFF // TimerA value
  378. //*****************************************************************************
  379. //
  380. // The following are deprecated defines for the bit fields in the TIMER_O_TBR
  381. // register.
  382. //
  383. //*****************************************************************************
  384. #define TIMER_TBR_TBRL 0x0000FFFF // TimerB value
  385. //*****************************************************************************
  386. //
  387. // The following are deprecated defines for the reset values of the timer
  388. // registers.
  389. //
  390. //*****************************************************************************
  391. #define TIMER_RV_TAILR 0xFFFFFFFF // TimerA interval load reg RV
  392. #define TIMER_RV_TAR 0xFFFFFFFF // TimerA register RV
  393. #define TIMER_RV_TAMATCHR 0xFFFFFFFF // TimerA match register RV
  394. #define TIMER_RV_TBILR 0x0000FFFF // TimerB interval load reg RV
  395. #define TIMER_RV_TBMATCHR 0x0000FFFF // TimerB match register RV
  396. #define TIMER_RV_TBR 0x0000FFFF // TimerB register RV
  397. #define TIMER_RV_TAPR 0x00000000 // TimerA prescale register RV
  398. #define TIMER_RV_CFG 0x00000000 // Configuration register RV
  399. #define TIMER_RV_TBPMR 0x00000000 // TimerB prescale match regi RV
  400. #define TIMER_RV_TAPMR 0x00000000 // TimerA prescale match reg RV
  401. #define TIMER_RV_CTL 0x00000000 // Control register RV
  402. #define TIMER_RV_ICR 0x00000000 // Interrupt clear register RV
  403. #define TIMER_RV_TBMR 0x00000000 // TimerB mode register RV
  404. #define TIMER_RV_MIS 0x00000000 // Masked interrupt status reg RV
  405. #define TIMER_RV_RIS 0x00000000 // Interrupt status register RV
  406. #define TIMER_RV_TBPR 0x00000000 // TimerB prescale register RV
  407. #define TIMER_RV_IMR 0x00000000 // Interrupt mask register RV
  408. #define TIMER_RV_TAMR 0x00000000 // TimerA mode register RV
  409. //*****************************************************************************
  410. //
  411. // The following are deprecated defines for the bit fields in the TIMER_TnMR
  412. // register.
  413. //
  414. //*****************************************************************************
  415. #define TIMER_TNMR_TNAMS 0x00000008 // Alternate mode select
  416. #define TIMER_TNMR_TNCMR 0x00000004 // Capture mode - count or time
  417. #define TIMER_TNMR_TNTMR_MSK 0x00000003 // Timer mode mask
  418. #define TIMER_TNMR_TNTMR_1_SHOT 0x00000001 // Mode - one shot
  419. #define TIMER_TNMR_TNTMR_PERIOD 0x00000002 // Mode - periodic
  420. #define TIMER_TNMR_TNTMR_CAP 0x00000003 // Mode - capture
  421. //*****************************************************************************
  422. //
  423. // The following are deprecated defines for the bit fields in the TIMER_TnPR
  424. // register.
  425. //
  426. //*****************************************************************************
  427. #define TIMER_TNPR_TNPSR 0x000000FF // TimerN prescale value
  428. //*****************************************************************************
  429. //
  430. // The following are deprecated defines for the bit fields in the TIMER_TnPMR
  431. // register.
  432. //
  433. //*****************************************************************************
  434. #define TIMER_TNPMR_TNPSMR 0x000000FF // TimerN prescale match value
  435. #endif
  436. #endif // __HW_TIMER_H__