AnsweredAssumed Answered

MCUXpresso PWM simultaneously Update DutyCycle

Question asked by Jasom Alencar on Dec 27, 2017
Latest reply on Jan 3, 2018 by xiangjun.rong

I am using the board FRDM-K22F with the example to use the pwm multiple pwm channels. I've been included one more channel, and it is working very well.

 

My question is:

 

Is possible to shutdown or puty duty cycle to 0 in two channels simultaneously?

 

To Update the Duty Cycle I am using de default function from the SDK.

 

FTM_UpdatePwmDutycycle(BOARD_FTM_BASEADDR, (ftm_chnl_t)BOARD_FIRST_FTM_CHANNEL, kFTM_EdgeAlignedPwm, updatedDutycycle);
FTM_UpdatePwmDutycycle(BOARD_FTM_BASEADDR, (ftm_chnl_t)BOARD_SECOND_FTM_CHANNEL, kFTM_EdgeAlignedPwm, updatedDutycycle);
FTM_UpdatePwmDutycycle(BOARD_FTM_BASEADDR, (ftm_chnl_t)BOARD_THIRTH_FTM_CHANNEL, kFTM_EdgeAlignedPwm, updatedDutycycle);

 

I should to control the PWM channels to a 3-phase bridge, then, just one channel must be in high level.

PWM Channel

A B C

0 0 1

0 1 0

1 0 0

 

Thanks,

 

Jasom

Outcomes