29 #ifndef FTM_PWM_DRIVER_H
30 #define FTM_PWM_DRIVER_H
43 #define FTM_MAX_DUTY_CYCLE (0x8000U)
45 #define FTM_DUTY_TO_TICKS_SHIFT (15U)
207 #if defined(__cplusplus)
256 bool softwareTrigger);
271 uint8_t numberOfChannels,
272 const uint8_t * channels,
273 const uint16_t * duty,
274 bool softwareTrigger);
297 bool softwareTrigger);
299 #if FEATURE_FTM_HAS_SUPPORTED_DITHERING
313 uint8_t newModFracVal,
314 bool softwareTrigger);
333 uint8_t newMatchFracVal,
334 bool softwareTrigger);
349 void FTM_PWM_DRV_IrqHandler(uint32_t instance,
350 uint32_t chnOutCtrlVal);
354 #if defined(__cplusplus)
ftm_polarity_t
FlexTimer PWM output pulse mode, high-true or low-true on match up.
ftm_fault_mode_t faultMode
status_t FTM_DRV_DeinitPwm(uint32_t instance)
Stops all PWM channels .
FlexTimer driver independent PWM parameter.
ftm_safe_state_polarity_t levelSelect
ftm_polarity_t ftmFaultPinPolarity
bool enableSecondChannelOutput
ftm_second_channel_polarity_t
FlexTimer PWM channel (n+1) polarity for combine mode.
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 ...
status_t FTM_DRV_UpdatePwmEdgeChannelDither(uint32_t instance, uint8_t channel, uint8_t newMatchFracVal, bool softwareTrigger)
This function will use in the PWM edge dithering. This value is added to the channel (n) internal acc...
ftm_deadtime_ps_t deadTimePrescaler
uint8_t nNumCombinedPwmChannels
ftm_safe_state_polarity_t levelSelectOnNextChn
ftm_safe_state_polarity_t
Select level of the channel (n) output at the beginning.
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.
ftm_safe_state_polarity_t levelSelect
status_t FTM_DRV_UpdatePwmPeriodDither(uint32_t instance, uint8_t newModFracVal, bool softwareTrigger)
This function will use in the PWM period dithering. This value is added to an internal accumulator at...
bool pwmOutputStateOnFault
ftm_second_channel_polarity_t secondChannelPolarity
uint16_t uDutyCyclePercent
FlexTimer driver combined PWM parameter.
bool enableSecondChannelOutput
uint8_t nNumIndependentPwmChannels
FlexTimer driver PWM parameters.
bool enableExternalTrigger
ftm_polarity_t mainChannelPolarity
bool enableExternalTriggerOnNextChn
ftm_fault_mode_t
FlexTimer fault control.
ftm_independent_ch_param_t * pwmIndependentChannelConfig
ftm_deadtime_ps_t
FlexTimer pre-scaler factor for the dead-time insertion.
ftm_second_channel_polarity_t secondChannelPolarity
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).
#define FTM_FEATURE_FAULT_CHANNELS
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.
ftm_pwm_fault_param_t * faultConfig
ftm_combined_ch_param_t * pwmCombinedChannelConfig
bool enableModifiedCombine