25 #ifndef FTM_PWM_DRIVER_H
26 #define FTM_PWM_DRIVER_H
42 #define FTM_MAX_DUTY_CYCLE (0x8000U)
44 #define FTM_DUTY_TO_TICKS_SHIFT (15U)
147 #if defined(__cplusplus)
196 bool softwareTrigger);
211 uint8_t numberOfChannels,
212 const uint8_t * channels,
213 const uint16_t * duty,
214 bool softwareTrigger);
237 bool softwareTrigger);
239 #if FEATURE_FTM_HAS_SUPPORTED_DITHERING
252 status_t FTM_DRV_UpdatePwmPeriodDither(uint32_t instance,
253 uint8_t newModFracVal,
254 bool softwareTrigger);
271 status_t FTM_DRV_UpdatePwmEdgeChannelDither(uint32_t instance,
273 uint8_t newMatchFracVal,
274 bool softwareTrigger);
289 void FTM_PWM_DRV_IrqHandler(uint32_t instance,
290 uint32_t chnOutCtrlVal);
294 #if defined(__cplusplus)
ftm_fault_mode_t faultMode
status_t FTM_DRV_DeinitPwm(uint32_t instance)
Stops all PWM channels .
FlexTimer driver independent PWM parameter.
ftm_polarity_t ftmFaultPinPolarity
const ftm_combined_ch_param_t * pwmCombinedChannelConfig
status_t FTM_DRV_UpdatePwmPeriod(uint32_t instance, ftm_pwm_update_option_t typeOfUpdate, uint32_t newValue, bool softwareTrigger)
This function will update the new period in the frequency or in the counter value into mode register ...
ftm_deadtime_ps_t deadTimePrescaler
uint8_t nNumCombinedPwmChannels
const ftm_pwm_fault_param_t * faultConfig
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
status_t FTM_DRV_FastUpdatePwmChannels(uint32_t instance, uint8_t numberOfChannels, const uint8_t *channels, const uint16_t *duty, bool softwareTrigger)
This function will update the duty cycle of PWM output for multiple channels.
FlexTimer driver PWM Fault channel parameters.
bool pwmOutputStateOnFault
uint16_t uDutyCyclePercent
FlexTimer driver combined PWM parameter.
bool enableSecondChannelOutput
uint8_t nNumIndependentPwmChannels
FlexTimer driver PWM parameters.
#define FTM_FEATURE_FAULT_CHANNELS
bool enableExternalTrigger
ftm_polarity_t mainChannelPolarity
bool enableExternalTriggerOnNextChn
ftm_second_channel_polarity_t secondChannelPolarity
const ftm_independent_ch_param_t * pwmIndependentChannelConfig
status_t FTM_DRV_UpdatePwmChannel(uint32_t instance, uint8_t channel, ftm_pwm_update_option_t typeOfUpdate, uint16_t firstEdge, uint16_t secondEdge, bool softwareTrigger)
This function updates the waveform output in PWM mode (duty cycle and phase).
ftm_pwm_update_option_t
FlexTimer Configure type of PWM update in the duty cycle or in ticks.
bool enableExternalTrigger
status_t FTM_DRV_InitPwm(uint32_t instance, const ftm_pwm_param_t *param)
Configures the duty cycle and frequency and starts outputting the PWM on all channels configured in p...
FlexTimer driver PWM Fault parameter.
ftm_config_mode_t
FlexTimer operation mode.
bool enableModifiedCombine