Data Structures | Macros | Typedefs | Enumerations | Functions
GPTimerWFF3.h File Reference

Detailed Description

GPTimer driver implementation for Wi-Fi F3 devices.


Overview

The GPTimer driver allows you to measure elapsed time with simple and portable APIs. It also allows for asynchronous callbacks after a certain amount of time has elapsed. In addition the driver supports APIs for both capture and compare of IO signals muxable to the four channels of each GPT peripheral instance. The channel capture functionality can be used to measure period and duty cycle of an input signal. The channel compare functionality can be used for generating PWM signals.

The GPTimer driver also handles the general purpose timer resource allocation. For each driver that requires use of a general purpose timer, it calls GPTimerWFF3_open() to occupy the specified timer, and calls GPTimerWFF3_close() to release the occupied timer resource.

GPT peripheral properties

The table below lists supported counter widths for each peripheral instance number on available device types. The timer counter clock is sourced from the internal prescaler stage which has the system clock as input. The prescaler can be configured to divide the input system clock, effectively extending the maximal time interval for the timer counter while reducing the timer resolution.

Device type GPT0 GPT1
CC35xx 32 bits 32 bits

Counter Modes

The GPTimer driver supports the following timer counter modes:

GPT peripheral features not supported by the GPTimer driver

Power Management

The power management framework will try to put the device into the most power efficient mode whenever possible. Please see the technical reference manual for further details on each power mode.

The GPTimer driver will set constraints on disallowed power modes when needed, removing the need for the application to handle this. The following statements are valid:

Accuracy

The timer clock of the GPT peripheral is dependent on the system clock.

Usage

This documentation provides some basic examples in the form of commented code fragments.


Examples

Note
The following examples are intended for reference only and are not intended for application use.

Periodic timer example

The code example below will generate an interrupt using the GPTimer every 1 ms. Note that when a count-up counter mode is used, the number of counter ticks to reach the target value equals target value + 1.

void timerCallback(GPTimerWFF3_Handle gptHandle, GPTimerWFF3_IntMask interruptMask) {
// interrupt callback code goes here. Minimize processing in interrupt.
}
void* taskFxn(void* arg) {
GPTimerWFF3_Handle gptHandle;
uint32_t counterTarget;
// Initialize parameters and assign callback function to be used
params.hwiCallbackFxn = timerCallback;
// Open driver
gptHandle = GPTimerWFF3_open(0, &params);
// Set counter target
counterTarget = 40000 - 1; // 1 ms with a counter clock of 40 MHz
GPTimerWFF3_setInitialCounterTarget(gptHandle, counterTarget, true);
// Enable counter target interrupt
// Start counter in count-up-periodic mode
// Generate counter target interrupt every 1 ms forever
while(1);
}

Output signal generation example

The code example below will generate an output signal of 32 kHz with a 50 % duty cycle on channel 2. With an up/down counter mode, the counter target value determines the signal period and the value must be set to half the number of the total counter ticks per signal period. With a channel action of toggle-on-compare, the channel compare value must be set to (counter target value)/2 in order to obtain a 50 % duty cycle of the output signal. The period of a 32 kHz signal equals 1250 counter ticks when the counter has a 40 MHz clock.

void* taskFxn(void* arg) {
GPTimerWFF3_Handle gptHandle;
uint32_t cntTargetVal = 1250/2;
uint32_t chCompVal = cntTargetVal/2;
// Configure channel 2 action
// Open driver
gptHandle = GPTimerWFF3_open(0, &params);
// Set channel output signal period
GPTimerWFF3_setInitialCounterTarget(gptHandle, cntTargetVal, false);
// Set channel output signal duty cycle
// Start the GPTimer in up-down-periodic mode
// Output signal forever
while(1);
}

Opening the GPTimerWFF3 Driver

Opening a GPTimerWFFF3 requires four steps:

  1. Create and initialize a GPTimerWFF3_Params structure.
  2. Set non-default parameter values.
  3. Call GPTimerWFF3_open(), passing the index of the timer in the GPTimerWFF3_Config structure, and the address of the GPTimerWFF3_Params structure. The timer instance is specified by the index in the GPTimerWFF3_Config structure.
  4. Verify that the timer handle returned by GPTimerWFF3_open() is non-NULL. The handle will be used to operate the timer driver instance you just opened.

Configuration

Refer to the Driver's Configuration section for driver configuration information.



#include <ti/drivers/dpl/HwiP.h>
#include <ti/drivers/Power.h>
#include <ti/drivers/GPIO.h>
#include <ti/devices/DeviceFamily.h>
#include <DeviceFamily_constructPath(inc/hw_gptimer.h)>
Include dependency graph for GPTimerWFF3.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GPTimerWFF3_ChannelProp
 GPTimerWFF3 channel dependent properties struct. More...
 
struct  GPTimerWFF3_Params
 GPTimerWFF3 Parameters. More...
 
struct  GPTimerWFF3_ChannelConf
 GPTimerWFF3 channel dependent pin configuration struct. More...
 
struct  GPTimerWFF3_HWAttrs
 GPTimerWFF3 Hardware attributes. More...
 
struct  GPTimerWFF3_Object
 GPTimerWFF3 Object. More...
 
struct  GPTimerWFF3_Config
 GPTimer Global configuration. More...
 

Macros

#define NO_OF_GPT_CHANNELS   4
 

Typedefs

typedef struct GPTimerWFF3_Config GPTimerWFF3_Config
 
typedef GPTimerWFF3_ConfigGPTimerWFF3_Handle
 
typedef uint16_t GPTimerWFF3_IntMask
 
typedef void(* GPTimerWFF3_HwiFxn) (GPTimerWFF3_Handle handle, GPTimerWFF3_IntMask interruptMask)
 The definition of a callback function used by the GPTimer driver. More...
 
typedef struct GPTimerWFF3_ChannelProp GPTimerWFF3_ChannelProp
 GPTimerWFF3 channel dependent properties struct. More...
 
typedef struct GPTimerWFF3_Params GPTimerWFF3_Params
 GPTimerWFF3 Parameters. More...
 
typedef struct GPTimerWFF3_ChannelConf GPTimerWFF3_ChannelConf
 GPTimerWFF3 channel dependent pin configuration struct. More...
 
typedef struct GPTimerWFF3_HWAttrs GPTimerWFF3_HWAttrs
 GPTimerWFF3 Hardware attributes. More...
 
typedef struct GPTimerWFF3_Object GPTimerWFF3_Object
 GPTimerWFF3 Object. More...
 

Enumerations

enum  GPTimerWFF3_ChannelNo { GPTimerWFF3_CH_NO_0 = 0, GPTimerWFF3_CH_NO_1 = 1, GPTimerWFF3_CH_NO_2 = 2, GPTimerWFF3_CH_NO_3 = 3 }
 Definitions for supported GPTimer channel numbers. More...
 
enum  GPTimerWFF3_ChannelDir { GPTimerWFF3_CH_DIR_NONE = 0, GPTimerWFF3_CH_DIR_INPUT = 1, GPTimerWFF3_CH_DIR_OUTPUT = 2 }
 Definitions for supported GPTimer channel direction. More...
 
enum  GPTimerWFF3_ChannelLevel { GPTimerWFF3_CH_LEVEL_LOW = GPTIMER_OUTCTL_CLROUT0, GPTimerWFF3_CH_LEVEL_HIGH = GPTIMER_OUTCTL_SETOUT0 }
 Definitions for supported GPTimer channel output levels. More...
 
enum  GPTimerWFF3_ChannelInputEdge { GPTimerWFF3_CH_EDGE_NONE = GPTIMER_C0CFG_EDGE_NONE, GPTimerWFF3_CH_EDGE_RISE = GPTIMER_C0CFG_EDGE_RISE, GPTimerWFF3_CH_EDGE_FALL = GPTIMER_C0CFG_EDGE_FALL, GPTimerWFF3_CH_EDGE_BOTH = GPTIMER_C0CFG_EDGE_BOTH }
 Definitions for supported GPTimer channel input edge. More...
 
enum  GPTimerWFF3_Mode { GPTimerWFF3_CTL_MODE_DIS = GPTIMER_CTL_MODE_DIS, GPTimerWFF3_CTL_MODE_UP_ONCE = GPTIMER_CTL_MODE_UP_ONCE, GPTimerWFF3_CTL_MODE_UP_PER = GPTIMER_CTL_MODE_UP_PER, GPTimerWFF3_CTL_MODE_UPDWN_PER = GPTIMER_CTL_MODE_UPDWN_PER }
 Definitions for supported GPTimer counting modes. More...
 
enum  GPTimerWFF3_Interrupt {
  GPTimerWFF3_INT_TGT = 1 << GPTIMER_RIS_TGT_S, GPTimerWFF3_INT_ZERO = 1 << GPTIMER_RIS_ZERO_S, GPTimerWFF3_INT_COUNTER_CHANGE = 1 << GPTIMER_RIS_CNTRCHNG_S, GPTimerWFF3_INT_DIR_CHANGE = 1 << GPTIMER_RIS_DIRCHNG_S,
  GPTimerWFF3_INT_CH0_CC = 1 << GPTIMER_RIS_C0CC_S, GPTimerWFF3_INT_CH1_CC = 1 << GPTIMER_RIS_C1CC_S, GPTimerWFF3_INT_CH2_CC = 1 << GPTIMER_RIS_C2CC_S, GPTimerWFF3_INT_CH3_CC = 1 << GPTIMER_RIS_C3CC_S
}
 Definitions for supported GPTimer interrupts. GPTimerWFF3_IntMask arguments should be a bit vector containing these definitions. More...
 
enum  GPTimerWFF3_DebugMode { GPTimerWFF3_DEBUG_STALL_OFF = GPTIMER_EMU_HALT_DIS, GPTimerWFF3_DEBUG_STALL_IMMEDIATE = (GPTIMER_EMU_HALT_EN | GPTIMER_EMU_CTL_IMMEDIATE), GPTimerWFF3_DEBUG_STALL_ON_ZERO = (GPTIMER_EMU_HALT_EN | GPTIMER_EMU_CTL_ZERCOND) }
 Definitions for controlling timer debug stall mode. More...
 
enum  GPTimerWFF3_ChannelCmpDir { GPTimerWFF3_CH_COMPARE_COUNTER_DIR_BOTH = GPTIMER_CTL_CMPDIR_BOTH, GPTimerWFF3_CH_COMPARE_COUNTER_DIR_UP = GPTIMER_CTL_CMPDIR_UP, GPTimerWFF3_CH_COMPARE_COUNTER_DIR_DOWN = GPTIMER_CTL_CMPDIR_DOWN }
 Definitions for which direction the timer counter must have in order to set channel compare interrupt status flag. More...
 
enum  GPTimerWFF3_ChannelAction {
  GPTimerWFF3_CH_DISABLE = GPTIMER_C0CFG_CCACT_DIS, GPTimerWFF3_CH_TOGGLE_ON_COMPARE_PERIODIC = GPTIMER_C0CFG_CCACT_TGL_ON_CMP, GPTimerWFF3_CH_TOGGLE_ON_COMPARE_ONCE = GPTIMER_C0CFG_CCACT_TGL_ON_CMP_DIS, GPTimerWFF3_CH_SET_ON_COMPARE_PERIODIC = GPTIMER_C0CFG_CCACT_SET_ON_CMP,
  GPTimerWFF3_CH_SET_ON_COMPARE_ONCE = GPTIMER_C0CFG_CCACT_SET_ON_CMP_DIS, GPTimerWFF3_CH_CLEAR_ON_COMPARE_PERIODIC = GPTIMER_C0CFG_CCACT_CLR_ON_CMP, GPTimerWFF3_CH_CLEAR_ON_COMPARE_ONCE = GPTIMER_C0CFG_CCACT_CLR_ON_CMP_DIS, GPTimerWFF3_CH_SET_ON_0_TOGGLE_ON_CMP_PERIODIC = GPTIMER_C0CFG_CCACT_SET_ON_0_TGL_ON_CMP,
  GPTimerWFF3_CH_SET_ON_0_TOGGLE_ON_COMPARE_ONCE = GPTIMER_C0CFG_CCACT_SET_ON_0_TGL_ON_CMP_DIS, GPTimerWFF3_CH_CLR_ON_0_TOGGLE_ON_COMPARE_PERIODIC = GPTIMER_C0CFG_CCACT_CLR_ON_0_TGL_ON_CMP, GPTimerWFF3_CH_CLR_ON_0_TOGGLE_ON_COMPARE_ONCE = GPTIMER_C0CFG_CCACT_CLR_ON_0_TGL_ON_CMP_DIS, GPTimerWFF3_CH_PULSE_ON_COMPARE_PERIODIC = GPTIMER_C0CFG_CCACT_PULSE_ON_CMP,
  GPTimerWFF3_CH_PULSE_ON_COMPARE_ONCE = GPTIMER_C0CFG_CCACT_PULSE_ON_CMP_DIS, GPTimerWFF3_CH_SET_ON_CAPTURE_PERIODIC = GPTIMER_C0CFG_CCACT_SET_ON_CAPT, GPTimerWFF3_CH_SET_ON_CAPTURE_ONCE = GPTIMER_C0CFG_CCACT_SET_ON_CAPT_DIS, GPTimerWFF3_CH_PULSE_WIDTH_MEASURE = GPTIMER_C0CFG_CCACT_PER_PULSE_WIDTH_MEAS
}
 Definitions for supported GPTimer channel actions. More...
 

Functions

void GPTimerWFF3_Params_init (GPTimerWFF3_Params *params)
 Function that initializes the GPTimerWFF3_Params struct to its default values. More...
 
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 configure it into specified configuration. More...
 
void GPTimerWFF3_close (GPTimerWFF3_Handle handle)
 Function that closes a GPTimer driver specified by the GPTimer handle. Closing GPTimer driver will release power dependency on timer and clear configuration. More...
 
void GPTimerWFF3_start (GPTimerWFF3_Handle handle, GPTimerWFF3_Mode mode)
 Function that starts the timer counter of the specified GPTimer handle with current settings and specified timer counter mode. More...
 
void GPTimerWFF3_stop (GPTimerWFF3_Handle handle)
 Function that stops the timer counter of the specified GPTimer driver. More...
 
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 called before the timer is started. More...
 
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. The specified target value will be valid as timer counter target on the upcoming zero crossing. When counting repeatedly upwards a zero crossing is regarded as when the timer counter restarts counting from 0. This function can be called after the timer has started. Timer counter width is 32-bits. (see GPT peripheral properties). More...
 
uint32_t GPTimerWFF3_getCounter (GPTimerWFF3_Handle handle)
 Function that returns the current timer counter value. More...
 
uintptr_t GPTimerWFF3_getArg (GPTimerWFF3_Handle handle)
 Function to get a custom argument. More...
 
void GPTimerWFF3_setArg (GPTimerWFF3_Handle handle, uintptr_t arg)
 Function to set a custom argument. More...
 
void GPTimerWFF3_enableInterrupt (GPTimerWFF3_Handle handle, GPTimerWFF3_IntMask intMask)
 Enable interrupt source for the GPTimer handle. More...
 
void GPTimerWFF3_disableInterrupt (GPTimerWFF3_Handle handle, GPTimerWFF3_IntMask intMask)
 Disable interrupt source for the GPTimer handle. More...
 
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. The compare value for the specified channel will be used by any compare type channel action GPTimerWFF3_ChannelAction specified by the GPTimer params. The channel number dependent interrupt status flag (GPTimerWFF3_INT_CH0_CC for channel number GPTimerWFF3_CH_NO_0) will be set when the timer counter equals the channel compare value. This function must be called prior to GPTimerWFF3_start(). Timer compare value width is 32 bits (see GPT peripheral properties). More...
 
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 already started timer counter. The compare value for the specified channel is valid for any compare type channel action GPTimerWFF3_ChannelAction specified by the GPTimer params. The channel number dependent interrupt status flag (GPTimerWFF3_INT_CH0_CC for channel number GPTimerWFF3_CH_NO_0) will be set when the timer counter equals the channel compare value in the next and following timer counter cycles. This function can be called while the timer is active. More...
 
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 output takes priority over automatic channel updates to the same output when occurring at the same time. The complementary channel output will be set to the complementary level of the specified level. More...
 
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 channel action for the specified channel, the function will return either the current channel compare value or the channel-updated capture value. The channel-updated capture value is returned if a successful channel capture event, as specified by the channel action, has occured on the specified channel. For a channel action of GPTimerWFF3_CH_PULSE_WIDTH_MEASURE, the returned value after a successful channel capture event, represents the measured period of the selected channel input signal. More...
 
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 channel action for the specified channel, the function will return either the current channel compare value or the channel-updated capture value. The channel-updated capture value is returned if a successful channel capture event, as specified by the channel action, has occured on the specified channel. For a channel action of GPTimerWFF3_CH_PULSE_WIDTH_MEASURE, the returned value after a successful channel capture event, represents the measured period of the selected channel input signal. More...
 
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 value. Dependent on the selected channel action for the specified channel, the function will return either the channel compare value for the next counter cycle or the channel-updated capture value. For a channel action mode of GPTimerWFF3_CH_PULSE_WIDTH_MEASURE, the returned value after a successful capture event will be the width of the low or high phase of the selected channel input signal. The phase is specified by GPTimerWFF3_ChannelInputEdge parameter for the selected channel. In order to get the channel-updated capture value for other capture channel actions than GPTimerWFF3_CH_PULSE_WIDTH_MEASURE, the function GPTimerWFF3_getChCompareVal should be used. More...
 
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 value. Dependent on the selected channel action for the specified channel, the function will return either the channel compare value for the next counter cycle or the channel-updated capture value. For a channel action mode of GPTimerWFF3_CH_PULSE_WIDTH_MEASURE, the returned value after a successful capture event will be the width of the low or high phase of the selected channel input signal. The phase is specified by GPTimerWFF3_ChannelInputEdge parameter for the selected channel. In order to get the channel-updated capture value for other capture channel actions than GPTimerWFF3_CH_PULSE_WIDTH_MEASURE, the function GPTimerWFF3_getChCompareVal() should be used. More...
 
uint32_t GPTimerWFF3_getCounterWidth (GPTimerWFF3_Handle handle)
 Function to get the width of the timer counter in number of bits. More...
 

Macro Definition Documentation

§ NO_OF_GPT_CHANNELS

#define NO_OF_GPT_CHANNELS   4

Typedef Documentation

§ GPTimerWFF3_Config

§ GPTimerWFF3_Handle

§ GPTimerWFF3_IntMask

typedef uint16_t GPTimerWFF3_IntMask

§ GPTimerWFF3_HwiFxn

typedef void(* GPTimerWFF3_HwiFxn) (GPTimerWFF3_Handle handle, GPTimerWFF3_IntMask interruptMask)

The definition of a callback function used by the GPTimer driver.

Parameters
[in]handleA GPTimer handle
[in]interruptMaskGPTimer interrupt mask

§ GPTimerWFF3_ChannelProp

GPTimerWFF3 channel dependent properties struct.

GPTimer struct used by the GPTimerWFF3_Params.

§ GPTimerWFF3_Params

GPTimerWFF3 Parameters.

GPTimer parameters are used by the GPTimerWFF3_open() call. Default values for these parameters are set using GPTimerWFF3_Params_init().

Note
The prescalerDiv parameter determines the division factor of the system clock being input to the timer counter:
  • 0x00: Divide by 1
  • 0x01: Divide by 2
  • ...
  • 0xFF: Divide by 256
The intPhaseLate parameter which determines if the GPTimerWFF3_INT_TGT and GPTimerWFF3_INT_ZERO interrupt status flags will be set early or late, is specified as follows:
  • false: Interrupt status flags are set one system clock cycle after counter = TARGET/ZERO.
  • true : Interrupt status flags are set one timer clock cycle after counter = TARGET/ZERO.

Please note that if the value of the intPhaseLate parameter is set to false while the prescalerDiv parameter value is high and either the GPTimerWFF3_INT_TGT or GPTimerWFF3_INT_ZERO interrupts are enabled, these interrupts might occur multiple times back-to-back when the interrupts are first triggered. While the counter is active, the timer will hold the state of the counter for one clock period of the timer clock before the counter gets updated. When the timer clock frequency is configured low by a high prescalerDiv parameter value, this hold time might be longer than it takes for the interrupt service routine to clear the interrupt status. This will cause a new interrupt to be immediatly generated. In order to avoid this situation, the intPhaseLate parameter value needs to be set to true. Then the interrupt will occur one timer clock cycle after the counter has reached the TARGET/ZERO value, meaning that the described hold time is reduced to 0.

See also
GPTimerWFF3_Params_init()

§ GPTimerWFF3_ChannelConf

GPTimerWFF3 channel dependent pin configuration struct.

GPTimer struct used by the GPTimerWFF3_HWAttrs.

§ GPTimerWFF3_HWAttrs

GPTimerWFF3 Hardware attributes.

These fields are used by the driver to set up underlying GPTimer driver statically. A sample structure is shown below making use of channel 2 in GPTIMER1:

// GPTimer hardware attributes, one per supported GPT peripheral
const GPTimerWFF3_HWAttrs GPTimerWFF3HWAttrs[] = {
{
.baseAddr = GPTIMER1_BASE,
.intNum = INT_GPTIMER_1,
.intPriority = (~0),
.channelConfig[0] = {
},
.channelConfig[1] = {
},
.channelConfig[2] = {
.pin = CONFIG_GPIO_GPTIMER_1_CH2,
.pinMux = 9,
},
.channelConfig[3] = {
},
},
};

§ GPTimerWFF3_Object

GPTimerWFF3 Object.

These fields are used by the driver to store and modify GPTimer configuration during run-time. The application must not edit any member variables of this structure. Appplications should also not access member variables of this structure as backwards compatibility is not guaranteed. An example structure is shown below:

// GPTimer objects, one per GPT peripheral (GPTIMER0, GPTIMER1..)
GPTimerWFF3_Object GPTimerWFF3Objects[];

Enumeration Type Documentation

§ GPTimerWFF3_ChannelNo

Definitions for supported GPTimer channel numbers.

Enumerator
GPTimerWFF3_CH_NO_0 
GPTimerWFF3_CH_NO_1 
GPTimerWFF3_CH_NO_2 
GPTimerWFF3_CH_NO_3 

§ GPTimerWFF3_ChannelDir

Definitions for supported GPTimer channel direction.

Enumerator
GPTimerWFF3_CH_DIR_NONE 
GPTimerWFF3_CH_DIR_INPUT 
GPTimerWFF3_CH_DIR_OUTPUT 

§ GPTimerWFF3_ChannelLevel

Definitions for supported GPTimer channel output levels.

Enumerator
GPTimerWFF3_CH_LEVEL_LOW 
GPTimerWFF3_CH_LEVEL_HIGH 

§ GPTimerWFF3_ChannelInputEdge

Definitions for supported GPTimer channel input edge.

Enumerator
GPTimerWFF3_CH_EDGE_NONE 
GPTimerWFF3_CH_EDGE_RISE 
GPTimerWFF3_CH_EDGE_FALL 
GPTimerWFF3_CH_EDGE_BOTH 

§ GPTimerWFF3_Mode

Definitions for supported GPTimer counting modes.

Enumerator
GPTimerWFF3_CTL_MODE_DIS 

Disable timer. Updates to counter and events are stopped.

GPTimerWFF3_CTL_MODE_UP_ONCE 

Count up one-shot. The timer increments from 0 to target value, then stops and sets MODE to GPTimerWFF3_CTL_MODE_DIS.

GPTimerWFF3_CTL_MODE_UP_PER 

Count up periodically. The timer increments from 0 to target value, repeatedly.

GPTimerWFF3_CTL_MODE_UPDWN_PER 

Count up and down periodically. The timer counts from 0 to target value and back to 0, repeatedly.

§ GPTimerWFF3_Interrupt

Definitions for supported GPTimer interrupts. GPTimerWFF3_IntMask arguments should be a bit vector containing these definitions.

Enumerator
GPTimerWFF3_INT_TGT 

Timer counter target interrupt

GPTimerWFF3_INT_ZERO 

Timer counter zero interrupt

GPTimerWFF3_INT_COUNTER_CHANGE 

Timer counter increment/decrement interrupt

GPTimerWFF3_INT_DIR_CHANGE 

Timer counter direction change interrupt

GPTimerWFF3_INT_CH0_CC 

Channel 0 capture or compare interrupt

GPTimerWFF3_INT_CH1_CC 

Channel 1 capture or compare interrupt

GPTimerWFF3_INT_CH2_CC 

Channel 2 capture or compare interrupt

GPTimerWFF3_INT_CH3_CC 

Channel 3 capture or compare interrupt

§ GPTimerWFF3_DebugMode

Definitions for controlling timer debug stall mode.

Enumerator
GPTimerWFF3_DEBUG_STALL_OFF 

The GPT is not halted when CPU is halted in debug

GPTimerWFF3_DEBUG_STALL_IMMEDIATE 

Halt GPT immediatly when CPU is halted in debug

GPTimerWFF3_DEBUG_STALL_ON_ZERO 

Halt GPT when counter equals 0 while CPU is halted in debug

§ GPTimerWFF3_ChannelCmpDir

Definitions for which direction the timer counter must have in order to set channel compare interrupt status flag.

Enumerator
GPTimerWFF3_CH_COMPARE_COUNTER_DIR_BOTH 

Channel compare interrupt status flag is set on up count and down count.

GPTimerWFF3_CH_COMPARE_COUNTER_DIR_UP 

Channel compare interrupt status flag is only set on up count

GPTimerWFF3_CH_COMPARE_COUNTER_DIR_DOWN 

Channel compare interrupt status flag is only set on down count

§ GPTimerWFF3_ChannelAction

Definitions for supported GPTimer channel actions.

Enumerator
GPTimerWFF3_CH_DISABLE 

Channel disabled

GPTimerWFF3_CH_TOGGLE_ON_COMPARE_PERIODIC 

Toggle on compare repeatedly.

Toggle channel output when the timer counter equals the compare value set by either GPTimerWFF3_setInitialChannelCompVal() or GPTimerWFF3_setNextChannelCompVal().

GPTimerWFF3_CH_TOGGLE_ON_COMPARE_ONCE 

Toggle on compare, and then disable channel.

Toggle channel output when the timer counter equals the compare value set by GPTimerWFF3_setInitialChannelCompVal().

GPTimerWFF3_CH_SET_ON_COMPARE_PERIODIC 

Set on compare repeatedly.

Set channel output when the timer counter equals the compare value set by either GPTimerWFF3_setInitialChannelCompVal() or GPTimerWFF3_setNextChannelCompVal().

GPTimerWFF3_CH_SET_ON_COMPARE_ONCE 

Set on compare, and then disable channel.

Set channel output when the timer counter equals the compare value set by GPTimerWFF3_setInitialChannelCompVal().

GPTimerWFF3_CH_CLEAR_ON_COMPARE_PERIODIC 

Clear on compare repeatedly.

Clear channel output when the timer counter equals the compare value set by either GPTimerWFF3_setInitialChannelCompVal() or GPTimerWFF3_setNextChannelCompVal().

GPTimerWFF3_CH_CLEAR_ON_COMPARE_ONCE 

Clear on compare, and then disable channel.

Clear channel output when the timer counter equals the compare value set by GPTimerWFF3_setInitialChannelCompVal().

GPTimerWFF3_CH_SET_ON_0_TOGGLE_ON_CMP_PERIODIC 

Set on zero, toggle on compare repeatedly.

Set channel output when timer counter value equals zero. Toggle channel output when the timer counter equals the compare value set by either GPTimerWFF3_setInitialChannelCompVal() or GPTimerWFF3_setNextChannelCompVal().

GPTimerWFF3_CH_SET_ON_0_TOGGLE_ON_COMPARE_ONCE 

Set on zero, toggle on compare, and then disable channel.

Set channel output when timer counter equals zero. Toggle channel output when the timer counter equals the compare value set by GPTimerWFF3_setInitialChannelCompVal().

GPTimerWFF3_CH_CLR_ON_0_TOGGLE_ON_COMPARE_PERIODIC 

Clear on zero, toggle on compare repeatedly.

Clear channel output when timer counter equals zero. Toggle channel output when the timer counter equals the compare value set by either GPTimerWFF3_setInitialChannelCompVal() or GPTimerWFF3_setNextChannelCompVal().

GPTimerWFF3_CH_CLR_ON_0_TOGGLE_ON_COMPARE_ONCE 

Clear on zero, toggle on compare, and then disable channel.

Clear channel output when timer counter equals zero. Toggle channel output when the timer counter equals the compare value set by GPTimerWFF3_setInitialChannelCompVal().

GPTimerWFF3_CH_PULSE_ON_COMPARE_PERIODIC 

Pulse on compare repeatedly.

Pulse channel output when the timer counter equals the compare value set by either GPTimerWFF3_setInitialChannelCompVal() or GPTimerWFF3_setNextChannelCompVal(). The channel output is high for two timer clock periods.

GPTimerWFF3_CH_PULSE_ON_COMPARE_ONCE 

Pulse on compare, and then disable channel.

Pulse channel output when the timer counter equals the compare value set by GPTimerWFF3_setInitialChannelCompVal(). The channel output is high for two timer clock periods.

GPTimerWFF3_CH_SET_ON_CAPTURE_PERIODIC 

Set on capture repeatedly.

The channel number dependent interrupt status flag (GPTimerWFF3_INT_CH0_CC for channel number GPTimerWFF3_CH_NO_0) will be set when the signal edge selected by the chxInputEdge element in the GPTimerWFF3_Params structure, is detected on the channel input signal.

GPTimerWFF3_CH_SET_ON_CAPTURE_ONCE 

Set on capture, and then disable channel.

The channel number dependent interrupt status flag (GPTimerWFF3_INT_CH0_CC for channel number GPTimerWFF3_CH_NO_0) will be set when the signal edge selected by the ch<x>InputEdge element in the GPTimerWFF3_Params structure, is detected on the channel input signal.

GPTimerWFF3_CH_PULSE_WIDTH_MEASURE 

Period and pulse width measurement.

Continuously capture period and pulse width of the channel input signal relative to the signal edge selected by the ch<x>InputEdge element in the GPTimerWFF3_Params structure. The channel number dependent interrupt status flag (GPTimerWFF3_INT_CH0_CC for channel number GPTimerWFF3_CH_NO_0) will be set when the signal period and pulse width have been captured. The period and pulse width are reported in numbers of counter ticks. The GPTimerWFF3_getChCompareVal() function returns the measured period and the GPTimerWFF3_getNextChCompareVal() functions returns the measured pulse width.

Note
Note that when selecting this channel action, GPTimerWFF3_start() function must be called with either GPTimerWFF3_CTL_MODE_UP_ONCE or GPTimerWFF3_CTL_MODE_UP_PER as function argument.
Note that the timer counter restarts regularly when this action is used, so other channel actions must be chosen with this in mind. The timer counter restarts when the period of the channel input signal has been captured.
If multiple channels are configured with this channel action, the measurements are not performed simultaneously on the channels. The measurements are done in a time-interleaved manner between the channels.

Signal property requirements for this channel action:

  • Signal Period >= 2 * (1 + params.prescalerDiv) * system clock period.
  • Signal Period <= MAX(timer counter) * (1 + params.prescalerDiv) * system clock period.
  • Signal low and high phase >= (1 + params.prescalerDiv) * system clock period.

Function Documentation

§ GPTimerWFF3_Params_init()

void GPTimerWFF3_Params_init ( GPTimerWFF3_Params params)

Function that initializes the GPTimerWFF3_Params struct to its default values.

Parameters
[in]paramsAn pointer to GPTimerWFF3_Params structure for initialization

Default values:

Parameter Default value
Interrupt callback fxn NULL
Interrupt phase late true
Prescaler division 0
Timer debug stall mode GPTimerWFF3_DEBUG_STALL_OFF
Counter dir ch cmp GPTimerWFF3_CH_COMPARE_COUNTER_DIR_BOTH
Channel 0 action GPTimerWFF3_CH_DISABLE
Channel 0 input edge GPTimerWFF3_CH_EDGE_NONE
Channel 1 action GPTimerWFF3_CH_DISABLE
Channel 1 input edge GPTimerWFF3_CH_EDGE_NONE
Channel 2 action GPTimerWFF3_CH_DISABLE
Channel 2 input edge GPTimerWFF3_CH_EDGE_NONE
Channel 3 action GPTimerWFF3_CH_DISABLE
Channel 3 input edge GPTimerWFF3_CH_EDGE_NONE

§ GPTimerWFF3_open()

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 configure it into specified configuration.

Parameters
[in]indexIndex in the GPTimerWFF3_config table.
[in]paramsPointer to a parameter block. If NULL, it will use default values.
Returns
A GPTimerWFF3_Handle on success or NULL on an error or if it has been opened already. If NULL is returned, further GPTimerWFF3 API calls will result in undefined behaviour.
See also
GPTimerWFF3_close()

§ GPTimerWFF3_close()

void GPTimerWFF3_close ( GPTimerWFF3_Handle  handle)

Function that closes a GPTimer driver specified by the GPTimer handle. Closing GPTimer driver will release power dependency on timer and clear configuration.

Precondition
GPTimerWFF3_open() has to be called first.
GPTimerWFF3_stop() should to be called first if GPTimer is started.
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
See also
GPTimerWFF3_open()
GPTimerWFF3_start()
GPTimerWFF3_stop()

§ GPTimerWFF3_start()

void GPTimerWFF3_start ( GPTimerWFF3_Handle  handle,
GPTimerWFF3_Mode  mode 
)

Function that starts the timer counter of the specified GPTimer handle with current settings and specified timer counter mode.

Note
When signal measurement (GPTimerWFF3_CH_PULSE_WIDTH_MEASURE) has been selected for one or more channels, the value of mode must be either GPTimerWFF3_CTL_MODE_UP_ONCE or GPTimerWFF3_CTL_MODE_UP_PER.
Precondition
GPTimerWFF3_open() has to be called first successfully.
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open().
[in]modeThe timer counter mode.
Postcondition
GPTimerWFF3_stop()

§ GPTimerWFF3_stop()

void GPTimerWFF3_stop ( GPTimerWFF3_Handle  handle)

Function that stops the timer counter of the specified GPTimer driver.

Precondition
GPTimerWFF3_open() has to be called first successfully.
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
See also
GPTimerWFF3_open()
GPTimerWFF3_start()

§ GPTimerWFF3_setInitialCounterTarget()

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 called before the timer is started.

Precondition
GPTimerWFF3_open() has to be called first successfully
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
[in]valueInitial target value of the timer counter. Max value: GPT peripheral properties The number of counter ticks required to reach target value is value + 1. Note that if either GPTimerWFF3_CTL_MODE_UP_ONCE or GPTimerWFF3_CTL_MODE_UP_PER counter modes are used for generating a PWM signal, the signal period equals value + 1. Note that if GPTimerWFF3_CTL_MODE_UPDWN_PER counter mode is used for generating a PWM signal, the signal period equals value * 2.
[in]intFlagClrControls if the GPTimerWFF3_INT_TGT and GPTimerWFF3_INT_ZERO interrupt status flags are cleared or not when this function is executed.
See also
GPTimerWFF3_open()
GPTimerWFF3_start()

§ GPTimerWFF3_setNextCounterTarget()

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. The specified target value will be valid as timer counter target on the upcoming zero crossing. When counting repeatedly upwards a zero crossing is regarded as when the timer counter restarts counting from 0. This function can be called after the timer has started. Timer counter width is 32-bits. (see GPT peripheral properties).

Precondition
GPTimerWFF3_open() has to be called first successfully
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
[in]valueNext target value of the timer counter. Max value: GPT peripheral properties The number of counter ticks required to reach target value on the next counter period is value + 1. Note that if either GPTimerWFF3_CTL_MODE_UP_ONCE or GPTimerWFF3_CTL_MODE_UP_PER counter modes are used for generating a PWM signal, the signal period equals value + 1. Note that if GPTimerWFF3_CTL_MODE_UPDWN_PER counter mode is used for generating a PWM signal, the signal period equals value * 2.
[in]intFlagClrControls if the GPTimerWFF3_INT_TGT and GPTimerWFF3_INT_ZERO interrupt status flags are cleared or not when this function is executed.
See also
GPTimerWFF3_open()
GPTimerWFF3_start()

§ GPTimerWFF3_getCounter()

uint32_t GPTimerWFF3_getCounter ( GPTimerWFF3_Handle  handle)

Function that returns the current timer counter value.

Precondition
GPTimerWFF3_open() has to be called first successfully
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
Returns
The current timer counter value
See also
GPTimerWFF3_open()

§ GPTimerWFF3_getArg()

uintptr_t GPTimerWFF3_getArg ( GPTimerWFF3_Handle  handle)

Function to get a custom argument.

Precondition
GPTimerWFF3_open() has to be called first successfully
GPTimerWFF3_setArg() has to be called first
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
Returns
The custom argument
See also
GPTimerWFF3_setArg()
GPTimerWFF3_open()

§ GPTimerWFF3_setArg()

void GPTimerWFF3_setArg ( GPTimerWFF3_Handle  handle,
uintptr_t  arg 
)

Function to set a custom argument.

Precondition
GPTimerWFF3_open() has to be called first successfully
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
[in]argCustom argument
See also
GPTimerWFF3_getArg()
GPTimerWFF3_open()

§ GPTimerWFF3_enableInterrupt()

void GPTimerWFF3_enableInterrupt ( GPTimerWFF3_Handle  handle,
GPTimerWFF3_IntMask  intMask 
)

Enable interrupt source for the GPTimer handle.

Precondition
GPTimerWFF3_open() has to be called first successfully
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
[in]intMaskA bit mask of interrupt flags to enable

§ GPTimerWFF3_disableInterrupt()

void GPTimerWFF3_disableInterrupt ( GPTimerWFF3_Handle  handle,
GPTimerWFF3_IntMask  intMask 
)

Disable interrupt source for the GPTimer handle.

Precondition
GPTimerWFF3_open() has to be called first successfully
GPTimerWFF3_enableInterrupt() has to be called first
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
[in]intMaskA bit mask of interrupt flags to disable

§ GPTimerWFF3_setInitialChannelCompVal()

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. The compare value for the specified channel will be used by any compare type channel action GPTimerWFF3_ChannelAction specified by the GPTimer params. The channel number dependent interrupt status flag (GPTimerWFF3_INT_CH0_CC for channel number GPTimerWFF3_CH_NO_0) will be set when the timer counter equals the channel compare value. This function must be called prior to GPTimerWFF3_start(). Timer compare value width is 32 bits (see GPT peripheral properties).

Precondition
GPTimerWFF3_open() has to be called first successfully
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
[in]chNoChannel number
[in]valueChannel compare value for specified channel number
[in]intFlagClrControls if the channel number dependent compare/capture interrupt status flag is cleared or not when this function is executed.
See also
GPTimerWFF3_open()

§ GPTimerWFF3_setNextChannelCompVal()

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 already started timer counter. The compare value for the specified channel is valid for any compare type channel action GPTimerWFF3_ChannelAction specified by the GPTimer params. The channel number dependent interrupt status flag (GPTimerWFF3_INT_CH0_CC for channel number GPTimerWFF3_CH_NO_0) will be set when the timer counter equals the channel compare value in the next and following timer counter cycles. This function can be called while the timer is active.

Precondition
GPTimerWFF3_open() has to be called first successfully
GPTimerWFF3_setInitialChannelCompVal() has to be called first successfully
GPTimerWFF3_start() has to be called first successfully
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
[in]chNoChannel number
[in]valueChannel compare value for specified channel number. Width value is 32 bits (see GPT peripheral properties).
[in]intFlagClrControls if the channel number dependent compare/capture interrupt status flag is cleared or not when this function is executed.
See also
GPTimerWFF3_open()
GPTimerWFF3_setInitialChannelCompVal()

§ GPTimerWFF3_setChannelOutputLevel()

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 output takes priority over automatic channel updates to the same output when occurring at the same time. The complementary channel output will be set to the complementary level of the specified level.

Precondition
GPTimerWFF3_open() has to be called first successfully
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
[in]chNoChannel number
[in]levelChannel level for specified channel number
See also
GPTimerWFF3_open()

§ GPTimerWFF3_getChCompareVal()

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 channel action for the specified channel, the function will return either the current channel compare value or the channel-updated capture value. The channel-updated capture value is returned if a successful channel capture event, as specified by the channel action, has occured on the specified channel. For a channel action of GPTimerWFF3_CH_PULSE_WIDTH_MEASURE, the returned value after a successful channel capture event, represents the measured period of the selected channel input signal.

Precondition
GPTimerWFF3_open() has to be called first successfully
GPTimerWFF3_setInitialChannelCompVal() has to be called first when channel compare action type is used.
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
[in]chNoChannel number
Returns
The compare value or input signal pulse width
See also
GPTimerWFF3_open()
GPTimerWFF3_setInitialChannelCompVal()

§ GPTimerWFF3_getChCaptureVal()

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 channel action for the specified channel, the function will return either the current channel compare value or the channel-updated capture value. The channel-updated capture value is returned if a successful channel capture event, as specified by the channel action, has occured on the specified channel. For a channel action of GPTimerWFF3_CH_PULSE_WIDTH_MEASURE, the returned value after a successful channel capture event, represents the measured period of the selected channel input signal.

Precondition
GPTimerWFF3_open() has to be called first successfully
GPTimerWFF3_setInitialChannelCompVal() has to be called first when channel compare action type is used.
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
[in]chNoChannel number
Returns
The compare value or input signal pulse width
See also
GPTimerWFF3_open()
GPTimerWFF3_setInitialChannelCompVal()

§ GPTimerWFF3_getNextChCompareVal()

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 value. Dependent on the selected channel action for the specified channel, the function will return either the channel compare value for the next counter cycle or the channel-updated capture value. For a channel action mode of GPTimerWFF3_CH_PULSE_WIDTH_MEASURE, the returned value after a successful capture event will be the width of the low or high phase of the selected channel input signal. The phase is specified by GPTimerWFF3_ChannelInputEdge parameter for the selected channel. In order to get the channel-updated capture value for other capture channel actions than GPTimerWFF3_CH_PULSE_WIDTH_MEASURE, the function GPTimerWFF3_getChCompareVal should be used.

Precondition
GPTimerWFF3_open() has to be called first successfully
GPTimerWFF3_setInitialChannelCompVal() has to be called first when channel compare action type is used.
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
[in]chNoChannel number
Returns
The custom argument
See also
GPTimerWFF3_open()
GPTimerWFF3_setInitialChannelCompVal()

§ GPTimerWFF3_getNextChCaptureVal()

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 value. Dependent on the selected channel action for the specified channel, the function will return either the channel compare value for the next counter cycle or the channel-updated capture value. For a channel action mode of GPTimerWFF3_CH_PULSE_WIDTH_MEASURE, the returned value after a successful capture event will be the width of the low or high phase of the selected channel input signal. The phase is specified by GPTimerWFF3_ChannelInputEdge parameter for the selected channel. In order to get the channel-updated capture value for other capture channel actions than GPTimerWFF3_CH_PULSE_WIDTH_MEASURE, the function GPTimerWFF3_getChCompareVal() should be used.

Precondition
GPTimerWFF3_open() has to be called first successfully
GPTimerWFF3_setInitialChannelCompVal() has to be called first when channel compare action type is used.
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
[in]chNoChannel number
Returns
The custom argument
See also
GPTimerWFF3_open()
GPTimerWFF3_setInitialChannelCompVal()

§ GPTimerWFF3_getCounterWidth()

uint32_t GPTimerWFF3_getCounterWidth ( GPTimerWFF3_Handle  handle)

Function to get the width of the timer counter in number of bits.

Precondition
GPTimerWFF3_open() has to be called first successfully
Parameters
[in]handleA GPTimerWFF3_Handle returned from GPTimerWFF3_open()
Returns
The timer counter width in number of bits
See also
GPTimerWFF3_open()
© Copyright 1995-2026, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale