-
Notifications
You must be signed in to change notification settings - Fork 209
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
PWM: start_pwm resets ARPE bit in counter control register #501
Comments
TorstenStrunk
added a commit
to TorstenStrunk/stm32f4xx-hal
that referenced
this issue
Aug 13, 2022
Use register.modify instead of register.write method to start timer (i.e. do same like calling timer.enable_counter()). This avoids touching bits like ARPE (or DIR,..) which may have been set before and should stay intact.
TorstenStrunk
added a commit
to TorstenStrunk/stm32f4xx-hal
that referenced
this issue
Aug 13, 2022
Use register.modify instead of register.write method to start timer (i.e. do same like calling timer.enable_counter()). This avoids touching bits like ARPE (or DIR,..) which may have been set before and should stay intact.
This has been solved with #513 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While using PWM output with different periods and duty cycles I observed glitches in the generated output signals. Even though the pwm and pwm_hz methods first enable auto reload preloads in CR1, the final call of self.tim.start_pwm() uses a write to CR1, which clears the ARPE bit again!
The text was updated successfully, but these errors were encountered: