Pico2 DMA Channel Interference #16739
-
I have two WAV players, DMA0 feeding PIO0 and DMA1 feeding PIO1. The PIOs act as a PWM. Either works fine until the other is triggered. Then the second DMA seems to occasionally start without being triggered. I looked at the CH0_READ register and verified it was changing when only CH1 was active. Also, eventually I'll get a DMA CH0 read error. Maybe my pwm1 and pwm2 are not independent?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello Sam, your problem description looks like the DMA channels are triggering each other. From a short inspection of the code I note that
AFAIU contains errors: In order to make DMA programming simpler I devised a class where the DMA configures basically itself, depending on which objects are given it as source and destination. If you don't have an idea what to do next to find the problem, you might try that out. |
Beta Was this translation helpful? Give feedback.
AAARRRGG!
I’m basically describing DMA chaining as a problem. The default configuration is zero so all channels chain back to channel zero unless written to chain to themselves. DMA chaining is an opt out feature!
Surprised this isn’t a more common occurrence.