This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PRU question: when to use DMA?

Other Parts Discussed in Thread: AM3359

Hi,

I am making a PRU application that does data collection a number of reasonbly high speed (50 kHz kind of range) external A/D converters.  The PRU is going to basically collect the data, and do minimal processing on it, but the real idea is to get it pushed into circular buffers so that the main processor can use them, with most of the data analysis taking place from higher level software running on linux.

My question is about DMA and the PRU.

The AM3359 PRU has

  • Data Mem0 (8KB)
  • Data mem1 (8KB)
  • Shared RAM (12KB)

As I said in a previous post, I don't really understand why make the distinction, when either PRU can use either DMEM as well as shared memory (they all seem to talk through the 32-bit interconnect bus).

What I'm wondering is: if 12KB is enough, why would I bother with DMA at all, and just have the main CPU access shared RAM through the L3 or L4 (not sure which) interconnects?  All the above memories are mapped into the same global address space, aren't they?

The DMA modes I have read about in the PRU examples all have DMA basically being memory-to-memory copy anyhow.  If I could get the DMA to work differently, where the PRU could efficiently send a single byte at a time over DMA, I'd do that.  I'm just not quite sre how.

--Chris

  • Chris,

      I'm working on making an AD converter cape for BB too, my current design involves MCSPI and an Altera CPLD as glue logic between am335x and ADC. But when I recently learned PRU of am335x, I decided to try to use PRU because it got larger memory then the buffer of MCSPI, also with PRU I might be able to remove CPLD from the design, which is good, because I really do not to like to  hand solder that thing.

      So my question is how's your AD converter project go? Any insight to the DMA & PRU questions?

    Thanks

    Guoqiang