-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STM32H7/pwm: multi-channel issue #11677
Comments
@maxikrie there is something strange, because "chan_num" is the number of channels enabled in each STM32_TIMx timer. So maybe you forgot to configure it correctly in the menuconfig (I'm supposing, not saying you missed to enable/disable CONFIG_STM32_TIMx_CHANNELx) or there is some error in the macro (I checked here and it seems fine). @raiden00pl any idea why the "check range" is causing this error? |
The channel checking logic looks good at first glance. We cannot remove it because it checks input from the user. Maybe something wrong with the configuration or |
@raiden00pl Thanks for looking into this! My bad, there was a naming confusion on my side. I didn't realize that channel description in
However, in this case the check described above would fail, which is correct, and a mistake on my side. |
I encountered an issue for the case where multiple channels are supposed to output a PWM signal. For the case where the first channel doesn't start with number 1, there is no output.
The issue is the following code in stm32_pwm.c:3317-3338:
For the case where e.g. only channel 3 and 4 (priv->chan_num is 2 in this case) are enabled, the 'check range' fails and the function returns. I suggest to remove this check since it solves the problem and I am not sure if it adds any value.
Please comment if you think this causes any other problems.
The text was updated successfully, but these errors were encountered: