-
Notifications
You must be signed in to change notification settings - Fork 1k
DMA Support - IRQ Handlers in Core? #821
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
Comments
Hi @xC0000005 |
I had the same problem, that you can not add IRQ functions in the arduino code (Also for DMA). My work around was to add a new board variant with the IRW functions. This is not perfect but at least I don't have to fork the hole core. |
Hi @4ndreas
I guess you talk about adding an IRD handler in the sketch ? Did you define it with |
No In my case I needed the
Function, adding this in the *.ino files won't work, but in the variant.c does. Took me a while to figure out why the interrupt jumped to a wired position. The complet project is here: https://github.com/4ndreas/HyperLight_DMA |
At sketch level it should be: Note: |
That is something for the Wiki I gues, thank you. |
I'll open a PR this week. The goal is simple - have sketches not defining handlers for events that are global to the core, so libraries can register for different DMA events without having conflicting handlers. Thanks for the input, all. |
Opened #825 since a suggested change is better than a dozen posts about what we could do. |
While trying to get some LEDs working with the ST Arduino core, I ran into a problem that's likely a missing feature. Libraries probably shouldn't be implementing the weak IRQ handlers, because you can't have them defined everywhere. In my own fork, I added, similar to timers, handlers with registration/deregistration. For things like ADC and SD Support, this would be handy, but I'm not sure if there's a plan for this. I could create a PR, but I'd rather see what the consensus is.
Link to a branch with some test DMA support (ignore the library - I'm not sure how I want it to work, so it's not even remotely usable).
https://github.com/xC0000005/Arduino_Core_STM32/tree/DMASupport
The text was updated successfully, but these errors were encountered: