2024-01-15 06:24 AM
Hii,
i am using stm32 G0B1RE Board and i want to control brightness of LED connected on PC8 using PWM frequency generated on PA15 pin. i dont know how to do it. as i am new to using stm32.
2024-01-15 07:04 AM
Hi,
You have many timer - so why not just use a timer at the pin you want to switch ?
PC8 should be possible , to use : (from ds)
2024-01-15 07:23 AM
Hello @Rohit007,
You can either connect your LED to a GPIO with a timer directly or simply wire the output of the PWM signal to the LED. The duty cycle of the PWM signal will determine the brightness of the LED
For the code of PWM generation, you can refer to the existing examples in STM32CubeG0 FW by following this link
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.