How To Use the HMDMA device in Address Decrement Mode.
I wish to use MDMA to push a two dimensional FFT complex FIFO array in the AXI Memory, using MDMA.
I have an array of 256 * 128 complex floating point numbers, and wish to copy the first 127 columns over the last 127 columns to make room for the next fft. i.e. FIFO.
So I don't write over the data I being moved I have to start copying from the end of the array i.e the last columns and work backwards. To do this I tried using MDMA decrement the address rather than increment.
I have a couple of questions relating to this.
1. Do I set the source and destination addresses for the transfer at the start and start + 1 of the buffer or should I set them at the end. It is not clear, (as usual) in the documentation whether the address gets decremented down from what you put in the registers or whether the MDMA device sets the address at the register address + the byte count register and then decrements from that value, or whether it simply starts at the register address and then decrements from this. In the second case you would have to load the ending address values of the array rather than the start.
2. How do I set up the device using HAL to do this copy within the AXI memory. Must I use doubleword, and what block sized should I set.
I got the MDMA working copying a 256 floating point complex array from the DTCM mamory into the AXI without any problems, but I can't seem to get it working within the AXI memory alone.
I wish to copy the data under interrupts as fast as possible. I am using interrupts as I do the FFT preprocessing and the FFT's in parallel with the FIFO buffer push.
Using the caches and compiler optimization I can do all the DSP in about 12 ms, but the AXI -MDMA thin has me stumped.
RJG