Skip to content

PIO and DMA: how to auto-re-trigger ? #14420

Answered by maximeg
maximeg asked this question in RP2040 / Pico
Discussion options

You must be logged in to vote

Thanks @mendenm for the tips.

I was able to have a control DMA writing the address of the data to the CHx_AL3_READ_ADDR_TRIG register of the data DMA to reset its read address and trigger it. And the data DMA now chains to that control DMA, that does an infinite loop.
Since the control DMA only read and write one thing (a two word address), having inc_read=False, inc_write=False makes it handy.

This was sporty and required to deep dive into the doc but it works! Now PIO feeding is completely handled by DMA.
And since I was able to time a single transfer from 3 to 6ms (limited by the state machine ingestion), that's quite a nice FPS for the buffer to display step.

addresses_of_data = array.a…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by maximeg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants