← index #10696Issue #8967
Related · high · value 1.167
QUERY · ISSUE

DMA interrupts

openby sciencedude1990opened 2023-02-08updated 2024-09-02
enhancementport-rp2

For the RP2040/pico, please add support for DMA interrupts.

Great work on Micropython for RP2040! It has made projects around the house fun to tackle, and easy too!

CANDIDATE · ISSUE

Provide native support for Micropython multicore shared interrupts

openby rsenegor-shaperopened 2022-07-26updated 2022-07-26
enhancement

From what can be gathered, it doesn't appear there is a straightforward way to asynchronously trigger an interrupt on core0 from core1 (or vice versa). I don't see any substantial examples of implementing multicore interrupts (and in general PIO code) in Micropython; nearly everything is done in C.

This would go a long way in opening up truly multicore/multithreaded execution in Micropython. It's tempting to have core1 synchronously toggle a GPIO to trigger an interrupt on core0, but this would require simultaneously utilizing a GPIO as an input and an output, or mapping an identical interrupt between cores, not a very sane approach. (From RP2040 documentation, it also sounds like this might be possible via PIO, but there doesn't appear to be consensus.)

Taken from a thread on the forum:

Providing '.trigger_core0_interrupt' and '.core0_irq' to allow the callback to be specified should be easy enough. 
I am not sure how the Core 0 interrupt from Core 1 to get MicroPython to schedule a call to the callback routine 
would be implemented but I imagine the same way as any physical interrupt gets translated to a scheduling event. 

See the following thread for more info: https://forums.raspberrypi.com/viewtopic.php?p=2023444&sid=c546706776896699b65dcb693698eb08#p2023444

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied