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.

Linux/BEAGLEBOARD-X15: PRU

Part Number: BEAGLEBOARD-X15

Tool/software: Linux

hii..

I want to write a python program to read the PRU Shared memory 

like : I store a data in PRU shared memory with 

LDI32      r2,0x00010000

LDI32      r3,30

SBBO      &r3, r2, 0, 4

now I want to write a python script to read that memory (0x00010000) = 0x4a310000

so, please help me with the approach and example codes. Thankyou

  • Pratik,

    I am going to restate your question, please correct me if I am wrong: You want to know how to access PRU memory from Linux user space.

    Regards,
    Nick
  • yes :: I want to access PRU shared memory :: using python.

    this Is a similar c code example.. I want write something like this program but in python.
    github.com/.../readPRU.c
  • Hello Pratik,

    It is up to you to figure out how you want to access PRU memory in python. TI does not provide python examples for interacting with the PRU from ARM.

    There are multiple ways of reading values from the PRU. One way from the command line is to use devmem2. See the UART Pins don't work with PRU post for an example of setting a value in PRU memory and reading it with devmem2.

    The example you pointed to uses /dev/mem to directly access the PRU memory. That is another valid method. You might need sudo permissions for it to work though, so I am not sure if it is a good solution for distribution code.

    You could use RPMsg to send information back and forth between user space and the PRU. Within the Linux Processor SDK, see example-applications/pru-icss.../examples/am335x/PRU_ADC_onChip for an example that uses RPMsg to communicate between ARM user space code and PRU.

    Finally, you could also write your own kernel module, and the kernel module could directly access the PRU memory.

    Regards,

    Nick