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

Use only DMA0 for PIO background read/write #9980

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dhalbert
Copy link
Collaborator

Changes PIO background read/write to use only DMA0, not DMA1. This is a minimal change that does not change the current use of a static IRQ handler in ports/raspberrypi/audio_dma.c. It reverts to using only DMA0, and uses two background_pio... arrays to distinguish between read and write. picodvi now works again.

If this works, then I can explore using irq_add_shared_handler() as discussed in #9868.

@timchinowsky I tried to test this using a loopback test from https://github.com/timchinowsky/tac5/blob/main/README.md. But those tests as written use a test= arg which is no longer present. Could you test this (and update the loopback tests)? Thanks.

@timchinowsky
Copy link

Great, thanks for these changes, and sorry about the broken tests, I will get them going.

@relic-se
Copy link

@dhalbert The pio_i2s library relies on the background read and write features as well. The examples within that library should work as a test for these updates as well. https://github.com/relic-se/CircuitPython_PIO_I2S/tree/master/examples

@dhalbert
Copy link
Collaborator Author

@relic-se Would you be willing to test the artifact builds here with those examples? Maybe if you are already set up to do so.

@dhalbert
Copy link
Collaborator Author

@relic-se if you could describe how to set up a simple test, that would be great. I see the examples programs in the library, but I'm not sure how to set them up to actually send data and test the functionality, in the simplest way possible. For instance, I'm not sure if I need to connect an I2s mic and amp to verify that it works, or whether some loopback test could be set up.

@relic-se
Copy link

@dhalbert Here's a basic loopback test: https://gist.github.com/relic-se/b90aae77ec4fccb7b03826007b0e41b3. I haven't gotten around to building the fork of this PR, but I've tested it on v9.2.3 using an RP2040-Zero.

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

Successfully merging this pull request may close these issues.

PicoDVI crashes in CircuitPython 9.2.1
3 participants