1 of 1 people found this helpful
You cannot have init value == toggle value. The HW uses a counter that controls the output level and it cannot be both high and low at the same time. If you want the output to be always on or always off, just drive the output using gpio_configurePin().
So I need to special case 100%? Seems rather clunky I'm not sure on the order of operations here. I've tried disabling the PWM at 100% and calling gpio_configurePin but this is unrealiable; the pin goes low sometimes even though I set it high. Then when transitioning back below 100%, the duty cycle sometimes gets inverted. Do I need to reset the PWM perhaps?