 |
AM243x MCU+ SDK
11.00.00
|
|
Go to the documentation of this file.
74 #define GPTIMER_MODE_CONFIG_FREE_RUN ((uint8_t) 0U)
76 #define GPTIMER_MODE_CONFIG_INPUT_CAPTURE ((uint8_t) 1U)
78 #define GPTIMER_MODE_CONFIG_OUTPUT_COMPARE ((uint8_t) 2U)
80 #define GPTIMER_MODE_CONFIG_PWM_GEN ((uint8_t) 3U)
91 #define GPTIMER_INPUT_CAPTURE_MODE_SINGLE ((uint32_t) 0U)
93 #define GPTIMER_INPUT_CAPTURE_MODE_SECOND ((uint32_t) 1U)
104 #define GPTIMER_INPUT_CAPTURE_EVENT_NO_CAPTURE ((uint32_t) 0U)
106 #define GPTIMER_INPUT_CAPTURE_EVENT_RISING ((uint32_t) 1U)
108 #define GPTIMER_INPUT_CAPTURE_EVENT_FALLING ((uint32_t) 2U)
110 #define GPTIMER_INPUT_CAPTURE_EVENT_EDGE ((uint32_t) 3U)
121 #define GPTIMER_PWM_OUT_NO_TRIGGER ((uint32_t) 0U)
123 #define GPTIMER_PWM_OUT_OVERFLOW_TRIGGER ((uint32_t) 1U)
125 #define GPTIMER_PWM_OUT_OVERFLOW_MATCH_TRIGGER ((uint32_t) 2U)
136 #define GPTIMER_PWM_OUT_PIN_DEFAULT_0 ((uint32_t) 0U)
138 #define GPTIMER_PWM_OUT_PIN_DEFAULT_1 ((uint32_t) 1U)
153 #define GPTIMER_PWM_OUT_PIN_MODULATION_PULSE ((uint32_t) 0U)
155 #define GPTIMER_PWM_OUT_PIN_MODULATION_TOGGLE ((uint32_t) 1U)
165 #define TIMER_IRQ_TCAR_IT_FLAG_MASK (uint32_t)0x04U
166 #define TIMER_IRQ_OVF_IT_FLAG_MASK (uint32_t)0x02U
167 #define TIMER_IRQ_MAT_IT_FLAG_MASK (uint32_t)0x01U
230 typedef struct GPTIMER_HwAttrs_s {
253 typedef struct GPTIMER_Params_s {
273 typedef struct GPTIMER_Compare_Config_s
283 typedef struct GPTIMER_Capture_Config_s
295 typedef struct GPTIMER_PWM_Config_s
311 typedef struct GPTIMER_Object_s
357 typedef struct GPTIMER_Config_s {
476 uint32_t timerConfigMode,
void *config);
void GPTIMER_stop(GPTIMER_Handle handle)
Stop the TImer.
void GPTIMER_clearIRQStatus(GPTIMER_Handle handle, uint32_t irqMask)
Clear IRQ status bit.
int32_t GPTIMER_setTimerConfigMode(GPTIMER_Handle handle, uint32_t timerConfigMode, void *config)
Change Timer Configuration.
void GPTIMER_init(void)
Initialize the GPTIMER module.
GPTIMER Global Configuration.
Definition: gp_timer/v0/gp_timer.h:357
void GPTIMER_setCallbackFxn(GPTIMER_Handle handle, GPTIMER_OverflowCallbackFxn overflowCbFxn, GPTIMER_CompareMatchCallbackFxn compMatchCbFxn, GPTIMER_CaptureCallbackFxn captureCbFxn)
Update Callback Functions.
bool enableIntr
Definition: gp_timer/v0/gp_timer.h:241
GPTIMER_PWM_Config pwmConfig
Definition: gp_timer/v0/gp_timer.h:333
bool isOpen
Definition: gp_timer/v0/gp_timer.h:318
uint32_t intNum
Definition: gp_timer/v0/gp_timer.h:235
uint8_t timerConfigMode
Definition: gp_timer/v0/gp_timer.h:327
void GPTIMER_setCount(GPTIMER_Handle handle, uint32_t value)
Set timer counter value.
uint32_t defaultPWMOutSetting
Definition: gp_timer/v0/gp_timer.h:300
struct GPTIMER_Config_s * GPTIMER_Handle
A handle that is returned from a GPTIMER_open() call.
Definition: gp_timer/v0/gp_timer.h:178
HwiP_Object hwiObj
Definition: gp_timer/v0/gp_timer.h:316
SemaphoreP_Object mutex
Definition: gp_timer/v0/gp_timer.h:314
uint32_t captureEventMode
Definition: gp_timer/v0/gp_timer.h:288
void(* GPTIMER_OverflowCallbackFxn)(GPTIMER_Handle handle)
GPTIMER Overflow Callback Function.
Definition: gp_timer/v0/gp_timer.h:195
void GPTIMER_start(GPTIMER_Handle handle)
Start the Timer.
uint32_t captureMode
Definition: gp_timer/v0/gp_timer.h:286
uint32_t outputModulationType
Definition: gp_timer/v0/gp_timer.h:304
uint32_t cntCompareValComp
Definition: gp_timer/v0/gp_timer.h:276
bool oneShotMode
Definition: gp_timer/v0/gp_timer.h:260
uint32_t GPTIMER_getTimerCaptureVal1(GPTIMER_Handle handle)
Get Timer Capture Value 1.
void GPTIMER_deinit(void)
De-initialize the GPTIMER module.
GPTIMER_Compare_Config compareConfig
Definition: gp_timer/v0/gp_timer.h:329
uint32_t overflowMaskCount
Definition: gp_timer/v0/gp_timer.h:264
uint16_t eventId
Definition: gp_timer/v0/gp_timer.h:237
uint32_t value
Definition: tisci_otp_revision.h:2
GPTIMER_CompareMatchCallbackFxn compareMatchCallbackFunction
Definition: gp_timer/v0/gp_timer.h:342
GPTIMER_CaptureCallbackFxn captureCallbackFunction
Definition: gp_timer/v0/gp_timer.h:344
bool enablePrescaler
Definition: gp_timer/v0/gp_timer.h:256
void GPTIMER_Params_init(GPTIMER_Params *params)
Function to set default values of GPTIMER_Params in params.
uint32_t trigOutputPWMMode
Definition: gp_timer/v0/gp_timer.h:298
GPTIMER Compare Mode Configuration Parameters.
Definition: gp_timer/v0/gp_timer.h:274
GPTIMER_HwAttrs const * hwAttrs
Definition: gp_timer/v0/gp_timer.h:361
uint32_t GPTIMER_getCount(GPTIMER_Handle handle)
Get timer counter value.
uint8_t intrPriority
Definition: gp_timer/v0/gp_timer.h:243
uint32_t GPTIMER_getIRQStatus(GPTIMER_Handle handle)
Get IRQ status.
uint32_t cntPrescaler
Definition: gp_timer/v0/gp_timer.h:258
void GPTIMER_setCompareVal(GPTIMER_Handle handle, uint32_t value)
Set timer compare value.
GPTIMER_OverflowCallbackFxn overflowCallbackFunction
Definition: gp_timer/v0/gp_timer.h:340
void(* GPTIMER_CaptureCallbackFxn)(GPTIMER_Handle handle)
GPTIMER Capture Callback Function.
Definition: gp_timer/v0/gp_timer.h:221
GPTIMER_Params gptimerParams
Definition: gp_timer/v0/gp_timer.h:320
GPTIMER Parameters.
Definition: gp_timer/v0/gp_timer.h:253
GPTIMER Capture Mode Configuration Parameters.
Definition: gp_timer/v0/gp_timer.h:284
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:93
GPTIMER driver object.
Definition: gp_timer/v0/gp_timer.h:312
void GPTIMER_disableInterruptStatus(GPTIMER_Handle handle, uint32_t irqMask)
Disable IRQ Status.
void(* GPTIMER_CompareMatchCallbackFxn)(GPTIMER_Handle handle)
GPTIMER Compare Match Callback Function.
Definition: gp_timer/v0/gp_timer.h:208
GPTIMER_Object * object
Definition: gp_timer/v0/gp_timer.h:359
uint32_t counterInitVal
Definition: gp_timer/v0/gp_timer.h:266
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
GPTIMER PWM Generation Mode Configuration Parameters.
Definition: gp_timer/v0/gp_timer.h:296
uint32_t cntReloadVal
Definition: gp_timer/v0/gp_timer.h:262
uint32_t inputClk
Definition: gp_timer/v0/gp_timer.h:239
uint32_t GPTIMER_getTimerCaptureVal2(GPTIMER_Handle handle)
Get Timer Capture Value 2.
void GPTIMER_close(GPTIMER_Handle handle)
Function to close the GPTIMER Peripheral specified by the handle.
GPTIMER Hardware attributes.
Definition: gp_timer/v0/gp_timer.h:230
GPTIMER_Handle GPTIMER_open(uint32_t idx, const GPTIMER_Params *params)
Open the GPTIMER at index idx with parameters params.
uint32_t cntCompareValPWM
Definition: gp_timer/v0/gp_timer.h:302
void GPTIMER_enableInterruptStatus(GPTIMER_Handle handle, uint32_t irqMask)
Enable IRQ Status, Corresponding status bit will be set in case of an event. Interrupt and callback w...
uint32_t baseAddr
Definition: gp_timer/v0/gp_timer.h:233
GPTIMER_Capture_Config captureConfig
Definition: gp_timer/v0/gp_timer.h:331