How to set a glitch free 100% duty cycle PWM output
To control a DC motor driver I need to set one pin permanently high and the other is inverse PWM.
If I want to reverse the motor direction I need to swap these settings.
So I configured both pins as PWM output.
But if I want to set one output pin high the following code is ignored:
HAL_GPIO_WritePin(GPIOA, MOTOR_IN1_Pin, GPIO_PIN_SET);The pin stays low, maybe because the pin is officially not in GPIO mode?
So I thought ok setting 100% duty has the same effect, but when I measure on the scope you see small glitches to zero volt.
So my question can be solved two ways:
How do I make my PWM output pin accept also WritePin commands?
OR
How can I get rid of the small glitches in my 100% duty cycle?
