You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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.
Activity
pelwell commentedon Mar 19, 2025
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.