I think that this is by design according to Marshal | GHI Electronics, but it would help me do what I am trying to do. Is there any way around this?
I am still using 2.4.0.1000, so I don’t know - is it possible to make changes to DMA registers in RLP code?
My goal is to take what DigitalSignal.Generate is doing, but make it use circular DMA, so that with the timer (say TIM2 for PB3) modified to run in slave mode, I can have PB3 output the same waveform over and over again on the same external trigger. Does this make sense?
We can add a repeat mode by setting the timeout to -1 for an infinite duration. That would make things much easier for you, right?
I don’t think users can access the DMA registers—that’s by design.
Please let me know if I’ve understood your requirements correctly.
So setting the last element of the array to -1 would make the waveform repeat? Yes, I think that would be great!
No, adding -1 into the buffer doesn’t feel like the right approach.
Instead, we could add a repeatCount parameter to the Generate method:
public void Generate(uint[] data, uint offset, uint count, uint multiplier, GpioPinValue startingPolarity, int repeatCount)
repeatCount = 10 → Repeat the waveform 10 times.
- Default value:
1 (run once).
repeatCount = -1 → Repeat forever until the user calls Abort() .
Does that sound good?
Yes, that sounds good. Thanks!
The hardest part is eliminating the gap between repetitions. Circular DMA would solve it, but things don’t always work as we thought. 
We’ll keep you updated on our progress.
1 Like