PRU - ARM Communication

Greetings,

Thanks for all who will make an effort to answer my querry in advance. I am using Beaglebone Black Rev C with 3.8.x kernel and I’m stuck with establishng inter-communication between one of the cores of the PRU to the main ARM core where the OS lies.Requirement-

The PRU requires a variable which counts number of loops and post execution of this program the OS should have the accessibility to get the data inside this variable and use it to display the number of counts that has happened during program execution.

Questions-

1.How to load the data onto so register such that it can be accesible in ARM or OS end?

2.How to access PRU written data and using it in OS?

3.I have heard a lot about shared RAM used in similar process so does it impy to my application as well? If so how to implement it?

Note: I’m using Python at the OS end, Assembly language to program PRU and a C program to load the Assebly.bin file to PRU for execution.

Thanks for the help .

It sounds like you’re using libprussdrv. In that case it’s pretty simple:

  1. Let the PRU code write the counter value to address 0 (= beginning of DRam), ie. a 4 byte integer.
  2. Get a DRam pointer in the ARM code by function prussdrv_map_prumem(), and read the 4 byte interger value from that address.

BR