2020-05-14 09:16 PM
I am currently designing a program using ST32G070 chip.
As a question, I would like to create a program that will change what I was using as a PWM without using Cube Mx into a digital signal LOW or HIGH signal.
I'd like to know how to change it.
2020-05-15 12:42 AM
So you have a pin on which you have a PWM output from a timer, and you want to stop the PWM and set the pin to low or high?
The simplest way is to change the respective GPIO_MODER setting from AF to Out, and then by setting the respective but in GPIO_ODR (through GPIO_BSRR) you set it to low or high. Read the GPIO chapter in Reference Manual.
jW
2020-05-16 08:13 AM
Or if you want to use HAL: