2020-12-21 06:28 PM
Dear ST;
I can't generate PWM with CH1 for TIM2 on STM32L0 but I can generate PWM with CH3 for TIM2 on STM32L0.
2020-12-30 01:53 AM
Hi @Gz ,
You can generate PWM with CH1 for TIM2 by select PWM Generation CH1 under Timers -> TIM2.
Hope that this help you!
2020-12-30 02:00 AM
Hi @Houssem CHAABANI ;
I found problem. I generate PWM CH1 to compare with PWM CH3.
PWM Channel 1
*/
GPIO_InitStruct.Pin = GPIO_PIN_0;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
PWM Channel 3
*/
GPIO_InitStruct.Pin = GPIO_PIN_1;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF2_TIM2;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
The PWM Channel 1 not included " GPIO_InitStruct.Alternate = GPIO_AF2_TIM2;"
Thank you,
Best regards.
2020-12-30 02:35 AM
Hi @Gz ,
Thank you for your feedback.
This was reported internally and it will be fixed as soon as possible.
In meanwhile you can add the missing configuration manually in your code.
Thanks!