Interesting. I have my PIO program working without issues now, yet if I interrupt it and start it again the DMA always freezes, unless I do that command to stop it first. I'm assuming that soft-booting the Pico doesn't reset the DMA states.So your setup - programming in Python and managing to make sufficiently minor mistakes that you haven't crashed the whole thing - is unusual.
Been reading those a lot, but they doin't help much when trying to figure out the syntax of MicroPython commands.Regardless of working in Python or the C SDK, I'd recommend the hardware datasheet as the primary reference to have open in front of you when designing PIO code.
That's what I've settled on doing. Sending bit strings to shift into the displays intermixed with delay values right where the PIO code needs them.Another possibility is where you make the word values written into the FIFO a mix of commands and data - ARM writes 32-bit values containing data in low bits and flag(s) in the high bits to say what to do with it. So a command word from the ARM can be a data value to output, a delay count etc. That sort of pattern turns out to be quite efficient to implement in PIO instructions.
Displays are updating nicely at fast speed and everything is working great now, except the chaining with a pair of DMA channels. I'm still trying to get my head around how that works.
I have dma1 reading from my array and writing to a PIO. How does a second dma channel make that into a loop? Does it monitor and modify control channels? I just need to restart dma1 when it finishes.
Statistics: Posted by iansmith6 — Fri Apr 12, 2024 3:43 pm