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

Issue Using Pico-DMX together with Adafruit_NeoPXL8 #35

Closed
HerbertHalamek opened this issue Oct 13, 2022 · 3 comments
Closed

Issue Using Pico-DMX together with Adafruit_NeoPXL8 #35

HerbertHalamek opened this issue Oct 13, 2022 · 3 comments

Comments

@HerbertHalamek
Copy link

When using "Pico-DMX" together with "Adafruit_NeoPXL8" on Raspberry Pi Pico with Arduino (earlephilhower core) the processor behaves unpredictable (normally blocks all communication).
The root source for this problem is that both libraries use the same Interrupt (IRQ0) for DMA:

Pico-DMX / DmxInput.cpp / DmxInput::read_async
dma_channel_set_irq0_enabled(_dma_chan, true);
irq_set_exclusive_handler(DMA_IRQ_0, dmxinput_dma_handler);
irq_set_enabled(DMA_IRQ_0, true);

Adafruit_NeoPXL8 / Adafruit_neoPXL8.cpp / Adafruit_NeoPixel::begin
irq_set_exclusive_handler(DMA_IRQ_0, dma_finish_irq);
dma_channel_set_irq0_enabled(dma_channel, true);
irq_set_enabled(DMA_IRQ_0, true);

Changing one of the two to IRQ1 in all three code lines solves the problem and everything runs like a charm.

I don't know whether it is possible to sort of claim an IRQ like for the DMA channels and the PIO state machines.
If not it would be very desirable to add a parameter to the read_async method. Which allows to select the IRQ by the application in case of conflicts.
Same is true for the DmxInput::read method. DmxOutput not tested yet.

I will also report same thing to Adafruit.

@kripton
Copy link
Contributor

kripton commented Oct 24, 2022

I agree that it might be helpful to be able to change this using an additional parameter or #define. PRs welcome :)

@kripton
Copy link
Contributor

kripton commented Oct 24, 2022

Duplicate of #33 ?

@jostlowe
Copy link
Owner

@kripton indeed it is. We'll keep tracking this in #33 :)

@jostlowe jostlowe closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2022
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

3 participants