Skip to content
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

Question about outputting a specific pulse width PWM signal on embassy_stm32 #3649

Open
thunderstorm010 opened this issue Dec 14, 2024 · 0 comments

Comments

@thunderstorm010
Copy link

thunderstorm010 commented Dec 14, 2024

Hi, firstly I want to say sorry because I newly got involved in embedded programming and thus embassy.
Formerly I was using the STM32 HAL C libraries for writing code, where I could do for example __HAL_TIM_SET_COMPARE(tim1, pulse_width) to output a given pulse width.
But I couldn't find how to do this efficiently in embassy_stm32, there are only methods for outputting duty cycles, which could theoretically be calculated from a given pulse width, but as far as I know hardware division is not supported on the thumbv6m architecture which I am working on. Is it possible to output a specific pulse width without calculating the duty cycle? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant