Open okz opened 8 months ago
Hello @avisconti,
Thank you for this report. We will get back to you as soon as we analyze it further. This may take some time. Thank you for your comprehension.
With regards,
Hello @okz,
First thank you for contribution, second is not indeed to enable the complementary channel in HAL_TIM_PWM_Start
.
I have reproduced your configuration with STM32WB55 and I found that enabling the complementary channel as mentioned in RM0434 is to set CC1NE bit.
In the autogenerated CubeMX code in MX_TIM1_Init function you find HAL_TIM_PWM_ConfigChannel API and within this API you find TIM_OC1_SetConfig and CC1NE is set to 1
I hope I've been able to clarify your request, thank you once more for your contribution. We are looking forward to reading from you again.
With regards, Rania
Hi Rania,
Do you mean:
i) You were able to reproduce the problem? ii) or you were able to get it working correctly ?
the reason I am confused, is you mention:
"TIM_OC1_SetConfig and CC1NE is set to 1"
But the screenshot shows CC1NE
is still 0, which may have been confused with CC1NP
, which is now 1
Kind regards, Oz
Hello @okz,
in fact, HAL_TIM_PWM_Start enable CC1NE with
TIM_CCxNChannelCmd(htim->Instance, Channel, TIM_CCxN_ENABLE);
Regards, Rania
Hello,
Any update please!!
Regards
Although CubeMX, gives the impression that PWM generation on complementary channels is possible, with options such as PWM_Generation CH1N, the HAL PWM Start API doesn't support it.
The HAL
HAL_TIM_PWM_Start
call only enables the standard channels for PWM. This is despite, autogenerated CubeMX code setting the GPIO for the complementary channels, and not the standard ones.HAL_TIM_PWM_Start, really should accept TIM_CHANNEL_1N etc