Browse over 10,000 Electronics Projects

PMP Parallel Master Port DMA Performance (Specifically PIC32MX470F512H)

PMP Parallel Master Port DMA Performance (Specifically PIC32MX470F512H)

[Article by Gaurav Singh at Embedded Engineering Blog]


This is going to be Quick Post showing Maximum Possible Performance of DMA in PIC32MX MCU.

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,
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[]=
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.
Experiment 2:
As PMP also support Buffered Transfer , image blow taken from PIC32MX PMP datasheet.

in this experiment same lookup table will be transferred PMP set into buffed mode with PMP DMA trigger interrupt generated on every 4th byte. we will use 4byte PMDOUT buffer. Now DMA will be triggered on every 4th byte transfer and DMA will transfer 4byte in one go instead of 1byte.
As displayed by images blow , byte pattern remain same but you can see prebuffered byte take around ~30ns to transfer while as DMA triggers on every 4th byte, it takes same as before ~100ns.

DMA Trigger every 4th Byte , Transfers 4byte in one go into PMP buffer. Prebuffered bytes takes ~30ns



Read Original Article