2022-11-10 11:08 PM
I working on stm32 microcontroller, I want to generate the pwm signal for stm32f051c8t6tr mcu.
I have assigned my prescalar as 48-1 and counter period is 1000-1 in order to generate 10KHz frequency.
My code is
TIM1->CCR1=50;
HAL_TIM_PWM_Start(&htim1,TIM_CHANNEL_1);
The above two code only i tried but i am not getting any output. Can you please me, how to solve this issue
Thanks
2022-11-11 01:50 AM
Hello @jm.2,
Could you please share the STM32CubeMX configuration :)
Foued
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.
2022-11-11 03:37 AM
Basic LED blinky works?
Check, if you have continuity from mcu to the pin where you are measuring. The simplest way is to do a "blinky" on that pin, i.e. turn the pin to GPIO output and toggle it.
Other than that, read out and check/post the TIM and relevant GPIO registers content.
Note that TIM1 is Advanced Timer thus needs to have TIM1_BDTR.MOE set.
JW
2022-11-22 02:03 AM
Hello,
I recommend you this link:
Foued
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.