![]() |
![]() |
TI-RTOS Drivers
tidrivers_full_2_20_01_10
|
PWM driver implementation using Tiva 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 Tiva 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 or 120 MHz). So each timer tick is 12.5 ns or 8.3 ns respectively. 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 ((2^24) - 1) timer counts; 209715 microseconds @ 80 MHz or 139810 microseconds @ 120 MHz. Updates to a PWM's period or duty will occur instantaneously (GPT peripherals do not have shadow registers).
Go to the source code of this file.
Data Structures | |
struct | PWMTimerTiva_HWAttrsV1 |
PWMTimerTiva Hardware attributes. More... | |
struct | PWMTimerTiva_Object |
PWMTimerTiva Object. More... | |
Typedefs | |
typedef struct PWMTimerTiva_HWAttrsV1 | PWMTimerTiva_HWAttrsV1 |
PWMTimerTiva Hardware attributes. More... | |
typedef struct PWMTimerTiva_Object | PWMTimerTiva_Object |
PWMTimerTiva Object. More... | |
Variables | |
const PWM_FxnTable | PWMTimerTiva_fxnTable |
typedef struct PWMTimerTiva_HWAttrsV1 PWMTimerTiva_HWAttrsV1 |
PWMTimerTiva Hardware attributes.
These fields are used by driverlib APIs and therefore must be populated by driverlib macro definitions. For TivaWare these definitions are found in:
A sample structure is shown below:
typedef struct PWMTimerTiva_Object PWMTimerTiva_Object |
PWMTimerTiva Object.
The application must not access any member variables of this structure!
const PWM_FxnTable PWMTimerTiva_fxnTable |