This is going to be Quick Post showing Maximum Possible Performance of DMA in PIC32MX MCU, These tests are performed with PIC32MX470F512H running at 120Mhz
Short answer:
if you do not want to read further than. My result show DMA can perform 32bit transfers at rate of maximum 10Mhz. This result is quite similar to few other article on web, I do not have answer what exactly limit the maximum transfer rate to 10Mhz, but actual achievable transfer rate may vary depending on the System Bus availability, As System bus is shared between all DMA , CPU and other peripheral.
I have also tried to trigger transfer from timer and external interrupt , any trigger rate above 10Mhz start skipping transfers,
As rule of thumb on PIC32 Maximum achievable trigger rate of DMA is System clock divided by 10, as i have read quite a few places each DMA transfer takes roughly 10 System Clock Cycles.
Experiment 1:
In this test I have setup PMP in slave mode, and we will using DMA to push data out of MCU over 8Bit Parallel Master port(PMP). PMP is also set to Interrupt on each transfer which will trigger DMA to copy one byte from a lookup table into PMDOUT register.
lookup table looks like this
uint8_t look_up[]=
{
1,
1<<1,
1<<2,
1<<3,
1<<4,
1<<5,
1<<6,
1<<7,
};
This look up table will display like this on oscilloscope output :
RD is active low , which is set to active. and D0 to D7 shows lookup table on PMP 8bit Data output port.
|
DMA byte transfer rate ~100ns each transfer, DMA free triggered by PMP Transfer |
Each Byte transfer trigger next DMA transfer of next byte, DMA also start automatically when when all bytes from table transferred, This test show Each byte take same amount of time of ~100ns.