-
Notifications
You must be signed in to change notification settings - Fork 894
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
A simple_pwm update event interrupt to be able to synchronize with pwm #2172
base: main
Are you sure you want to change the base?
Conversation
…e: signaling can be done in immutable environment. Added extra pin to test to be able to measure with logic scope
examples/stm32g0/Embed.toml
Outdated
@@ -0,0 +1,43 @@ | |||
[default.probe] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
examples don't use cargo-embed, please don't add an Embed.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove. Also change the implementation, not to use the global static signal, but a signal in interrupt state context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a reset function to pwm to be able to synchronize multiple timers to have the same phase.
# Conflicts: # embassy-stm32/Cargo.toml # examples/stm32g0/Cargo.toml
LGTM, except could you change This means you'll have to use a manually-written poll_fn from the non-interrupt code:
and the interrupt handler doe
This pattern is used by a lot of drivers in embassy-stm32 to handle interrupts. |
To able to synchronize with a pwm (for example sample motor current with ADC) I propose hereby an update interrupt for simple_pwm.
A test can be found in stm32g0 example directory, which shows the functionality.