GPTimerWFF3.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 /*!*****************************************************************************
33  * @file GPTimerWFF3.h
34  * @brief GPTimer driver implementation for Wi-Fi F3 devices
35  *
36  * @anchor ti_drivers_GPTimerWFF3_Overview
37  * # Overview #
38  * The GPTimer driver allows you to measure elapsed time with simple and
39  * portable APIs. It also allows for asynchronous callbacks after a
40  * certain amount of time has elapsed.
41  * In addition the driver supports APIs for both capture and compare
42  * of IO signals muxable to the four channels of each GPT peripheral
43  * instance. The channel capture functionality can be used to measure period
44  * and duty cycle of an input signal. The channel compare functionality can
45  * be used for generating PWM signals.
46  *
47  * The GPTimer driver also handles the general purpose timer resource
48  * allocation. For each driver that requires use of a general purpose timer, it
49  * calls #GPTimerWFF3_open() to occupy the specified timer, and calls
50  * #GPTimerWFF3_close() to release the occupied timer resource.
51  *
52  * @anchor ti_drivers_GPTimerWFF3_PeripheralProperties
53  * # GPT peripheral properties #
54  * The table below lists supported counter widths for each peripheral instance
55  * number on available device types.
56  * The timer counter clock is sourced from the internal prescaler stage which
57  * has the system clock as input.
58  * The prescaler can be configured to divide the input system clock,
59  * effectively extending the maximal time interval for the timer counter while
60  * reducing the timer resolution.
61  *
62  * | Device type | GPT0 | GPT1 |
63  * |---------------|---------|---------|
64  * | CC35xx | 32 bits | 32 bits |
65 
66  *
67  * @anchor ti_drivers_GPTimerWFF3_CounterModes
68  * # Counter Modes #
69  * The GPTimer driver supports the following timer counter modes:
70  * - Oneshot mode counting upwards. When the counter reaches the target
71  * value, the timer is stopped automatically and the TGT interrupt status
72  * flag (#GPTimerWFF3_INT_TGT) is set.
73  * - Periodic mode counting upwards. When the counter reaches target value it
74  * wraps and restarts counting from 0 again. The TGT interrupt status flag
75  * is set each time the target value is reached. The ZERO interrupt status
76  * flag (#GPTimerWFF3_INT_ZERO) is set each time the counter restarts
77  * from 0.
78  * - Periodic mode counting upwards/downwards. When the counter reaches
79  * target value while counting upwards the TGT interrupt flag is set and it
80  * starts counting downwards to 0. When 0 is reached the ZERO interrupt
81  * status flag is set and the sequence is repeated.
82  *
83  * @anchor ti_drivers_GPTimerWFF3_UnsupportedFeatures
84  * # GPT peripheral features not supported by the GPTimer driver #
85  * - Channel input from the event fabric is not supported
86  * - Channel output dead band control is not supported
87  * - Use of channel input filter is not supported
88  * - DMA usage is not supported
89  * - ADC trigger is not supported
90  * - QDEC mode where the timer acts as a quadrature decoder is not supported
91  * - Timer synchronization is not supported
92  * - IR generation is not supported
93  * - Brushless DC motor control is not supported
94  * - Fault and Park is not supported
95  * - Prescaler counter clock sourced from events is not supported
96  *
97  * @anchor ti_drivers_GPTimerWFF3_PowerManagement
98  * # Power Management #
99  * The power management framework will try to put the device into the most
100  * power efficient mode whenever possible. Please see the technical reference
101  * manual for further details on each power mode.
102  *
103  * The GPTimer driver will set constraints on disallowed power modes when
104  * needed, removing the need for the application to handle this.
105  * The following statements are valid:
106  * - After #GPTimerWFF3_open():
107  * The device is still allowed to enter Sleep. When the device is
108  * active, the corresponding GPT peripheral will be enabled and clocked.
109  * Note that a configured counter target and configured channels will not
110  * be retained when going in and out of Sleep.
111  * The counter target is set by the functions
112  * #GPTimerWFF3_setInitialCounterTarget() and
113  * #GPTimerWFF3_setNextCounterTarget().
114  * - After #GPTimerWFF3_start():
115  * The device will only go to Idle power mode since the system clock is
116  * needed for timer operation.
117  * - After #GPTimerWFF3_stop():
118  * The device is still allowed to enter Sleep. When the device is
119  * active, the corresponding GPT peripheral will be enabled and clocked.
120  * - After #GPTimerWFF3_close():
121  * The underlying GPT peripherals bus clock is turned off. The device is
122  * allowed to enter Sleep.
123  *
124  * @anchor ti_drivers_GPTimerWFF3_Accuracy
125  * # Accuracy #
126  * The timer clock of the GPT peripheral is dependent on the system clock.
127  *
128  * @anchor ti_drivers_GPTimerWFF3_Usage
129  * # Usage #
130  *
131  * This documentation provides some basic @ref ti_drivers_GPTimerWFF3_Examples
132  * "examples" in the form of commented code fragments.
133  *
134  *
135  * <hr>
136  * @anchor ti_drivers_GPTimerWFF3_Examples
137  * # Examples
138  *
139  * @note
140  * <b>The following examples are intended for reference only and are not
141  * intended for application use.</b>
142  *
143  * @li @ref ti_drivers_GPTimerWFF3_Example_periodic "Periodic timer"
144  * @li @ref ti_drivers_GPTimerWFF3_Example_output "Output signal generation"
145  *
146  *
147  * @anchor ti_drivers_GPTimerWFF3_Example_periodic
148  * ## Periodic timer example##
149  * The code example below will generate an interrupt using the GPTimer every
150  * 1 ms.
151  * Note that when a count-up counter mode is used, the number of counter ticks
152  * to reach the target value equals target value + 1.
153  *
154  * @anchor ti_drivers_GPTimerWFF3_Code
155  * @code
156  * #include <ti/drivers/timer/GPTimerWFF3.h>
157  *
158  * void timerCallback(GPTimerWFF3_Handle gptHandle, GPTimerWFF3_IntMask interruptMask) {
159  * // interrupt callback code goes here. Minimize processing in interrupt.
160  * }
161  *
162  * void* taskFxn(void* arg) {
163  *
164  * GPTimerWFF3_Handle gptHandle;
165  * GPTimerWFF3_Params params;
166  * uint32_t counterTarget;
167  *
168  * // Initialize parameters and assign callback function to be used
169  * GPTimerWFF3_Params_init(&params);
170  * params.hwiCallbackFxn = timerCallback;
171  *
172  * // Open driver
173  * gptHandle = GPTimerWFF3_open(0, &params);
174  *
175  * // Set counter target
176  * counterTarget = 40000 - 1; // 1 ms with a counter clock of 40 MHz
177  * GPTimerWFF3_setInitialCounterTarget(gptHandle, counterTarget, true);
178  *
179  * // Enable counter target interrupt
180  * GPTimerWFF3_enableInterrupt(gptHandle, GPTimerWFF3_INT_TGT);
181  *
182  * // Start counter in count-up-periodic mode
183  * GPTimerWFF3_start(gptHandle, GPTimerWFF3_CTL_MODE_UP_PER);
184  *
185  * // Generate counter target interrupt every 1 ms forever
186  * while(1);
187  * }
188  * @endcode
189  *
190  *
191  * @anchor ti_drivers_GPTimerWFF3_Example_output
192  * ## Output signal generation example##
193  * The code example below will generate an output signal of 32 kHz with a 50 %
194  * duty cycle on channel 2.
195  * With an up/down counter mode, the counter target value determines the signal
196  * period and the value must be set to half the number of the total counter
197  * ticks per signal period.
198  * With a channel action of toggle-on-compare, the channel compare value must
199  * be set to (counter target value)/2 in order to obtain a 50 % duty cycle of
200  * the output signal.
201  * The period of a 32 kHz signal equals 1250 counter ticks when the counter has
202  * a 40 MHz clock.
203  *
204  *
205  * @code
206  * #include <ti/drivers/timer/GPTimerWFF3.h>
207  *
208  * void* taskFxn(void* arg) {
209  *
210  * GPTimerWFF3_Handle gptHandle;
211  * GPTimerWFF3_Params params;
212  * uint32_t cntTargetVal = 1250/2;
213  * uint32_t chCompVal = cntTargetVal/2;
214  *
215  * // Configure channel 2 action
216  * GPTimerWFF3_Params_init(&params);
217  * params.channelProperty[2].action = GPTimerWFF3_CH_TOGGLE_ON_COMPARE_PERIODIC;
218  *
219  * // Open driver
220  * gptHandle = GPTimerWFF3_open(0, &params);
221  *
222  * // Set channel output signal period
223  * GPTimerWFF3_setInitialCounterTarget(gptHandle, cntTargetVal, false);
224  *
225  * // Set channel output signal duty cycle
226  * GPTimerWFF3_setInitialChannelCompVal(gptHandle, GPTimerWFF3_CH_NO_2, chCompVal, false);
227  *
228  * // Start the GPTimer in up-down-periodic mode
229  * GPTimerWFF3_start(gptHandle, GPTimerWFF3_CTL_MODE_UPDWN_PER);
230  *
231  * // Output signal forever
232  * while(1);
233  * }
234  * @endcode
235  *
236  *
237  * ## Opening the GPTimerWFF3 Driver #
238  *
239  * Opening a GPTimerWFFF3 requires four steps:
240  * 1. Create and initialize a #GPTimerWFF3_Params structure.
241  * 2. Set non-default parameter values.
242  * 3. Call #GPTimerWFF3_open(), passing the index of the timer in the
243  * #GPTimerWFF3_Config structure, and the address of the #GPTimerWFF3_Params
244  * structure. The timer instance is specified by the index in the
245  * #GPTimerWFF3_Config structure.
246  * 4. Verify that the timer handle returned by #GPTimerWFF3_open() is non-NULL.
247  * The handle will be used to operate the timer driver instance you just
248  * opened.
249  *
250  * <hr>
251  * @anchor ti_drivers_GPTWFF3_Configuration
252  * # Configuration
253  *
254  * Refer to the @ref driver_configuration "Driver's Configuration" section
255  * for driver configuration information.
256  * <hr>
257  *
258  * ============================================================================
259  */
260 
261 #ifndef ti_drivers_timer_GPTimerWFF3__include
262 #define ti_drivers_timer_GPTimerWFF3__include
263 
264 #include <ti/drivers/dpl/HwiP.h>
265 #include <ti/drivers/Power.h>
266 #include <ti/drivers/GPIO.h>
267 
268 #include <ti/devices/DeviceFamily.h>
269 #include DeviceFamily_constructPath(inc/hw_gptimer.h)
270 
271 #ifdef __cplusplus
272 extern "C" {
273 #endif
274 
275 /* Define for number of channels on the GPT peripheral */
276 #define NO_OF_GPT_CHANNELS 4
277 
283 typedef enum
284 {
290 
296 typedef enum
297 {
302 
308 typedef enum
309 {
310  GPTimerWFF3_CH_LEVEL_LOW = GPTIMER_OUTCTL_CLROUT0,
311  GPTimerWFF3_CH_LEVEL_HIGH = GPTIMER_OUTCTL_SETOUT0,
313 
319 typedef enum
320 {
321  GPTimerWFF3_CH_EDGE_NONE = GPTIMER_C0CFG_EDGE_NONE,
322  GPTimerWFF3_CH_EDGE_RISE = GPTIMER_C0CFG_EDGE_RISE,
323  GPTimerWFF3_CH_EDGE_FALL = GPTIMER_C0CFG_EDGE_FALL,
324  GPTimerWFF3_CH_EDGE_BOTH = GPTIMER_C0CFG_EDGE_BOTH,
326 
336 typedef enum
337 {
339  GPTimerWFF3_CTL_MODE_DIS = GPTIMER_CTL_MODE_DIS,
343  GPTimerWFF3_CTL_MODE_UP_ONCE = GPTIMER_CTL_MODE_UP_ONCE,
347  GPTimerWFF3_CTL_MODE_UP_PER = GPTIMER_CTL_MODE_UP_PER,
351  GPTimerWFF3_CTL_MODE_UPDWN_PER = GPTIMER_CTL_MODE_UPDWN_PER,
353 
359 typedef enum
360 {
362  GPTimerWFF3_INT_TGT = 1 << GPTIMER_RIS_TGT_S,
364  GPTimerWFF3_INT_ZERO = 1 << GPTIMER_RIS_ZERO_S,
366  GPTimerWFF3_INT_COUNTER_CHANGE = 1 << GPTIMER_RIS_CNTRCHNG_S,
368  GPTimerWFF3_INT_DIR_CHANGE = 1 << GPTIMER_RIS_DIRCHNG_S,
370  GPTimerWFF3_INT_CH0_CC = 1 << GPTIMER_RIS_C0CC_S,
372  GPTimerWFF3_INT_CH1_CC = 1 << GPTIMER_RIS_C1CC_S,
374  GPTimerWFF3_INT_CH2_CC = 1 << GPTIMER_RIS_C2CC_S,
376  GPTimerWFF3_INT_CH3_CC = 1 << GPTIMER_RIS_C3CC_S,
378 
383 typedef enum
384 {
386  GPTimerWFF3_DEBUG_STALL_OFF = GPTIMER_EMU_HALT_DIS,
388  GPTimerWFF3_DEBUG_STALL_IMMEDIATE = (GPTIMER_EMU_HALT_EN | GPTIMER_EMU_CTL_IMMEDIATE),
390  GPTimerWFF3_DEBUG_STALL_ON_ZERO = (GPTIMER_EMU_HALT_EN | GPTIMER_EMU_CTL_ZERCOND),
392 
398 typedef enum
399 {
401  GPTimerWFF3_CH_COMPARE_COUNTER_DIR_BOTH = GPTIMER_CTL_CMPDIR_BOTH,
403  GPTimerWFF3_CH_COMPARE_COUNTER_DIR_UP = GPTIMER_CTL_CMPDIR_UP,
405  GPTimerWFF3_CH_COMPARE_COUNTER_DIR_DOWN = GPTIMER_CTL_CMPDIR_DOWN,
407 
413 typedef enum
414 {
416  GPTimerWFF3_CH_DISABLE = GPTIMER_C0CFG_CCACT_DIS,
417 
418  /***************************************************************************
419  * Channel compare actions. *
420  * *
421  * The following list of channel compare actions will force the channel to *
422  * be configured as an output. *
423  ***************************************************************************/
430  GPTimerWFF3_CH_TOGGLE_ON_COMPARE_PERIODIC = GPTIMER_C0CFG_CCACT_TGL_ON_CMP,
431 
437  GPTimerWFF3_CH_TOGGLE_ON_COMPARE_ONCE = GPTIMER_C0CFG_CCACT_TGL_ON_CMP_DIS,
438 
445  GPTimerWFF3_CH_SET_ON_COMPARE_PERIODIC = GPTIMER_C0CFG_CCACT_SET_ON_CMP,
446 
452  GPTimerWFF3_CH_SET_ON_COMPARE_ONCE = GPTIMER_C0CFG_CCACT_SET_ON_CMP_DIS,
453 
460  GPTimerWFF3_CH_CLEAR_ON_COMPARE_PERIODIC = GPTIMER_C0CFG_CCACT_CLR_ON_CMP,
461 
467  GPTimerWFF3_CH_CLEAR_ON_COMPARE_ONCE = GPTIMER_C0CFG_CCACT_CLR_ON_CMP_DIS,
468 
476  GPTimerWFF3_CH_SET_ON_0_TOGGLE_ON_CMP_PERIODIC = GPTIMER_C0CFG_CCACT_SET_ON_0_TGL_ON_CMP,
477 
484  GPTimerWFF3_CH_SET_ON_0_TOGGLE_ON_COMPARE_ONCE = GPTIMER_C0CFG_CCACT_SET_ON_0_TGL_ON_CMP_DIS,
485 
493  GPTimerWFF3_CH_CLR_ON_0_TOGGLE_ON_COMPARE_PERIODIC = GPTIMER_C0CFG_CCACT_CLR_ON_0_TGL_ON_CMP,
494 
501  GPTimerWFF3_CH_CLR_ON_0_TOGGLE_ON_COMPARE_ONCE = GPTIMER_C0CFG_CCACT_CLR_ON_0_TGL_ON_CMP_DIS,
502 
510  GPTimerWFF3_CH_PULSE_ON_COMPARE_PERIODIC = GPTIMER_C0CFG_CCACT_PULSE_ON_CMP,
511 
518  GPTimerWFF3_CH_PULSE_ON_COMPARE_ONCE = GPTIMER_C0CFG_CCACT_PULSE_ON_CMP_DIS,
519 
520  /**************************************************************************
521  * Channel capture actions. *
522  * *
523  * The following list of channel actions will force the channel to be *
524  * configured as an input. *
525  * The counter value will be captured and the captured value can be read *
526  * by the #GPTimerWFF3_getChCompareVal() and *
527  * #GPTimerWFF3_getNextChCompareVal() functions. *
528  **************************************************************************/
536  GPTimerWFF3_CH_SET_ON_CAPTURE_PERIODIC = GPTIMER_C0CFG_CCACT_SET_ON_CAPT,
537 
545  GPTimerWFF3_CH_SET_ON_CAPTURE_ONCE = GPTIMER_C0CFG_CCACT_SET_ON_CAPT_DIS,
546 
582  GPTimerWFF3_CH_PULSE_WIDTH_MEASURE = GPTIMER_C0CFG_CCACT_PER_PULSE_WIDTH_MEAS,
584 
585 /* Forward declaration of GPTimer configuration */
587 
588 /* GPTimer handle is pointer to configuration structure */
590 
591 /* Interrupt bit vector. See GPTimerWFF3_Interrupt for available interrupts */
592 typedef uint16_t GPTimerWFF3_IntMask;
593 
602 typedef void (*GPTimerWFF3_HwiFxn)(GPTimerWFF3_Handle handle, GPTimerWFF3_IntMask interruptMask);
603 
611 {
613  GPTimerWFF3_ChannelAction action;
617  GPTimerWFF3_ChannelInputEdge inputEdge;
619 
661 typedef struct GPTimerWFF3_Params
662 {
671  uint8_t prescalerDiv;
675  GPTimerWFF3_ChannelCmpDir counterDirChCompare;
681 
689 {
691  uint8_t pin;
693  uint8_t pinMux;
695  uint8_t nPin;
697  uint8_t nPinMux;
699 
744 typedef struct GPTimerWFF3_HWAttrs
745 {
747  uint32_t baseAddr;
749  PowerWFF3_Resource powerID;
753  uint8_t intNum;
755  uint8_t intPriority;
757 
772 typedef struct GPTimerWFF3_Object
773 {
781  uintptr_t arg;
783  bool isOpen;
787  uint8_t prescalerDiv;
791  GPTimerWFF3_ChannelCmpDir counterDirChCompare;
795 
810 {
813 };
814 
840 
857 extern GPTimerWFF3_Handle GPTimerWFF3_open(uint_least8_t index, const GPTimerWFF3_Params *params);
858 
873 extern void GPTimerWFF3_close(GPTimerWFF3_Handle handle);
874 
891 extern void GPTimerWFF3_start(GPTimerWFF3_Handle handle, GPTimerWFF3_Mode mode);
892 
903 extern void GPTimerWFF3_stop(GPTimerWFF3_Handle handle);
904 
931 extern void GPTimerWFF3_setInitialCounterTarget(GPTimerWFF3_Handle handle, uint32_t value, bool intFlagClr);
932 
966 extern void GPTimerWFF3_setNextCounterTarget(GPTimerWFF3_Handle handle, uint32_t value, bool intFlagClr);
967 
979 extern uint32_t GPTimerWFF3_getCounter(GPTimerWFF3_Handle handle);
980 
994 extern uintptr_t GPTimerWFF3_getArg(GPTimerWFF3_Handle handle);
995 
1007 extern void GPTimerWFF3_setArg(GPTimerWFF3_Handle handle, uintptr_t arg);
1008 
1018 void GPTimerWFF3_enableInterrupt(GPTimerWFF3_Handle handle, GPTimerWFF3_IntMask intMask);
1019 
1030 void GPTimerWFF3_disableInterrupt(GPTimerWFF3_Handle handle, GPTimerWFF3_IntMask intMask);
1031 
1057 void GPTimerWFF3_setInitialChannelCompVal(GPTimerWFF3_Handle handle,
1058  GPTimerWFF3_ChannelNo chNo,
1059  uint32_t value,
1060  bool intFlagClr);
1061 
1091 void GPTimerWFF3_setNextChannelCompVal(GPTimerWFF3_Handle handle,
1092  GPTimerWFF3_ChannelNo chNo,
1093  uint32_t value,
1094  bool intFlagClr);
1095 
1112 void GPTimerWFF3_setChannelOutputLevel(GPTimerWFF3_Handle handle,
1113  GPTimerWFF3_ChannelNo chNo,
1114  GPTimerWFF3_ChannelLevel level);
1115 
1140 uint32_t GPTimerWFF3_getChCompareVal(GPTimerWFF3_Handle handle, GPTimerWFF3_ChannelNo chNo);
1141 
1166 uint32_t GPTimerWFF3_getChCaptureVal(GPTimerWFF3_Handle handle, GPTimerWFF3_ChannelNo chNo);
1167 
1194 uint32_t GPTimerWFF3_getNextChCompareVal(GPTimerWFF3_Handle handle, GPTimerWFF3_ChannelNo chNo);
1195 
1222 uint32_t GPTimerWFF3_getNextChCaptureVal(GPTimerWFF3_Handle handle, GPTimerWFF3_ChannelNo chNo);
1223 
1235 uint32_t GPTimerWFF3_getCounterWidth(GPTimerWFF3_Handle handle);
1236 
1237 #ifdef __cplusplus
1238 }
1239 #endif
1240 #endif /* ti_drivers_timer_GPTimerWFF3__include */
Definition: GPTimerWFF3.h:401
GPTimerWFF3_ChannelInputEdge inputEdge
Definition: GPTimerWFF3.h:617
#define NO_OF_GPT_CHANNELS
Definition: GPTimerWFF3.h:276
Definition: GPTimerWFF3.h:510
void GPTimerWFF3_setInitialChannelCompVal(GPTimerWFF3_Handle handle, GPTimerWFF3_ChannelNo chNo, uint32_t value, bool intFlagClr)
Function that sets the initial channel compare value on the specified GPTimer and channel...
Power_NotifyObj postNotify
Definition: GPTimerWFF3.h:779
GPTimerWFF3_HwiFxn hwiCallbackFxn
Definition: GPTimerWFF3.h:667
ADC_Params params
Definition: Driver_Init.h:11
void GPTimerWFF3_setNextChannelCompVal(GPTimerWFF3_Handle handle, GPTimerWFF3_ChannelNo chNo, uint32_t value, bool intFlagClr)
Function that sets the channel compare value on the specified GPTimer for the next cycle of the alrea...
Definition: GPTimerWFF3.h:536
HwiP structure.
Definition: HwiP.h:166
GPTimerWFF3_ChannelLevel
Definitions for supported GPTimer channel output levels.
Definition: GPTimerWFF3.h:308
GPTimerWFF3_ChannelInputEdge
Definitions for supported GPTimer channel input edge.
Definition: GPTimerWFF3.h:319
void GPTimerWFF3_setInitialCounterTarget(GPTimerWFF3_Handle handle, uint32_t value, bool intFlagClr)
Function that sets the initial timer counter target on the specified GPTimer. This function must be c...
void GPTimerWFF3_stop(GPTimerWFF3_Handle handle)
Function that stops the timer counter of the specified GPTimer driver.
Definition: GPTimerWFF3.h:430
uint32_t GPTimerWFF3_getCounterWidth(GPTimerWFF3_Handle handle)
Function to get the width of the timer counter in number of bits.
uintptr_t arg
Definition: GPTimerWFF3.h:781
uint16_t GPTimerWFF3_IntMask
Definition: GPTimerWFF3.h:592
Definition: GPTimerWFF3.h:364
void GPTimerWFF3_close(GPTimerWFF3_Handle handle)
Function that closes a GPTimer driver specified by the GPTimer handle. Closing GPTimer driver will re...
void(* GPTimerWFF3_HwiFxn)(GPTimerWFF3_Handle handle, GPTimerWFF3_IntMask interruptMask)
The definition of a callback function used by the GPTimer driver.
Definition: GPTimerWFF3.h:602
Power Manager.
Definition: GPTimerWFF3.h:388
GPTimerWFF3_ChannelAction action
Definition: GPTimerWFF3.h:613
struct GPTimerWFF3_ChannelConf GPTimerWFF3_ChannelConf
GPTimerWFF3 channel dependent pin configuration struct.
GPTimerWFF3_DebugMode debugStallMode
Definition: GPTimerWFF3.h:673
void GPTimerWFF3_setArg(GPTimerWFF3_Handle handle, uintptr_t arg)
Function to set a custom argument.
GPTimerWFF3 Object.
Definition: GPTimerWFF3.h:772
Definition: GPTimerWFF3.h:405
Definition: GPTimerWFF3.h:467
bool intPhaseLate
Definition: GPTimerWFF3.h:669
Definition: GPTimerWFF3.h:343
GPTimerWFF3_Config * GPTimerWFF3_Handle
Definition: GPTimerWFF3.h:589
GPTimerWFF3 channel dependent properties struct.
Definition: GPTimerWFF3.h:610
GPTimer Global configuration.
Definition: GPTimerWFF3.h:809
GPTimerWFF3_ChannelCmpDir counterDirChCompare
Definition: GPTimerWFF3.h:791
Definition: GPTimerWFF3.h:362
Definition: GPTimerWFF3.h:582
void GPTimerWFF3_setNextCounterTarget(GPTimerWFF3_Handle handle, uint32_t value, bool intFlagClr)
Function that sets the timer counter target for the next counter period on the specified GPTimer...
void GPTimerWFF3_enableInterrupt(GPTimerWFF3_Handle handle, GPTimerWFF3_IntMask intMask)
Enable interrupt source for the GPTimer handle.
uint8_t intNum
Definition: GPTimerWFF3.h:753
uint8_t intPriority
Definition: GPTimerWFF3.h:755
Definition: GPTimerWFF3.h:322
void GPTimerWFF3_setChannelOutputLevel(GPTimerWFF3_Handle handle, GPTimerWFF3_ChannelNo chNo, GPTimerWFF3_ChannelLevel level)
Function that manually sets the current channel output level high or low. Manual update of a channel ...
Definition: GPTimerWFF3.h:323
uintptr_t GPTimerWFF3_getArg(GPTimerWFF3_Handle handle)
Function to get a custom argument.
Definition: GPTimerWFF3.h:368
Definition: GPTimerWFF3.h:452
GPTimerWFF3_ChannelCmpDir
Definitions for which direction the timer counter must have in order to set channel compare interrupt...
Definition: GPTimerWFF3.h:398
uint32_t GPTimerWFF3_getNextChCompareVal(GPTimerWFF3_Handle handle, GPTimerWFF3_ChannelNo chNo)
Function to get the channel compare value for the next counter cycle or the channel-updated capture v...
Definition: GPTimerWFF3.h:351
Definition: GPTimerWFF3.h:366
GPTimerWFF3_ChannelNo
Definitions for supported GPTimer channel numbers.
Definition: GPTimerWFF3.h:283
uint8_t nPin
Definition: GPTimerWFF3.h:695
Definition: GPTimerWFF3.h:347
bool isOpen
Definition: GPTimerWFF3.h:783
GPTimerWFF3_DebugMode
Definitions for controlling timer debug stall mode.
Definition: GPTimerWFF3.h:383
Definition: GPTimerWFF3.h:370
uint32_t GPTimerWFF3_getNextChCaptureVal(GPTimerWFF3_Handle handle, GPTimerWFF3_ChannelNo chNo)
Function to get the channel compare value for the next counter cycle or the channel-updated capture v...
Definition: GPTimerWFF3.h:374
Definition: GPTimerWFF3.h:299
Definition: GPTimerWFF3.h:288
Power notify object structure.
Definition: Power.h:441
struct GPTimerWFF3_HWAttrs GPTimerWFF3_HWAttrs
GPTimerWFF3 Hardware attributes.
GPTimerWFF3 Hardware attributes.
Definition: GPTimerWFF3.h:744
HwiP_Struct hwi
Definition: GPTimerWFF3.h:775
GPTimerWFF3_Object * object
Definition: GPTimerWFF3.h:811
Definition: GPTimerWFF3.h:298
uint8_t pin
Definition: GPTimerWFF3.h:691
Definition: GPTimerWFF3.h:376
Definition: GPTimerWFF3.h:324
GPTimerWFF3_ChannelCmpDir counterDirChCompare
Definition: GPTimerWFF3.h:675
Definition: GPTimerWFF3.h:285
uint8_t prescalerDiv
Definition: GPTimerWFF3.h:787
struct GPTimerWFF3_Params GPTimerWFF3_Params
GPTimerWFF3 Parameters.
Definition: GPTimerWFF3.h:518
void GPTimerWFF3_start(GPTimerWFF3_Handle handle, GPTimerWFF3_Mode mode)
Function that starts the timer counter of the specified GPTimer handle with current settings and spec...
uint32_t GPTimerWFF3_getChCaptureVal(GPTimerWFF3_Handle handle, GPTimerWFF3_ChannelNo chNo)
Function to get the channel compare value or channel-updated capture value. Dependent on the selected...
Definition: GPTimerWFF3.h:310
void GPTimerWFF3_Params_init(GPTimerWFF3_Params *params)
Function that initializes the GPTimerWFF3_Params struct to its default values.
GPTimerWFF3_ChannelDir
Definitions for supported GPTimer channel direction.
Definition: GPTimerWFF3.h:296
uint32_t baseAddr
Definition: GPTimerWFF3.h:747
Definition: GPTimerWFF3.h:403
Definition: GPTimerWFF3.h:300
uint8_t prescalerDiv
Definition: GPTimerWFF3.h:671
General Purpose I/O driver interface.
Definition: GPTimerWFF3.h:287
Definition: GPTimerWFF3.h:437
Definition: GPTimerWFF3.h:460
GPTimerWFF3_DebugMode debugStallMode
Definition: GPTimerWFF3.h:789
Definition: GPTimerWFF3.h:286
GPTimerWFF3_HwiFxn hwiCallbackFxn
Definition: GPTimerWFF3.h:777
Definition: GPTimerWFF3.h:311
uint32_t GPTimerWFF3_getChCompareVal(GPTimerWFF3_Handle handle, GPTimerWFF3_ChannelNo chNo)
Function to get the channel compare value or channel-updated capture value. Dependent on the selected...
Definition: GPTimerWFF3.h:416
GPTimerWFF3 channel dependent pin configuration struct.
Definition: GPTimerWFF3.h:688
Definition: GPTimerWFF3.h:445
void GPTimerWFF3_disableInterrupt(GPTimerWFF3_Handle handle, GPTimerWFF3_IntMask intMask)
Disable interrupt source for the GPTimer handle.
Definition: GPTimerWFF3.h:386
GPTimerWFF3_Handle GPTimerWFF3_open(uint_least8_t index, const GPTimerWFF3_Params *params)
Function that opens a driver for the given GPT peripheral. Will set power dependency on timer and con...
Hardware Interrupt module for the RTOS Porting Interface.
Definition: GPTimerWFF3.h:372
GPTimerWFF3_ChannelAction
Definitions for supported GPTimer channel actions.
Definition: GPTimerWFF3.h:413
Definition: GPTimerWFF3.h:339
uint32_t GPTimerWFF3_getCounter(GPTimerWFF3_Handle handle)
Function that returns the current timer counter value.
GPTimerWFF3_Interrupt
Definitions for supported GPTimer interrupts. GPTimerWFF3_IntMask arguments should be a bit vector co...
Definition: GPTimerWFF3.h:359
uint8_t nPinMux
Definition: GPTimerWFF3.h:697
GPTimerWFF3_Mode
Definitions for supported GPTimer counting modes.
Definition: GPTimerWFF3.h:336
Definition: GPTimerWFF3.h:390
GPTimerWFF3 Parameters.
Definition: GPTimerWFF3.h:661
struct GPTimerWFF3_Object GPTimerWFF3_Object
GPTimerWFF3 Object.
const GPTimerWFF3_HWAttrs * hwAttrs
Definition: GPTimerWFF3.h:812
uint8_t pinMux
Definition: GPTimerWFF3.h:693
bool intPhaseLate
Definition: GPTimerWFF3.h:785
PowerWFF3_Resource powerID
Definition: GPTimerWFF3.h:749
Definition: GPTimerWFF3.h:321
Definition: GPTimerWFF3.h:545
struct GPTimerWFF3_ChannelProp GPTimerWFF3_ChannelProp
GPTimerWFF3 channel dependent properties struct.
© Copyright 1995-2026, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale