Skip to main content
PChia.2237
Senior
September 5, 2022
Question

How to have indipendent PWM output PWM channel 0 and PWM channel 1.

  • September 5, 2022
  • 0 replies
  • 784 views

0693W00000SuWpoQAF.jpgHi,

I have FlexPWM0 with PWM channel 0 and PWM channel 1 enabled.

Then if i put this code

pwm_lld_start(&PWMD1, &pwm_config_pwm_cfg0);
	 pwm_lld_enable_channel(&PWMD1, 0, PWM_PERCENTAGE_TO_WIDTH(&PWMD1, 5000));
	 pwm_lld_enable_channel(&PWMD1, 1, PWM_PERCENTAGE_TO_WIDTH(&PWMD1, 2000));

I have on the output on both PWM 50% and not 20%.

How can be indipendent?

This topic has been closed for replies.