-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
PicoDVI crashes in CircuitPython 9.2.1 #9868
Comments
I did a bisect. It's f14b4c6, in #9659. Pinging @timchinowsky for interest. The picodvi test program doesn't use PIO, but I think it's being used for the status NeoPixel. |
So is the PicoDVI IRQ handler being clobbered by the PIO handler I added? I would have thought the linker would complain about that. |
In circuitpython/ports/raspberrypi/common-hal/picodvi/Framebuffer_RP2350.c Lines 118 to 130 in 2d2fa28
while the handler for PIO is tucked into circuitpython/ports/raspberrypi/audio_dma.c Lines 464 to 504 in 2d2fa28
The handler for IRQ0 is multiplexed to handle both audio_dma and rp2pio interrupts. So, a few options for fixing this would be
It would be nice to get all the handlers in one place, bc it looks like the linker is not smart enough to catch this. I'm also seeing that the implementation for RP2350 is very different from RP2040. In general there's a lot here that's new to me so basically I'm saying help, @tannewt!!! |
I'm looking at https://www.raspberrypi.com/documentation/pico-sdk/hardware.html.
I'm not sure why
I think it's an accident that this used to work, because no one else was using DMA 1. |
Perhaps for now we should revert #9659 and then carefully fix the use of DMA IRQ handlers so they are set up dynamically everywhere rather than using the fixed |
Well that would be a little sad 😉 but you gotta do what you gotta do. I see that RP2350 also has a DMA_IRQ_2 and DMA_IRQ_3, could RP2350 PicoDVI be tweaked to use one of those, as a less disruptive temporizing measure, until dynamic setup can be fixed for real? |
This also crashes on RP2040, sadly. On a Feather DVI board, 9.2.1 doesn't even start properly because the |
Alas. So in the dynamic setup of the future, how would the different modules that want to use these resources need to coexist? If the RP2040 Feather DVI board uses PIO for both DVI and neopixel, you're not going to be able to do any I2S on there, right? |
I"m wondering if they need exclusive access to the IRQ's or get away with shared access. There might glitches, but it's better than not being able to do everything at once. |
CircuitPython version
Code/REPL
Behavior
CircuitPython core code crashed hard. Whoops!
Hard fault: memory access or instruction error.
Description
The latest PicoDVI core library crashes with CircuitPython 9.2.1 on RP2350
Running the HSTX DVI demo code (Display Ruler) works fine on CircuitPython 9.2.0, but crashes on CircuitPython 9.2.1
To replicate on Raspberry Pi Pico 2 with DVI_Sock:
-> Runs fine
-> Crashes hard
Additional information
No response
The text was updated successfully, but these errors were encountered: