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.

AM6442: Is there a way to define a shared memory region in the DDR memory between PRU and LINUX ?

Part Number: AM6442

Tool/software:

Hello,

I'm actually in the process of looking for a way to share data between the PRU and the A53 running Linux. The problem is that I will acquire up to 8 channels of ADC (for one PRU core) samples during a long period, so all this data will not fit into the PRU's local RAM. I also need a very quick way to store this data while acquiring the samples, because the sampling frequency is quite high and I have to track a signal of 2 MHz on PRU GPIO (CMOS parallel protocol). I was planning to directly write data to DDR from the PRUs, which I tested and seems to work well and is pretty quick, but I'm struggling to read the values from Linux userspace.

SDK: ti-processor-sdk-linux-am64xx-evm-11.01.05.03

  • Hello Safidy,

    Timeframes

    What is your timeframe of need?

    I actually want to spend some time digging into exposing shared memory and interrupts between PRU and Linux userspace. But I won't have bandwidth to start doing development or tests myself until September. I could also serve as a technical resource for you if you wanted to start doing development on your end in August.

    Let's talk details 

    During development, you could use /dev/mem to expose memory up to userspace. However, that requires elevated permissions, and typically people do not want userspace to have that kind of permissions in their final application.

    We have a zerocopy example for exposing a shared memory region between the R5F cores and Linux userspace. At this point in time, I am not sure if it would work with PRU, or if it could be easily modified to work with PRU: https://git.ti.com/cgit/rpmsg/rpmsg_char_zerocopy/tree/linux/README.md

    Another option would be to write a custom character driver to expose up a memory region to userspace to use.

    Regards,

    Nick