2020-08-05 10:04 PM
Hi everyone,
i am trying to make PWM from internal clock. i use TIM4 with out put is pin PD12.
i just put the code bellow in INT VOID(MAIN)
HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_1);
But it doesn't work.
Can someone help me explain?
2020-08-05 10:06 PM
You need to initialize the pins and timer first. Use STM32CubeMX to generate the code for you, or look at examples in the CubeF4 repository.
2020-08-05 10:14 PM
Thanks you for reply,
i initialize the pin already. i was follow on youtube how to make pwm. and did base on that. but not effect
https://www.youtube.com/watch?v=vDvbO_BAYvc&t=176s
i don't know what happen!
2020-08-05 10:15 PM
can you give me some examples?
2020-08-05 10:19 PM
initialize pin timer
2020-08-06 03:13 AM
> can you give me some examples?
Here is one example: