Skip to content

Multiple DMA reads with Termination #124

Open

Description

@tcmichals

I'm trying to use pioLib interface to receive variable length packets, using DMA. The protocol has CLK, 2 data pins and a frame sync. The issue I'm trying to understand is how to terminate the DMA FIFO read?

For example:
pio_sm_config_xfer(pio, sm, PIO_DIR_FROM_SM, 4096, 10));
//This would return number of RX bytes received
pio_sm_xfer_data_rx(static int rp1_pio_sm_xfer_data(PIO pio, uint sm, uint dir, uint data_bytes, void *data, uint &rxBytes);

in the PIO state machine, issue an IRQ terminate the DMA?

Activity

  1. pelwell commented on Mar 19, 2025

    @pelwell
    Collaborator

    There's currently no way to do that. piolib has quite a few restrictions, and this is one.

    Proxying IRQs across the mailbox interface could be done, but doing it properly requires a lot of thought. There's then the issue of how to get the kernel driver to terminate the DMA on your behalf, i.e. how do you associate the IRQ with the DMA transfer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions