The section describes the programming interface of the eFlexPWM HAL driver.
|
enum | pwm_module_t {
kFlexPwmModule0 = 0U,
kFlexPwmModule1,
kFlexPwmModule2,
kFlexPwmModule3
} |
| PWM submodules. More...
|
|
enum | pwm_module_signal_t |
| PWM signals from each module.
|
|
enum | pwm_val_regs_t {
kFlexPwmVAL0 = 0U,
kFlexPwmVAL1,
kFlexPwmVAL2,
kFlexPwmVAL3,
kFlexPwmVAL4,
kFlexPwmVAL5
} |
| PWM value registers. More...
|
|
enum | pwm_status_t {
kStatusPwmSuccess = 0U,
kStatusPwmError = 1U,
kStatusPwmInvalidArgument = 2U
} |
| PWM status. More...
|
|
enum | pwm_clock_src_t {
kClkSrcPwmIPBusClk = 0U,
kClkSrcPwmExtClk,
kClkSrcPwm0Clk
} |
| PWM clock source selection. More...
|
|
enum | pwm_clock_ps_t {
kPwmDividedBy1 = 0U,
kPwmDividedBy2,
kPwmDividedBy4,
kPwmDividedBy8,
kPwmDividedBy16,
kPwmDividedBy32,
kPwmDividedBy64,
kPwmDividedBy128
} |
| PWM prescaler factor selection for clock source. More...
|
|
enum | pwm_force_output_trigger_t {
kForceOutputLocalForce = 0U,
kForceOutputMasterForce,
kForceOutputLocalReload,
kForceOutputMasterReload,
kForceOutputLocalSync,
kForceOutputMasterSync,
kForceOutputExternalForce,
kForceOutputExternalSync
} |
| Options that can trigger a PWM FORCE_OUT. More...
|
|
enum | pwm_init_src_t {
kInitSrcLocalSync = 0U,
kInitSrcMasterReload,
kInitSrcMasterSync,
kInitSrcExtSync
} |
| PWM counter initialization options. More...
|
|
enum | pwm_load_frequency_t {
kPwmLoadEvery1Oportunity = 0U,
kPwmLoadEvery2Oportunity,
kPwmLoadEvery3Oportunity,
kPwmLoadEvery4Oportunity,
kPwmLoadEvery5Oportunity,
kPwmLoadEvery6Oportunity,
kPwmLoadEvery7Oportunity,
kPwmLoadEvery8Oportunity,
kPwmLoadEvery9Oportunity,
kPwmLoadEvery10Oportunity,
kPwmLoadEvery11Oportunity,
kPwmLoadEvery12Oportunity,
kPwmLoadEvery13Oportunity,
kPwmLoadEvery14Oportunity,
kPwmLoadEvery15Oportunity,
kPwmLoadEvery16Oportunity
} |
| PWM load frequency selection. More...
|
|
enum | pwm_fault_input_t {
kFlexPwmFault0 = 0U,
kFlexPwmFault1,
kFlexPwmFault2,
kFlexPwmFault3
} |
| PWM fault select. More...
|
|
enum | pwm_capture_edge_t {
kCaptureDisable = 0U,
kCaptureFallingEdges,
kCaptureRisingEdges,
kCaptureAnyEdges
} |
| PWM capture edge select. More...
|
|
enum | pwm_force_signal_t {
kFlexPwmUsePwm = 0U,
kFlexPwmInvertedPwm,
kFlexPwmSoftwareControl,
kFlexPwmUseExternal
} |
| PWM output options when a FORCE_OUT signal is asserted. More...
|
|
enum | pwm_chnl_pair_operation_t {
kFlexPwmIndependent = 0U,
kFlexPwmComplementaryPwmA,
kFlexPwmComplementaryPwmB
} |
| Optiona available for the PWM A & B pair operation. More...
|
|
enum | pwm_reg_reload_t {
kFlexPwmReloadImmediate = 0U,
kFlexPwmReloadPwmHalfCycle,
kFlexPwmReloadPwmFullCycle,
kFlexPwmReloadPwmHalfAndFullCycle
} |
| Options available on how to load the buffered-registers with new values. More...
|
|
enum | pwm_fault_recovery_mode_t {
kFlexPwmNoRecovery = 0U,
kFlexPwmRecoverHalfCycle,
kFlexPwmRecoverFullCycle,
kFlexPwmRecoverHalfAndFullCycle
} |
| Options available on how to re-enable the PWM output when recovering from a fault. More...
|
|
enum | pwm_event_t {
kFlexPwmCompareVal0Event = (1U << 0),
kFlexPwmCompareVal1Event = (1U << 1),
kFlexPwmCompareVal2Event = (1U << 2),
kFlexPwmCompareVal3Event = (1U << 3),
kFlexPwmCompareVal4Event = (1U << 4),
kFlexPwmCompareVal5Event = (1U << 5),
kFlexPwmCaptureX0Event = (1U << 6),
kFlexPwmCaptureX1Event = (1U << 7),
kFlexPwmCaptureB0Event = (1U << 8),
kFlexPwmCaptureB1Event = (1U << 9),
kFlexPwmCaptureA0Event = (1U << 10),
kFlexPwmCaptureA1Event = (1U << 11),
kFlexPwmReloadEvent = (1U << 12),
kFlexPwmReloadErrorEvent = (1U << 13),
kFlexPwmFault0Event = (1U << 16),
kFlexPwmFault1Event = (1U << 17),
kFlexPwmFault2Event = (1U << 18),
kFlexPwmFault3Event = (1U << 19)
} |
| PWM interrupt options available. More...
|
|
|
void | PWM_HAL_Init (PWM_Type *base) |
| Initializes the PWM to its reset state. More...
|
|
void | PWM_HAL_SetupPwmSubModule (PWM_Type *base, pwm_module_t subModuleNum, pwm_module_setup_t *setupParams) |
| Sets up a PWM sub-module. More...
|
|
void | PWM_HAL_SetupFaults (PWM_Type *base, pwm_fault_input_t faultNum, pwm_fault_setup_t *setupParams) |
| Sets up the Flex PWM fault protection. More...
|
|
void | PWM_HAL_SetupCapture (PWM_Type *base, pwm_module_t subModuleNum, pwm_module_signal_t pwmSignal, pwm_capture_setup_t *setupParams) |
| Sets up the Flex PWM capture.s. More...
|
|
uint16_t | PWM_HAL_GetCaptureValReg (PWM_Type *base, pwm_module_t subModuleNum, pwm_val_regs_t cmpReg) |
| Gets the PWM capture value. More...
|
|
void | PWM_HAL_SetValReg (PWM_Type *base, uint8_t subModuleNum, pwm_val_regs_t valReg, uint16_t val) |
| Sets the PWM value register. More...
|
|
void | PWM_HAL_SetupForceSignal (PWM_Type *base, pwm_module_t subModuleNum, pwm_module_signal_t pwmSignal, pwm_force_signal_t mode) |
| Selects the signal to output when a FORCE_OUT signal is asserted. More...
|
|
void | PWM_HAL_EnableInterrupts (PWM_Type *base, pwm_module_t subModuleNum, uint32_t eventmask) |
| Enables all relevant PWM interrupts. More...
|
|
void | PWM_HAL_DisableInterrupts (PWM_Type *base, pwm_module_t subModuleNum, uint32_t eventmask) |
| Disables all PWM interrupts. More...
|
|
void | PWM_HAL_ClearStatus (PWM_Type *base, pwm_module_t subModuleNum, uint32_t eventmask) |
| Clears all PWM status flags. More...
|
|
static uint16_t | PWM_HAL_GetCounter (PWM_Type *base, pwm_module_t subModuleNum) |
| Returns the PWM peripheral current counter value. More...
|
|
static void | PWM_HAL_SetCounterInitVal (PWM_Type *base, pwm_module_t subModuleNum, uint16_t val) |
| Sets the PWM timer counter initial value. More...
|
|
static void | PWM_HAL_SetForceCmd (PWM_Type *base, pwm_module_t subModuleNum, bool val) |
| Outputs a FORCE signal. More...
|
|
static void | PWM_HAL_SetOutputPolarityPwmBCmd (PWM_Type *base, pwm_module_t subModuleNum, bool val) |
| Sets the output polarity for the PWM_B. More...
|
|
static void | PWM_HAL_SetOutputPolarityPwmACmd (PWM_Type *base, pwm_module_t subModuleNum, bool val) |
| Sets the output polarity for the PWM_A. More...
|
|
static void | PWM_HAL_SetOutputPolarityPwmXCmd (PWM_Type *base, pwm_module_t subModuleNum, bool val) |
| Sets the output polarity for the PWM_X. More...
|
|
static void | PWM_HAL_SetOutputTriggerCmd (PWM_Type *base, pwm_module_t subModuleNum, uint8_t valueReg, bool val) |
| Enables or disables if a match with a value register causes an output trigger. More...
|
|
static void | PWM_HAL_SetPwmAFaultInputCmd (PWM_Type *base, pwm_module_t subModuleNum, pwm_fault_input_t fault, bool val) |
| Enables or disables the fault input for the PWM A. More...
|
|
static void | PWM_HAL_SetPwmBFaultInputCmd (PWM_Type *base, pwm_module_t subModuleNum, pwm_fault_input_t fault, bool val) |
| Enables or disables the fault input for the PWM B. More...
|
|
static void | PWM_HAL_SetPwmXFaultInputCmd (PWM_Type *base, pwm_module_t subModuleNum, pwm_fault_input_t fault, bool val) |
| Enables or disables the fault input for the PWM X. More...
|
|
static void | PWM_HAL_SetOutputPwmXCmd (PWM_Type *base, pwm_module_t subModuleNum, bool val) |
| Sets the PWM_X pin to input or output. More...
|
|
static void | PWM_HAL_SetOutputPwmBCmd (PWM_Type *base, pwm_module_t subModuleNum, bool val) |
| Sets the PWM_B pin to input or output. More...
|
|
static void | PWM_HAL_SetOutputPwmACmd (PWM_Type *base, pwm_module_t subModuleNum, bool val) |
| Sets the PWM_A pin to input or output. More...
|
|
static void | PWM_HAL_SetSwCtrlOutCmd (PWM_Type *base, pwm_module_t subModuleNum, pwm_module_signal_t output, bool val) |
| Sets the software control output for a pin to high or low. More...
|
|
static void | PWM_HAL_SetPwmRunCmd (PWM_Type *base, uint8_t subModules, bool val) |
| Sets the PWM generator run. More...
|
|