Hello. I have written a small program for PIO that periodically sends data to RX_FIFO. I have also configured DMA so that when new data arrives in RX_FIFO it is immediately written to some variable. The problem is that the data is moved as many times as I specify in transfer_count. Is it possible to run DMA so that data is fetched from RX_FIFO indefinitely, without using an interrupt to restart DMA?
Code:
PIO pio = pio0; uint sm = pio_claim_unused_sm(pio, true); uint offset = pio_add_program(pio, &hello_program); hello_program_init(pio, sm, offset, 0); uint capture_size_words = 10; int dma_chan = dma_claim_unused_channel(true); dma_channel_config c = dma_channel_get_default_config(dma_chan); channel_config_set_read_increment(&c, false); channel_config_set_dreq(&c, pio_get_dreq(pio, sm, false)); dma_channel_configure( dma_chan, &c, &hf_counter, &pio->rxf[sm], capture_size_words, true );
Statistics: Posted by pavel_tech — Sat Apr 12, 2025 4:22 pm