Changing DMA read buffer while running #18652
Replies: 2 comments
|
Keep in mind that the DMA – once activated – automagically transfers the first four (eight) items into the SM-FIFO regardless whether they're needed at the moment. So even if you change the buffer at the DMA read-position and onwards, there's already old stuff in the pipe. |
0 replies
|
Understood, but my events are happening at about a 1 kHz rate. The new data
never takes affect. i’ll post some code later today.
…On Wed, Jan 7, 2026 at 4:56 AM Norbert ***@***.***> wrote:
Keep in mind that the DMA – once activated – automagically transfers the
first four (eight) items into the SM-FIFO regardless whether they're needed
at the moment. So even if you change the buffer at the DMA read-position
and onwards, there's already old stuff in the pipe.
—
Reply to this email directly, view it on GitHub
<#18652 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGO2L6ZO2IWGNEPZTCRYJ34FTQ7RAVCNFSM6AAAAACQ4ETTWGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKNBTGMZTCNQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
My application requires that I change the data in the read buffer while the DMA is enabled/running.
I have an external trigger that is monitored by a PIO state machine running a SPI instance. As soon as the SM demands more data, the DMA starts filling the FIFO. This all works fine. Now, I want to change the source data in the read buffer so that the next trigger will collect the new data instead. I've tried writing to the existing buffer and tried making a new buffer and repointing the dma.read value to the new buffer but neither of these changes the data streamed out on the SPI bus.
What is the recommended approach in this case?
All reactions