-
Notifications
You must be signed in to change notification settings - Fork 929
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
Feature Request: PWM Overfow interrupt #2683
Comments
What would the function/method look like for this? Is there a function you'd like replicated from the C SDK or micropython? |
I have no idea at this stage, I will try and find out what Arduino C code implements.. |
Alright, I'll see if I begin dipping my toes into writing code again these days. |
Cool, many thanks ... |
Please take a look at #2684. Let me know if it works for you and what else would be required for your use case. |
Wow that was quick, thanks will try it out .... Remind me again how to patch that file with git ... or is it applied to the commit you did with the PWM max frequency fix, if so I already have that code pulled on my machine .. EDIT: I did a EDIT2: Nevermind, I changed to the Now, how do I setup a callback function? It is not clear from the code .. Cheers |
Right, so apparently theres more to it than just setting up the IRQ. I've tried to dive into the pico SDK interrupt code but have been unable to port some parts of it since it's beyond my understanding on how the NVIC works for ARM processors. I'm really just a hobbyist who really wanted to use the pico and had no experience with embedded programming. My progress with the full interrupts implementation is over here https://github.com/soypat/tinygo/tree/rp2040-sync |
I don't think you are "just" a hobbyist at all, based on all your code efforts. I am an embedded engineer, but have no experience with TinyGo, but happy to test code to improve TinyGo as I think it is great .. I am using TinyGo to implement a sensorless BLDC motor controller at the moment and am struggling with real-time support, so any help with getting full interrupt support would be great. I also think the Pico is a great embedded platform and when TinyGo gets full support for the PIO unit, it will be a great combo .. |
Hmmmm, I'm gonna throw a little brainstorm your way: what about shorting a pwm signal to a GPIO pin with an interrupt set? Is that too hacky? I'm also looking forward to PIO support... someday... |
Yep, had thought of that, is a bit of a hack, and the pwm update won't be
double buffered anymore..
…On Tue, 8 Mar 2022, 9:16 am Patricio Whittingslow, ***@***.***> wrote:
Hmmmm, I'm gonna throw a little brainstorm your way: what about shorting a
pwm signal to a GPIO pin with an interrupt set? Is that too hacky?
—
Reply to this email directly, view it on GitHub
<#2683 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNHVB6HNY3A6O5DIAW42DTU6ZPZPANCNFSM5QAOI4CA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi,
Requesting that support for PWM interrupts be added to the
machine_rp2040_pwm.go
driver, especially handling for the overflow interrupt.This is required when you want to update PWM duty synchronous with the PWM cycle ..
From the manual:
The text was updated successfully, but these errors were encountered: