-
Notifications
You must be signed in to change notification settings - Fork 173
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
Set a PWM periodwith sub Hz granularity #477
Comments
This is probably closely related to #225 which has been open for a while. Using the PAC directly would work for sure but is a bit annoying. I'm not really involved in this repo much anymore so I can't directly comment on if we would want this in the HAL, but presumably we'd want it on the embedded-hal layer, not here for it to be done "properly". |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to leverage a PWM from a Blue Pill to play some notes on a buzzer. I have done this before in C+libopencm3 by adjusting the prescaler and the autoreload registers directly to reach a frequency near the musical note (if you are curious, here is an example: https://github.com/themightyteam/bluepill-examples/tree/master/examples/buzzer_music ).
Now I would like to do the same using this HAL, but so far I can only play full Hertz and I don't see a way to update directly the registers (example here: https://github.com/aindustriosa/RustyBugA/blob/7-add-buzzer-to-the-bsc/mightybuga_bsc/examples/no_bsc_buzzer.rs ).
So my questions are:
Thanks in advance.
The text was updated successfully, but these errors were encountered: