TI-RTOS Drivers  tidrivers_full_2_20_00_08
Data Structures | Typedefs | Variables
PWMTimerCC3200.h File Reference

Detailed Description

PWM driver implementation using CC3200 General Purpose Timers.

============================================================================

The PWM header file should be included in an application as follows:

Refer to PWM.h for a complete description of APIs & example of use.

Operation

This driver configures a CC3200 General Purpose Timer (GPT) in PWM mode. When in PWM mode, each GPT is divided into 2 PWM outputs. This driver manages each output as an independent PWM instance. The timer is automatically configured in count-down mode using the system clock as the source.

The timers operate at the system clock frequency (80 MHz). So each timer tick is 12.5 ns. The period and duty registers are 16 bits wide; thus 8-bit prescalars are used to extend period and duty registers. The maximum value supported is 16777215 timer counts ((2^24) - 1) or 209715 microseconds. Updates to a PWM's period or duty will occur instantaneously (GPT peripherals do not have shadow registers).

Finally, when this driver is opened, it automatically changes the PWM pin's parking configuration (used when entering low power modes) to correspond with the PWM_IDLE_LEVEL set in the PWM_params. However, this is setting is not reverted once the driver is close, it is the users responsibility to change the parking configuration if necessary.


#include <stdbool.h>
#include <ti/drivers/PWM.h>
Include dependency graph for PWMTimerCC3200.h:

Go to the source code of this file.

Data Structures

struct  PWMTimerCC3200_HWAttrsV1
 PWMTimerCC3200 Hardware attributes. More...
 
struct  PWMTimerCC3200_Object
 PWMTimerCC3200 Object. More...
 

Typedefs

typedef struct PWMTimerCC3200_HWAttrsV1 PWMTimerCC3200_HWAttrsV1
 PWMTimerCC3200 Hardware attributes. More...
 
typedef struct PWMTimerCC3200_Object PWMTimerCC3200_Object
 PWMTimerCC3200 Object. More...
 

Variables

const PWM_FxnTable PWMTimerCC3200_fxnTable
 

Typedef Documentation

PWMTimerCC3200 Hardware attributes.

These fields are used by CC3200 driverlib APIs and therefore must be populated by driverlib macro definitions. For CC3200 driverlib these definitions are found in:

  • inc/hw_memmap.h
  • driverlib/gpio.h
  • driverlib/pin.h
  • driverlib/timer.h

A sample structure is shown below:

1 const PWMTimerCC3200_HWAttrsV1 pwmTimerCC3200HWAttrs[] = {
2  {
3  .timerBaseAddr = TIMERA3_BASE,
4  .halfTimer = TIMER_A,
5  .pinTimerPwmMode = PIN_MODE_3,
6  .pinId = PIN_01,
7  .gpioBaseAddr = GPIOA1_BASE,
8  .gpioPinIndex = GPIO_PIN_2
9  },
10  {
11  .timerBaseAddr = TIMERA3_BASE,
12  .halfTimer = TIMER_B,
13  .pinTimerPwmMode = PIN_MODE_3,
14  .pinId = PIN_02,
15  .gpioBaseAddr = GPIOA1_BASE,
16  .gpioPinIndex = GPIO_PIN_3
17  }
18 };

PWMTimerCC3200 Object.

The application must not access any member variables of this structure!

Variable Documentation

const PWM_FxnTable PWMTimerCC3200_fxnTable
Copyright 2016, Texas Instruments Incorporated