![]() |
![]() |
TI-RTOS Drivers
tidrivers_full_2_20_01_10
|
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.
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.
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 struct PWMTimerCC3200_HWAttrsV1 PWMTimerCC3200_HWAttrsV1 |
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:
A sample structure is shown below:
typedef struct PWMTimerCC3200_Object PWMTimerCC3200_Object |
PWMTimerCC3200 Object.
The application must not access any member variables of this structure!
const PWM_FxnTable PWMTimerCC3200_fxnTable |