EE445M RTOS
Taken at the University of Texas Spring 2015
hw_timer.h
Go to the documentation of this file.
1 //*****************************************************************************
2 //
3 // hw_timer.h - Defines and macros used when accessing the timer.
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 
40 #ifndef __HW_TIMER_H__
41 #define __HW_TIMER_H__
42 
43 //*****************************************************************************
44 //
45 // The following are defines for the Timer register offsets.
46 //
47 //*****************************************************************************
48 #define TIMER_O_CFG 0x00000000 // GPTM Configuration
49 #define TIMER_O_TAMR 0x00000004 // GPTM Timer A Mode
50 #define TIMER_O_TBMR 0x00000008 // GPTM Timer B Mode
51 #define TIMER_O_CTL 0x0000000C // GPTM Control
52 #define TIMER_O_SYNC 0x00000010 // GPTM Synchronize
53 #define TIMER_O_IMR 0x00000018 // GPTM Interrupt Mask
54 #define TIMER_O_RIS 0x0000001C // GPTM Raw Interrupt Status
55 #define TIMER_O_MIS 0x00000020 // GPTM Masked Interrupt Status
56 #define TIMER_O_ICR 0x00000024 // GPTM Interrupt Clear
57 #define TIMER_O_TAILR 0x00000028 // GPTM Timer A Interval Load
58 #define TIMER_O_TBILR 0x0000002C // GPTM Timer B Interval Load
59 #define TIMER_O_TAMATCHR 0x00000030 // GPTM Timer A Match
60 #define TIMER_O_TBMATCHR 0x00000034 // GPTM Timer B Match
61 #define TIMER_O_TAPR 0x00000038 // GPTM Timer A Prescale
62 #define TIMER_O_TBPR 0x0000003C // GPTM Timer B Prescale
63 #define TIMER_O_TAPMR 0x00000040 // GPTM TimerA Prescale Match
64 #define TIMER_O_TBPMR 0x00000044 // GPTM TimerB Prescale Match
65 #define TIMER_O_TAR 0x00000048 // GPTM Timer A
66 #define TIMER_O_TBR 0x0000004C // GPTM Timer B
67 #define TIMER_O_TAV 0x00000050 // GPTM Timer A Value
68 #define TIMER_O_TBV 0x00000054 // GPTM Timer B Value
69 #define TIMER_O_RTCPD 0x00000058 // GPTM RTC Predivide
70 #define TIMER_O_TAPS 0x0000005C // GPTM Timer A Prescale Snapshot
71 #define TIMER_O_TBPS 0x00000060 // GPTM Timer B Prescale Snapshot
72 #define TIMER_O_TAPV 0x00000064 // GPTM Timer A Prescale Value
73 #define TIMER_O_TBPV 0x00000068 // GPTM Timer B Prescale Value
74 #define TIMER_O_DMAEV 0x0000006C // GPTM DMA Event
75 #define TIMER_O_ADCEV 0x00000070 // GPTM ADC Event
76 #define TIMER_O_PP 0x00000FC0 // GPTM Peripheral Properties
77 #define TIMER_O_CC 0x00000FC8 // GPTM Clock Configuration
78 
79 //*****************************************************************************
80 //
81 // The following are defines for the bit fields in the TIMER_O_CFG register.
82 //
83 //*****************************************************************************
84 #define TIMER_CFG_M 0x00000007 // GPTM Configuration
85 #define TIMER_CFG_32_BIT_TIMER 0x00000000 // For a 16/32-bit timer, this
86  // value selects the 32-bit timer
87  // configuration
88 #define TIMER_CFG_32_BIT_RTC 0x00000001 // For a 16/32-bit timer, this
89  // value selects the 32-bit
90  // real-time clock (RTC) counter
91  // configuration
92 #define TIMER_CFG_16_BIT 0x00000004 // For a 16/32-bit timer, this
93  // value selects the 16-bit timer
94  // configuration
95 
96 //*****************************************************************************
97 //
98 // The following are defines for the bit fields in the TIMER_O_TAMR register.
99 //
100 //*****************************************************************************
101 #define TIMER_TAMR_TCACT_M 0x0000E000 // Timer Compare Action Select
102 #define TIMER_TAMR_TCACT_NONE 0x00000000 // Disable compare operations
103 #define TIMER_TAMR_TCACT_TOGGLE 0x00002000 // Toggle State on Time-Out
104 #define TIMER_TAMR_TCACT_CLRTO 0x00004000 // Clear CCP on Time-Out
105 #define TIMER_TAMR_TCACT_SETTO 0x00006000 // Set CCP on Time-Out
106 #define TIMER_TAMR_TCACT_SETTOGTO \
107  0x00008000 // Set CCP immediately and toggle
108  // on Time-Out
109 #define TIMER_TAMR_TCACT_CLRTOGTO \
110  0x0000A000 // Clear CCP immediately and toggle
111  // on Time-Out
112 #define TIMER_TAMR_TCACT_SETCLRTO \
113  0x0000C000 // Set CCP immediately and clear on
114  // Time-Out
115 #define TIMER_TAMR_TCACT_CLRSETTO \
116  0x0000E000 // Clear CCP immediately and set on
117  // Time-Out
118 #define TIMER_TAMR_TACINTD 0x00001000 // One-shot/Periodic Interrupt
119  // Disable
120 #define TIMER_TAMR_TAPLO 0x00000800 // GPTM Timer A PWM Legacy
121  // Operation
122 #define TIMER_TAMR_TAMRSU 0x00000400 // GPTM Timer A Match Register
123  // Update
124 #define TIMER_TAMR_TAPWMIE 0x00000200 // GPTM Timer A PWM Interrupt
125  // Enable
126 #define TIMER_TAMR_TAILD 0x00000100 // GPTM Timer A Interval Load Write
127 #define TIMER_TAMR_TASNAPS 0x00000080 // GPTM Timer A Snap-Shot Mode
128 #define TIMER_TAMR_TAWOT 0x00000040 // GPTM Timer A Wait-on-Trigger
129 #define TIMER_TAMR_TAMIE 0x00000020 // GPTM Timer A Match Interrupt
130  // Enable
131 #define TIMER_TAMR_TACDIR 0x00000010 // GPTM Timer A Count Direction
132 #define TIMER_TAMR_TAAMS 0x00000008 // GPTM Timer A Alternate Mode
133  // Select
134 #define TIMER_TAMR_TACMR 0x00000004 // GPTM Timer A Capture Mode
135 #define TIMER_TAMR_TAMR_M 0x00000003 // GPTM Timer A Mode
136 #define TIMER_TAMR_TAMR_1_SHOT 0x00000001 // One-Shot Timer mode
137 #define TIMER_TAMR_TAMR_PERIOD 0x00000002 // Periodic Timer mode
138 #define TIMER_TAMR_TAMR_CAP 0x00000003 // Capture mode
139 
140 //*****************************************************************************
141 //
142 // The following are defines for the bit fields in the TIMER_O_TBMR register.
143 //
144 //*****************************************************************************
145 #define TIMER_TBMR_TCACT_M 0x0000E000 // Timer Compare Action Select
146 #define TIMER_TBMR_TCACT_NONE 0x00000000 // Disable compare operations
147 #define TIMER_TBMR_TCACT_TOGGLE 0x00002000 // Toggle State on Time-Out
148 #define TIMER_TBMR_TCACT_CLRTO 0x00004000 // Clear CCP on Time-Out
149 #define TIMER_TBMR_TCACT_SETTO 0x00006000 // Set CCP on Time-Out
150 #define TIMER_TBMR_TCACT_SETTOGTO \
151  0x00008000 // Set CCP immediately and toggle
152  // on Time-Out
153 #define TIMER_TBMR_TCACT_CLRTOGTO \
154  0x0000A000 // Clear CCP immediately and toggle
155  // on Time-Out
156 #define TIMER_TBMR_TCACT_SETCLRTO \
157  0x0000C000 // Set CCP immediately and clear on
158  // Time-Out
159 #define TIMER_TBMR_TCACT_CLRSETTO \
160  0x0000E000 // Clear CCP immediately and set on
161  // Time-Out
162 #define TIMER_TBMR_TBCINTD 0x00001000 // One-Shot/Periodic Interrupt
163  // Disable
164 #define TIMER_TBMR_TBPLO 0x00000800 // GPTM Timer B PWM Legacy
165  // Operation
166 #define TIMER_TBMR_TBMRSU 0x00000400 // GPTM Timer B Match Register
167  // Update
168 #define TIMER_TBMR_TBPWMIE 0x00000200 // GPTM Timer B PWM Interrupt
169  // Enable
170 #define TIMER_TBMR_TBILD 0x00000100 // GPTM Timer B Interval Load Write
171 #define TIMER_TBMR_TBSNAPS 0x00000080 // GPTM Timer B Snap-Shot Mode
172 #define TIMER_TBMR_TBWOT 0x00000040 // GPTM Timer B Wait-on-Trigger
173 #define TIMER_TBMR_TBMIE 0x00000020 // GPTM Timer B Match Interrupt
174  // Enable
175 #define TIMER_TBMR_TBCDIR 0x00000010 // GPTM Timer B Count Direction
176 #define TIMER_TBMR_TBAMS 0x00000008 // GPTM Timer B Alternate Mode
177  // Select
178 #define TIMER_TBMR_TBCMR 0x00000004 // GPTM Timer B Capture Mode
179 #define TIMER_TBMR_TBMR_M 0x00000003 // GPTM Timer B Mode
180 #define TIMER_TBMR_TBMR_1_SHOT 0x00000001 // One-Shot Timer mode
181 #define TIMER_TBMR_TBMR_PERIOD 0x00000002 // Periodic Timer mode
182 #define TIMER_TBMR_TBMR_CAP 0x00000003 // Capture mode
183 
184 //*****************************************************************************
185 //
186 // The following are defines for the bit fields in the TIMER_O_CTL register.
187 //
188 //*****************************************************************************
189 #define TIMER_CTL_TBPWML 0x00004000 // GPTM Timer B PWM Output Level
190 #define TIMER_CTL_TBOTE 0x00002000 // GPTM Timer B Output Trigger
191  // Enable
192 #define TIMER_CTL_TBEVENT_M 0x00000C00 // GPTM Timer B Event Mode
193 #define TIMER_CTL_TBEVENT_POS 0x00000000 // Positive edge
194 #define TIMER_CTL_TBEVENT_NEG 0x00000400 // Negative edge
195 #define TIMER_CTL_TBEVENT_BOTH 0x00000C00 // Both edges
196 #define TIMER_CTL_TBSTALL 0x00000200 // GPTM Timer B Stall Enable
197 #define TIMER_CTL_TBEN 0x00000100 // GPTM Timer B Enable
198 #define TIMER_CTL_TAPWML 0x00000040 // GPTM Timer A PWM Output Level
199 #define TIMER_CTL_TAOTE 0x00000020 // GPTM Timer A Output Trigger
200  // Enable
201 #define TIMER_CTL_RTCEN 0x00000010 // GPTM RTC Stall Enable
202 #define TIMER_CTL_TAEVENT_M 0x0000000C // GPTM Timer A Event Mode
203 #define TIMER_CTL_TAEVENT_POS 0x00000000 // Positive edge
204 #define TIMER_CTL_TAEVENT_NEG 0x00000004 // Negative edge
205 #define TIMER_CTL_TAEVENT_BOTH 0x0000000C // Both edges
206 #define TIMER_CTL_TASTALL 0x00000002 // GPTM Timer A Stall Enable
207 #define TIMER_CTL_TAEN 0x00000001 // GPTM Timer A Enable
208 
209 //*****************************************************************************
210 //
211 // The following are defines for the bit fields in the TIMER_O_SYNC register.
212 //
213 //*****************************************************************************
214 #define TIMER_SYNC_SYNCWT5_M 0x00C00000 // Synchronize GPTM 32/64-Bit Timer
215  // 5
216 #define TIMER_SYNC_SYNCWT5_NONE 0x00000000 // GPTM 32/64-Bit Timer 5 is not
217  // affected
218 #define TIMER_SYNC_SYNCWT5_TA 0x00400000 // A timeout event for Timer A of
219  // GPTM 32/64-Bit Timer 5 is
220  // triggered
221 #define TIMER_SYNC_SYNCWT5_TB 0x00800000 // A timeout event for Timer B of
222  // GPTM 32/64-Bit Timer 5 is
223  // triggered
224 #define TIMER_SYNC_SYNCWT5_TATB 0x00C00000 // A timeout event for both Timer A
225  // and Timer B of GPTM 32/64-Bit
226  // Timer 5 is triggered
227 #define TIMER_SYNC_SYNCWT4_M 0x00300000 // Synchronize GPTM 32/64-Bit Timer
228  // 4
229 #define TIMER_SYNC_SYNCWT4_NONE 0x00000000 // GPTM 32/64-Bit Timer 4 is not
230  // affected
231 #define TIMER_SYNC_SYNCWT4_TA 0x00100000 // A timeout event for Timer A of
232  // GPTM 32/64-Bit Timer 4 is
233  // triggered
234 #define TIMER_SYNC_SYNCWT4_TB 0x00200000 // A timeout event for Timer B of
235  // GPTM 32/64-Bit Timer 4 is
236  // triggered
237 #define TIMER_SYNC_SYNCWT4_TATB 0x00300000 // A timeout event for both Timer A
238  // and Timer B of GPTM 32/64-Bit
239  // Timer 4 is triggered
240 #define TIMER_SYNC_SYNCWT3_M 0x000C0000 // Synchronize GPTM 32/64-Bit Timer
241  // 3
242 #define TIMER_SYNC_SYNCWT3_NONE 0x00000000 // GPTM 32/64-Bit Timer 3 is not
243  // affected
244 #define TIMER_SYNC_SYNCWT3_TA 0x00040000 // A timeout event for Timer A of
245  // GPTM 32/64-Bit Timer 3 is
246  // triggered
247 #define TIMER_SYNC_SYNCWT3_TB 0x00080000 // A timeout event for Timer B of
248  // GPTM 32/64-Bit Timer 3 is
249  // triggered
250 #define TIMER_SYNC_SYNCWT3_TATB 0x000C0000 // A timeout event for both Timer A
251  // and Timer B of GPTM 32/64-Bit
252  // Timer 3 is triggered
253 #define TIMER_SYNC_SYNCWT2_M 0x00030000 // Synchronize GPTM 32/64-Bit Timer
254  // 2
255 #define TIMER_SYNC_SYNCWT2_NONE 0x00000000 // GPTM 32/64-Bit Timer 2 is not
256  // affected
257 #define TIMER_SYNC_SYNCWT2_TA 0x00010000 // A timeout event for Timer A of
258  // GPTM 32/64-Bit Timer 2 is
259  // triggered
260 #define TIMER_SYNC_SYNCWT2_TB 0x00020000 // A timeout event for Timer B of
261  // GPTM 32/64-Bit Timer 2 is
262  // triggered
263 #define TIMER_SYNC_SYNCWT2_TATB 0x00030000 // A timeout event for both Timer A
264  // and Timer B of GPTM 32/64-Bit
265  // Timer 2 is triggered
266 #define TIMER_SYNC_SYNCT7_M 0x0000C000 // Synchronize GPTM Timer 7
267 #define TIMER_SYNC_SYNCT7_NONE 0x00000000 // GPT7 is not affected
268 #define TIMER_SYNC_SYNCT7_TA 0x00004000 // A timeout event for Timer A of
269  // GPTM7 is triggered
270 #define TIMER_SYNC_SYNCT7_TB 0x00008000 // A timeout event for Timer B of
271  // GPTM7 is triggered
272 #define TIMER_SYNC_SYNCT7_TATB 0x0000C000 // A timeout event for both Timer A
273  // and Timer B of GPTM7 is
274  // triggered
275 #define TIMER_SYNC_SYNCWT1_M 0x0000C000 // Synchronize GPTM 32/64-Bit Timer
276  // 1
277 #define TIMER_SYNC_SYNCWT1_NONE 0x00000000 // GPTM 32/64-Bit Timer 1 is not
278  // affected
279 #define TIMER_SYNC_SYNCWT1_TA 0x00004000 // A timeout event for Timer A of
280  // GPTM 32/64-Bit Timer 1 is
281  // triggered
282 #define TIMER_SYNC_SYNCWT1_TB 0x00008000 // A timeout event for Timer B of
283  // GPTM 32/64-Bit Timer 1 is
284  // triggered
285 #define TIMER_SYNC_SYNCWT1_TATB 0x0000C000 // A timeout event for both Timer A
286  // and Timer B of GPTM 32/64-Bit
287  // Timer 1 is triggered
288 #define TIMER_SYNC_SYNCWT0_M 0x00003000 // Synchronize GPTM 32/64-Bit Timer
289  // 0
290 #define TIMER_SYNC_SYNCWT0_NONE 0x00000000 // GPTM 32/64-Bit Timer 0 is not
291  // affected
292 #define TIMER_SYNC_SYNCWT0_TA 0x00001000 // A timeout event for Timer A of
293  // GPTM 32/64-Bit Timer 0 is
294  // triggered
295 #define TIMER_SYNC_SYNCWT0_TB 0x00002000 // A timeout event for Timer B of
296  // GPTM 32/64-Bit Timer 0 is
297  // triggered
298 #define TIMER_SYNC_SYNCWT0_TATB 0x00003000 // A timeout event for both Timer A
299  // and Timer B of GPTM 32/64-Bit
300  // Timer 0 is triggered
301 #define TIMER_SYNC_SYNCT6_M 0x00003000 // Synchronize GPTM Timer 6
302 #define TIMER_SYNC_SYNCT6_NONE 0x00000000 // GPTM6 is not affected
303 #define TIMER_SYNC_SYNCT6_TA 0x00001000 // A timeout event for Timer A of
304  // GPTM6 is triggered
305 #define TIMER_SYNC_SYNCT6_TB 0x00002000 // A timeout event for Timer B of
306  // GPTM6 is triggered
307 #define TIMER_SYNC_SYNCT6_TATB 0x00003000 // A timeout event for both Timer A
308  // and Timer B of GPTM6 is
309  // triggered
310 #define TIMER_SYNC_SYNCT5_M 0x00000C00 // Synchronize GPTM Timer 5
311 #define TIMER_SYNC_SYNCT5_NONE 0x00000000 // GPTM5 is not affected
312 #define TIMER_SYNC_SYNCT5_TA 0x00000400 // A timeout event for Timer A of
313  // GPTM5 is triggered
314 #define TIMER_SYNC_SYNCT5_TB 0x00000800 // A timeout event for Timer B of
315  // GPTM5 is triggered
316 #define TIMER_SYNC_SYNCT5_TATB 0x00000C00 // A timeout event for both Timer A
317  // and Timer B of GPTM5 is
318  // triggered
319 #define TIMER_SYNC_SYNCT4_M 0x00000300 // Synchronize GPTM Timer 4
320 #define TIMER_SYNC_SYNCT4_NONE 0x00000000 // GPTM4 is not affected
321 #define TIMER_SYNC_SYNCT4_TA 0x00000100 // A timeout event for Timer A of
322  // GPTM4 is triggered
323 #define TIMER_SYNC_SYNCT4_TB 0x00000200 // A timeout event for Timer B of
324  // GPTM4 is triggered
325 #define TIMER_SYNC_SYNCT4_TATB 0x00000300 // A timeout event for both Timer A
326  // and Timer B of GPTM4 is
327  // triggered
328 #define TIMER_SYNC_SYNCT3_M 0x000000C0 // Synchronize GPTM Timer 3
329 #define TIMER_SYNC_SYNCT3_NONE 0x00000000 // GPTM3 is not affected
330 #define TIMER_SYNC_SYNCT3_TA 0x00000040 // A timeout event for Timer A of
331  // GPTM3 is triggered
332 #define TIMER_SYNC_SYNCT3_TB 0x00000080 // A timeout event for Timer B of
333  // GPTM3 is triggered
334 #define TIMER_SYNC_SYNCT3_TATB 0x000000C0 // A timeout event for both Timer A
335  // and Timer B of GPTM3 is
336  // triggered
337 #define TIMER_SYNC_SYNCT2_M 0x00000030 // Synchronize GPTM Timer 2
338 #define TIMER_SYNC_SYNCT2_NONE 0x00000000 // GPTM2 is not affected
339 #define TIMER_SYNC_SYNCT2_TA 0x00000010 // A timeout event for Timer A of
340  // GPTM2 is triggered
341 #define TIMER_SYNC_SYNCT2_TB 0x00000020 // A timeout event for Timer B of
342  // GPTM2 is triggered
343 #define TIMER_SYNC_SYNCT2_TATB 0x00000030 // A timeout event for both Timer A
344  // and Timer B of GPTM2 is
345  // triggered
346 #define TIMER_SYNC_SYNCT1_M 0x0000000C // Synchronize GPTM Timer 1
347 #define TIMER_SYNC_SYNCT1_NONE 0x00000000 // GPTM1 is not affected
348 #define TIMER_SYNC_SYNCT1_TA 0x00000004 // A timeout event for Timer A of
349  // GPTM1 is triggered
350 #define TIMER_SYNC_SYNCT1_TB 0x00000008 // A timeout event for Timer B of
351  // GPTM1 is triggered
352 #define TIMER_SYNC_SYNCT1_TATB 0x0000000C // A timeout event for both Timer A
353  // and Timer B of GPTM1 is
354  // triggered
355 #define TIMER_SYNC_SYNCT0_M 0x00000003 // Synchronize GPTM Timer 0
356 #define TIMER_SYNC_SYNCT0_NONE 0x00000000 // GPTM0 is not affected
357 #define TIMER_SYNC_SYNCT0_TA 0x00000001 // A timeout event for Timer A of
358  // GPTM0 is triggered
359 #define TIMER_SYNC_SYNCT0_TB 0x00000002 // A timeout event for Timer B of
360  // GPTM0 is triggered
361 #define TIMER_SYNC_SYNCT0_TATB 0x00000003 // A timeout event for both Timer A
362  // and Timer B of GPTM0 is
363  // triggered
364 
365 //*****************************************************************************
366 //
367 // The following are defines for the bit fields in the TIMER_O_IMR register.
368 //
369 //*****************************************************************************
370 #define TIMER_IMR_WUEIM 0x00010000 // 32/64-Bit Wide GPTM Write Update
371  // Error Interrupt Mask
372 #define TIMER_IMR_DMABIM 0x00002000 // GPTM Timer B DMA Done Interrupt
373  // Mask
374 #define TIMER_IMR_TBMIM 0x00000800 // GPTM Timer B Match Interrupt
375  // Mask
376 #define TIMER_IMR_CBEIM 0x00000400 // GPTM Timer B Capture Mode Event
377  // Interrupt Mask
378 #define TIMER_IMR_CBMIM 0x00000200 // GPTM Timer B Capture Mode Match
379  // Interrupt Mask
380 #define TIMER_IMR_TBTOIM 0x00000100 // GPTM Timer B Time-Out Interrupt
381  // Mask
382 #define TIMER_IMR_DMAAIM 0x00000020 // GPTM Timer A DMA Done Interrupt
383  // Mask
384 #define TIMER_IMR_TAMIM 0x00000010 // GPTM Timer A Match Interrupt
385  // Mask
386 #define TIMER_IMR_RTCIM 0x00000008 // GPTM RTC Interrupt Mask
387 #define TIMER_IMR_CAEIM 0x00000004 // GPTM Timer A Capture Mode Event
388  // Interrupt Mask
389 #define TIMER_IMR_CAMIM 0x00000002 // GPTM Timer A Capture Mode Match
390  // Interrupt Mask
391 #define TIMER_IMR_TATOIM 0x00000001 // GPTM Timer A Time-Out Interrupt
392  // Mask
393 
394 //*****************************************************************************
395 //
396 // The following are defines for the bit fields in the TIMER_O_RIS register.
397 //
398 //*****************************************************************************
399 #define TIMER_RIS_WUERIS 0x00010000 // 32/64-Bit Wide GPTM Write Update
400  // Error Raw Interrupt Status
401 #define TIMER_RIS_DMABRIS 0x00002000 // GPTM Timer B DMA Done Raw
402  // Interrupt Status
403 #define TIMER_RIS_TBMRIS 0x00000800 // GPTM Timer B Match Raw Interrupt
404 #define TIMER_RIS_CBERIS 0x00000400 // GPTM Timer B Capture Mode Event
405  // Raw Interrupt
406 #define TIMER_RIS_CBMRIS 0x00000200 // GPTM Timer B Capture Mode Match
407  // Raw Interrupt
408 #define TIMER_RIS_TBTORIS 0x00000100 // GPTM Timer B Time-Out Raw
409  // Interrupt
410 #define TIMER_RIS_DMAARIS 0x00000020 // GPTM Timer A DMA Done Raw
411  // Interrupt Status
412 #define TIMER_RIS_TAMRIS 0x00000010 // GPTM Timer A Match Raw Interrupt
413 #define TIMER_RIS_RTCRIS 0x00000008 // GPTM RTC Raw Interrupt
414 #define TIMER_RIS_CAERIS 0x00000004 // GPTM Timer A Capture Mode Event
415  // Raw Interrupt
416 #define TIMER_RIS_CAMRIS 0x00000002 // GPTM Timer A Capture Mode Match
417  // Raw Interrupt
418 #define TIMER_RIS_TATORIS 0x00000001 // GPTM Timer A Time-Out Raw
419  // Interrupt
420 
421 //*****************************************************************************
422 //
423 // The following are defines for the bit fields in the TIMER_O_MIS register.
424 //
425 //*****************************************************************************
426 #define TIMER_MIS_WUEMIS 0x00010000 // 32/64-Bit Wide GPTM Write Update
427  // Error Masked Interrupt Status
428 #define TIMER_MIS_DMABMIS 0x00002000 // GPTM Timer B DMA Done Masked
429  // Interrupt
430 #define TIMER_MIS_TBMMIS 0x00000800 // GPTM Timer B Match Masked
431  // Interrupt
432 #define TIMER_MIS_CBEMIS 0x00000400 // GPTM Timer B Capture Mode Event
433  // Masked Interrupt
434 #define TIMER_MIS_CBMMIS 0x00000200 // GPTM Timer B Capture Mode Match
435  // Masked Interrupt
436 #define TIMER_MIS_TBTOMIS 0x00000100 // GPTM Timer B Time-Out Masked
437  // Interrupt
438 #define TIMER_MIS_DMAAMIS 0x00000020 // GPTM Timer A DMA Done Masked
439  // Interrupt
440 #define TIMER_MIS_TAMMIS 0x00000010 // GPTM Timer A Match Masked
441  // Interrupt
442 #define TIMER_MIS_RTCMIS 0x00000008 // GPTM RTC Masked Interrupt
443 #define TIMER_MIS_CAEMIS 0x00000004 // GPTM Timer A Capture Mode Event
444  // Masked Interrupt
445 #define TIMER_MIS_CAMMIS 0x00000002 // GPTM Timer A Capture Mode Match
446  // Masked Interrupt
447 #define TIMER_MIS_TATOMIS 0x00000001 // GPTM Timer A Time-Out Masked
448  // Interrupt
449 
450 //*****************************************************************************
451 //
452 // The following are defines for the bit fields in the TIMER_O_ICR register.
453 //
454 //*****************************************************************************
455 #define TIMER_ICR_WUECINT 0x00010000 // 32/64-Bit Wide GPTM Write Update
456  // Error Interrupt Clear
457 #define TIMER_ICR_DMABINT 0x00002000 // GPTM Timer B DMA Done Interrupt
458  // Clear
459 #define TIMER_ICR_TBMCINT 0x00000800 // GPTM Timer B Match Interrupt
460  // Clear
461 #define TIMER_ICR_CBECINT 0x00000400 // GPTM Timer B Capture Mode Event
462  // Interrupt Clear
463 #define TIMER_ICR_CBMCINT 0x00000200 // GPTM Timer B Capture Mode Match
464  // Interrupt Clear
465 #define TIMER_ICR_TBTOCINT 0x00000100 // GPTM Timer B Time-Out Interrupt
466  // Clear
467 #define TIMER_ICR_DMAAINT 0x00000020 // GPTM Timer A DMA Done Interrupt
468  // Clear
469 #define TIMER_ICR_TAMCINT 0x00000010 // GPTM Timer A Match Interrupt
470  // Clear
471 #define TIMER_ICR_RTCCINT 0x00000008 // GPTM RTC Interrupt Clear
472 #define TIMER_ICR_CAECINT 0x00000004 // GPTM Timer A Capture Mode Event
473  // Interrupt Clear
474 #define TIMER_ICR_CAMCINT 0x00000002 // GPTM Timer A Capture Mode Match
475  // Interrupt Clear
476 #define TIMER_ICR_TATOCINT 0x00000001 // GPTM Timer A Time-Out Raw
477  // Interrupt
478 
479 //*****************************************************************************
480 //
481 // The following are defines for the bit fields in the TIMER_O_TAILR register.
482 //
483 //*****************************************************************************
484 #define TIMER_TAILR_M 0xFFFFFFFF // GPTM Timer A Interval Load
485  // Register
486 #define TIMER_TAILR_S 0
487 
488 //*****************************************************************************
489 //
490 // The following are defines for the bit fields in the TIMER_O_TBILR register.
491 //
492 //*****************************************************************************
493 #define TIMER_TBILR_M 0xFFFFFFFF // GPTM Timer B Interval Load
494  // Register
495 #define TIMER_TBILR_S 0
496 
497 //*****************************************************************************
498 //
499 // The following are defines for the bit fields in the TIMER_O_TAMATCHR
500 // register.
501 //
502 //*****************************************************************************
503 #define TIMER_TAMATCHR_TAMR_M 0xFFFFFFFF // GPTM Timer A Match Register
504 #define TIMER_TAMATCHR_TAMR_S 0
505 
506 //*****************************************************************************
507 //
508 // The following are defines for the bit fields in the TIMER_O_TBMATCHR
509 // register.
510 //
511 //*****************************************************************************
512 #define TIMER_TBMATCHR_TBMR_M 0xFFFFFFFF // GPTM Timer B Match Register
513 #define TIMER_TBMATCHR_TBMR_S 0
514 
515 //*****************************************************************************
516 //
517 // The following are defines for the bit fields in the TIMER_O_TAPR register.
518 //
519 //*****************************************************************************
520 #define TIMER_TAPR_TAPSRH_M 0x0000FF00 // GPTM Timer A Prescale High Byte
521 #define TIMER_TAPR_TAPSR_M 0x000000FF // GPTM Timer A Prescale
522 #define TIMER_TAPR_TAPSRH_S 8
523 #define TIMER_TAPR_TAPSR_S 0
524 
525 //*****************************************************************************
526 //
527 // The following are defines for the bit fields in the TIMER_O_TBPR register.
528 //
529 //*****************************************************************************
530 #define TIMER_TBPR_TBPSRH_M 0x0000FF00 // GPTM Timer B Prescale High Byte
531 #define TIMER_TBPR_TBPSR_M 0x000000FF // GPTM Timer B Prescale
532 #define TIMER_TBPR_TBPSRH_S 8
533 #define TIMER_TBPR_TBPSR_S 0
534 
535 //*****************************************************************************
536 //
537 // The following are defines for the bit fields in the TIMER_O_TAPMR register.
538 //
539 //*****************************************************************************
540 #define TIMER_TAPMR_TAPSMRH_M 0x0000FF00 // GPTM Timer A Prescale Match High
541  // Byte
542 #define TIMER_TAPMR_TAPSMR_M 0x000000FF // GPTM TimerA Prescale Match
543 #define TIMER_TAPMR_TAPSMRH_S 8
544 #define TIMER_TAPMR_TAPSMR_S 0
545 
546 //*****************************************************************************
547 //
548 // The following are defines for the bit fields in the TIMER_O_TBPMR register.
549 //
550 //*****************************************************************************
551 #define TIMER_TBPMR_TBPSMRH_M 0x0000FF00 // GPTM Timer B Prescale Match High
552  // Byte
553 #define TIMER_TBPMR_TBPSMR_M 0x000000FF // GPTM TimerB Prescale Match
554 #define TIMER_TBPMR_TBPSMRH_S 8
555 #define TIMER_TBPMR_TBPSMR_S 0
556 
557 //*****************************************************************************
558 //
559 // The following are defines for the bit fields in the TIMER_O_TAR register.
560 //
561 //*****************************************************************************
562 #define TIMER_TAR_M 0xFFFFFFFF // GPTM Timer A Register
563 #define TIMER_TAR_S 0
564 
565 //*****************************************************************************
566 //
567 // The following are defines for the bit fields in the TIMER_O_TBR register.
568 //
569 //*****************************************************************************
570 #define TIMER_TBR_M 0xFFFFFFFF // GPTM Timer B Register
571 #define TIMER_TBR_S 0
572 
573 //*****************************************************************************
574 //
575 // The following are defines for the bit fields in the TIMER_O_TAV register.
576 //
577 //*****************************************************************************
578 #define TIMER_TAV_M 0xFFFFFFFF // GPTM Timer A Value
579 #define TIMER_TAV_S 0
580 
581 //*****************************************************************************
582 //
583 // The following are defines for the bit fields in the TIMER_O_TBV register.
584 //
585 //*****************************************************************************
586 #define TIMER_TBV_M 0xFFFFFFFF // GPTM Timer B Value
587 #define TIMER_TBV_S 0
588 
589 //*****************************************************************************
590 //
591 // The following are defines for the bit fields in the TIMER_O_RTCPD register.
592 //
593 //*****************************************************************************
594 #define TIMER_RTCPD_RTCPD_M 0x0000FFFF // RTC Predivide Counter Value
595 #define TIMER_RTCPD_RTCPD_S 0
596 
597 //*****************************************************************************
598 //
599 // The following are defines for the bit fields in the TIMER_O_TAPS register.
600 //
601 //*****************************************************************************
602 #define TIMER_TAPS_PSS_M 0x0000FFFF // GPTM Timer A Prescaler Snapshot
603 #define TIMER_TAPS_PSS_S 0
604 
605 //*****************************************************************************
606 //
607 // The following are defines for the bit fields in the TIMER_O_TBPS register.
608 //
609 //*****************************************************************************
610 #define TIMER_TBPS_PSS_M 0x0000FFFF // GPTM Timer A Prescaler Value
611 #define TIMER_TBPS_PSS_S 0
612 
613 //*****************************************************************************
614 //
615 // The following are defines for the bit fields in the TIMER_O_TAPV register.
616 //
617 //*****************************************************************************
618 #define TIMER_TAPV_PSV_M 0x0000FFFF // GPTM Timer A Prescaler Value
619 #define TIMER_TAPV_PSV_S 0
620 
621 //*****************************************************************************
622 //
623 // The following are defines for the bit fields in the TIMER_O_TBPV register.
624 //
625 //*****************************************************************************
626 #define TIMER_TBPV_PSV_M 0x0000FFFF // GPTM Timer B Prescaler Value
627 #define TIMER_TBPV_PSV_S 0
628 
629 //*****************************************************************************
630 //
631 // The following are defines for the bit fields in the TIMER_O_DMAEV register.
632 //
633 //*****************************************************************************
634 #define TIMER_DMAEV_TBMDMAEN 0x00000800 // GPTM B Mode Match Event DMA
635  // Trigger Enable
636 #define TIMER_DMAEV_CBEDMAEN 0x00000400 // GPTM B Capture Event DMA Trigger
637  // Enable
638 #define TIMER_DMAEV_CBMDMAEN 0x00000200 // GPTM B Capture Match Event DMA
639  // Trigger Enable
640 #define TIMER_DMAEV_TBTODMAEN 0x00000100 // GPTM B Time-Out Event DMA
641  // Trigger Enable
642 #define TIMER_DMAEV_TAMDMAEN 0x00000010 // GPTM A Mode Match Event DMA
643  // Trigger Enable
644 #define TIMER_DMAEV_RTCDMAEN 0x00000008 // GPTM A RTC Match Event DMA
645  // Trigger Enable
646 #define TIMER_DMAEV_CAEDMAEN 0x00000004 // GPTM A Capture Event DMA Trigger
647  // Enable
648 #define TIMER_DMAEV_CAMDMAEN 0x00000002 // GPTM A Capture Match Event DMA
649  // Trigger Enable
650 #define TIMER_DMAEV_TATODMAEN 0x00000001 // GPTM A Time-Out Event DMA
651  // Trigger Enable
652 
653 //*****************************************************************************
654 //
655 // The following are defines for the bit fields in the TIMER_O_ADCEV register.
656 //
657 //*****************************************************************************
658 #define TIMER_ADCEV_TBMADCEN 0x00000800 // GPTM B Mode Match Event ADC
659  // Trigger Enable
660 #define TIMER_ADCEV_CBEADCEN 0x00000400 // GPTM B Capture Event ADC Trigger
661  // Enable
662 #define TIMER_ADCEV_CBMADCEN 0x00000200 // GPTM B Capture Match Event ADC
663  // Trigger Enable
664 #define TIMER_ADCEV_TBTOADCEN 0x00000100 // GPTM B Time-Out Event ADC
665  // Trigger Enable
666 #define TIMER_ADCEV_TAMADCEN 0x00000010 // GPTM A Mode Match Event ADC
667  // Trigger Enable
668 #define TIMER_ADCEV_RTCADCEN 0x00000008 // GPTM RTC Match Event ADC Trigger
669  // Enable
670 #define TIMER_ADCEV_CAEADCEN 0x00000004 // GPTM A Capture Event ADC Trigger
671  // Enable
672 #define TIMER_ADCEV_CAMADCEN 0x00000002 // GPTM A Capture Match Event ADC
673  // Trigger Enable
674 #define TIMER_ADCEV_TATOADCEN 0x00000001 // GPTM A Time-Out Event ADC
675  // Trigger Enable
676 
677 //*****************************************************************************
678 //
679 // The following are defines for the bit fields in the TIMER_O_PP register.
680 //
681 //*****************************************************************************
682 #define TIMER_PP_ALTCLK 0x00000040 // Alternate Clock Source
683 #define TIMER_PP_SYNCCNT 0x00000020 // Synchronize Start
684 #define TIMER_PP_CHAIN 0x00000010 // Chain with Other Timers
685 #define TIMER_PP_SIZE_M 0x0000000F // Count Size
686 #define TIMER_PP_SIZE_16 0x00000000 // Timer A and Timer B counters are
687  // 16 bits each with an 8-bit
688  // prescale counter
689 #define TIMER_PP_SIZE_32 0x00000001 // Timer A and Timer B counters are
690  // 32 bits each with a 16-bit
691  // prescale counter
692 
693 //*****************************************************************************
694 //
695 // The following are defines for the bit fields in the TIMER_O_CC register.
696 //
697 //*****************************************************************************
698 #define TIMER_CC_ALTCLK 0x00000001 // Alternate Clock Source
699 
700 #endif // __HW_TIMER_H__