2020-03-10 09:45 AM
I am trying to setup a PWM output with Timer 4 by using CubeMX. When starting the code it always stops at command HAL_TIM_PWM_Start(&htim4,TIM_CHANNEL_1)
Attached are the setup in the main() and setup in the CubeMX.
Any ideas what am I missing?
MX_GPIO_Init();
MX_SPI1_Init();
MX_TIM4_Init();
HAL_TIM_Base_Start(&htim4);
HAL_TIM_PWM_Start(&htim4,TIM_CHANNEL_1);
2020-03-10 10:49 AM
What does "the code stops at command ***" mean? You single-step the code? Do you have a loop at the end of main()? Is there any output on the given pin, as observed by oscilloscope/logic analyzer?
JW
2020-03-13 02:23 AM
I thought the code stops at the HAL_TIM_PWM_Start, but I just didn't add any commands after that ... so that was the reason.
Sorry for that.