46 #ifndef __AUX_TIMER_H__
47 #define __AUX_TIMER_H__
62 #include <inc/hw_types.h>
63 #include <inc/hw_ints.h>
64 #include <inc/hw_memmap.h>
65 #include <inc/hw_aux_timer.h>
84 #ifndef DRIVERLIB_GENERATE_ROM
85 #define AUXTimerConfigure NOROM_AUXTimerConfigure
86 #define AUXTimerStart NOROM_AUXTimerStart
87 #define AUXTimerStop NOROM_AUXTimerStop
88 #define AUXTimerPrescaleSet NOROM_AUXTimerPrescaleSet
89 #define AUXTimerPrescaleGet NOROM_AUXTimerPrescaleGet
97 #define AUX_TIMER_CFG_ONE_SHOT \
98 0x00000000 // One-shot timer mode
99 #define AUX_TIMER_CFG_PERIODIC \
100 0x00000001 // Period timer mode
101 #define AUX_TIMER_CFG_ONE_SHOT_EDGE_COUNT \
102 0x00000002 // One-shot timer with edge count
103 #define AUX_TIMER_CFG_PERIODIC_EDGE_COUNT \
104 0x00000003 // Periodic timer with edge count
105 #define AUX_TIMER_CFG_RISING_EDGE \
106 0x00000000 // Count rising edges (used with
108 #define AUX_TIMER_CFG_FALLING_EDGE \
109 0x00002000 // Count falling edges (used with
111 #define AUX_TIMER_CFG_TICK_SRC_RTC_EVENT \
112 0x00000000 // AON wake-up event
113 #define AUX_TIMER_CFG_TICK_SRC_CMP_A \
114 0x00000100 // Comperator A
115 #define AUX_TIMER_CFG_TICK_SRC_CMP_B \
116 0x00000200 // Comperator B
117 #define AUX_TIMER_CFG_TICK_SRC_TDCDONE \
118 0x00000300 // TDC Done
119 #define AUX_TIMER_CFG_TICK_SRC_TIMER0_EVENT \
120 0x00000400 // Timer 0 event
121 #define AUX_TIMER_CFG_TICK_SRC_TIMER1_EVENT \
122 0x00000500 // Timer 1 event
123 #define AUX_TIMER_CFG_TICK_SRC_SMPH_RELEASE \
124 0x00000600 // Semaphore release
125 #define AUX_TIMER_CFG_TICK_SRC_ADC_DONE \
126 0x00000700 // ADC done
127 #define AUX_TIMER_CFG_TICK_SRC_ADC_DONE \
128 0x00000700 // ADC done
130 #define AUX_TIMER_CFG_TICK_SRC_AIO0 \
131 0x00000d00 // AIO_DAT[ 0]
132 #define AUX_TIMER_CFG_TICK_SRC_AIO1 \
133 0x00000e00 // AIO_DAT[ 1]
134 #define AUX_TIMER_CFG_TICK_SRC_AIO2 \
135 0x00000f00 // AIO_DAT[ 2]
136 #define AUX_TIMER_CFG_TICK_SRC_AIO3 \
137 0x00001000 // AIO_DAT[ 3]
138 #define AUX_TIMER_CFG_TICK_SRC_AIO4 \
139 0x00001100 // AIO_DAT[ 4]
140 #define AUX_TIMER_CFG_TICK_SRC_AIO5 \
141 0x00001200 // AIO_DAT[ 5]
142 #define AUX_TIMER_CFG_TICK_SRC_AIO6 \
143 0x00001300 // AIO_DAT[ 6]
144 #define AUX_TIMER_CFG_TICK_SRC_AIO7 \
145 0x00001400 // AIO_DAT[ 7]
146 #define AUX_TIMER_CFG_TICK_SRC_AIO8 \
147 0x00001500 // AIO_DAT[ 8]
148 #define AUX_TIMER_CFG_TICK_SRC_AIO9 \
149 0x00001600 // AIO_DAT[ 9]
150 #define AUX_TIMER_CFG_TICK_SRC_AIO10 \
151 0x00001700 // AIO_DAT[10]
152 #define AUX_TIMER_CFG_TICK_SRC_AIO11 \
153 0x00001800 // AIO_DAT[11]
154 #define AUX_TIMER_CFG_TICK_SRC_AIO12 \
155 0x00001900 // AIO_DAT[12]
156 #define AUX_TIMER_CFG_TICK_SRC_AIO13 \
157 0x00001A00 // AIO_DAT[13]
158 #define AUX_TIMER_CFG_TICK_SRC_AIO14 \
159 0x00001B00 // AIO_DAT[14]
160 #define AUX_TIMER_CFG_TICK_SRC_AIO15 \
161 0x00001C00 // AIO_DAT[15]
162 #define AUX_TIMER_CFG_TICK_SRC_ACLK_REF \
163 0x00001D00 // ACLK_REF_i
164 #define AUX_TIMER_CFG_TICK_SRC_MCU_EVENT \
165 0x00001E00 // MCU event
166 #define AUX_TIMER_CFG_TICK_SRC_ADC_IRQ \
167 0x00001F00 // DMA done
175 #define AUX_TIMER_0 0x0000FFFF // AUX Timer 0
176 #define AUX_TIMER_1 0x00FF0000 // AUX Timer 1
177 #define AUX_TIMER_BOTH 0x00FFFFFF // AUX Timer Both 0 and 1
185 #define AUX_TIMER_PRESCALE_DIV_1 \
186 0x00000000 // Prescale division ratio 1
187 #define AUX_TIMER_PRESCALE_DIV_2 \
188 0x00000010 // Prescale division ratio 2
189 #define AUX_TIMER_PRESCALE_DIV_4 \
190 0x00000020 // Prescale division ratio 4
191 #define AUX_TIMER_PRESCALE_DIV_8 \
192 0x00000030 // Prescale division ratio 8
193 #define AUX_TIMER_PRESCALE_DIV_16 \
194 0x00000040 // Prescale division ratio 16
195 #define AUX_TIMER_PRESCALE_DIV_32 \
196 0x00000050 // Prescale division ratio 32
197 #define AUX_TIMER_PRESCALE_DIV_64 \
198 0x00000060 // Prescale division ratio 64
199 #define AUX_TIMER_PRESCALE_DIV_128 \
200 0x00000070 // Prescale division ratio 128
201 #define AUX_TIMER_PRESCALE_DIV_256 \
202 0x00000080 // Prescale division ratio 256
203 #define AUX_TIMER_PRESCALE_DIV_512 \
204 0x00000090 // Prescale division ratio 512
205 #define AUX_TIMER_PRESCALE_DIV_1028 \
206 0x000000A0 // Prescale div. ratio 1028
207 #define AUX_TIMER_PRESCALE_DIV_2048 \
208 0x000000B0 // Prescale div. ratio 2048
209 #define AUX_TIMER_PRESCALE_DIV_4096 \
210 0x000000C0 // Prescale div. ratio 4096
211 #define AUX_TIMER_PRESCALE_DIV_8192 \
212 0x000000D0 // Prescale div. ratio 8192
213 #define AUX_TIMER_PRESCALE_DIV_16384 \
214 0x000000E0 // Prescale div. ratio 16384
215 #define AUX_TIMER_PRESCALE_DIV_32768 \
216 0x000000F0 // Prescale div. ratio 32768
369 ((ui32Timer &
AUX_TIMER_1) && (ui32Target <= 255)));
375 HWREG(ui32Addr) = ui32Target;
395 __STATIC_INLINE uint32_t
485 #ifndef DRIVERLIB_NOROM
487 #ifdef ROM_AUXTimerConfigure
488 #undef AUXTimerConfigure
489 #define AUXTimerConfigure ROM_AUXTimerConfigure
491 #ifdef ROM_AUXTimerStart
493 #define AUXTimerStart ROM_AUXTimerStart
495 #ifdef ROM_AUXTimerStop
497 #define AUXTimerStop ROM_AUXTimerStop
499 #ifdef ROM_AUXTimerPrescaleSet
500 #undef AUXTimerPrescaleSet
501 #define AUXTimerPrescaleSet ROM_AUXTimerPrescaleSet
503 #ifdef ROM_AUXTimerPrescaleGet
504 #undef AUXTimerPrescaleGet
505 #define AUXTimerPrescaleGet ROM_AUXTimerPrescaleGet
518 #endif // __AUX_TIMER_H__
void AUXTimerPrescaleSet(uint32_t ui32Timer, uint32_t ui32PrescaleDiv)
Set AUX timer prescale value.
void AUXTimerConfigure(uint32_t ui32Timer, uint32_t ui32Config)
Configure AUX timer.
uint32_t AUXTimerPrescaleGet(uint32_t ui32Timer)
Get AUX timer prescale value.
void AUXTimerStop(uint32_t ui32Timer)
Stop AUX timer(s).
__STATIC_INLINE void AUXTimerTargetValSet(uint32_t ui32Timer, uint32_t ui32Target)
Set AUX timer target value.
__STATIC_INLINE uint32_t AUXTimerTargetValGet(uint32_t ui32Timer)
Get AUX timer target value.
void AUXTimerStart(uint32_t ui32Timer)
Start AUX timer(s).