Is it possible to do DMA chaining?
Hello, I have an Olimex E407 board and I want to do dual Simultaneous ADC triggered by timer and each ADC would have 3 channels each. The read is configured as DMA mode 2
My purpouse with this is to read 3 voltages (ADC1) and 3 currents (ADC2). And I'd also like to use the SIMD and DSP instructions for doig the calculations. From what I've been reading I'd need to have 6 different arrays, one for each voltage and one for each current. The problem is that I get just one array with all the data, like this: v1, i1, v2, i2, v3, i3, ... which basically isn't usable as it is. My idea was to have a fixed DMA in circular mode filling an array with just the 6 measured values, and then configure 6 memory to memory DMAs to transfer one value each to a different array whenever a full transfer complete is done and by doing that the arbiter would decide on the order for the DMA transfers and I'd get my 6 different arrays. Is this possible???
If it isn't I've just read something on the reference manual .... it is possible to chain timersand each timer conects directly to a DMA stream ... which would mean that I could ...
1 - configure ADC to trigger on one timer1(example)
2 - configure another timer(2) to trigger on timer 1 and timer 2 to timer3 ... and so on until I get my 6 different time bases (one for each array)
3 - link dma streams to its corresponding timer event
4 - configure memory to memory transfer for all extra dmas .... where source doesnt increment but destination does
Does the above text seem like something that could work?? I'm going to start implementing this on tuesday, but if someone has already tried something like this ... or maybe dma chaining is possible .. it would be better. My idea by chaining timers and linking them to dma streams is to simulate dma chaining ... seems to be too much trouble ... but the idea seems interesting
#timer #dma #timer-chaini #multimode-adc