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.

AM3359: Concurrent access to PRU shared memory

Part Number: AM3359

Hello,

I'm sharing some data between the PRU cores: PRU0 reads some bytes written by PRU1. The data are in PRU_SHAREDMEM: org = 0x00010000 len = 0x00003000  CREGISTER=28  /* 12kB Shared RAM */. Do I need to implement my own locking mechanism or is it guaranteed that only one PRU can access the shared memory at a time? The point is to avoid reading the bytes at the same time when they're written.

Many thanks!

  • Hello Remus,

    It is not guaranteed that only one PRU is accessing the shared memory at a time, so you will want to implement your own locking mechanism.

    If you are trying to send data from one core to another (e.g. if your vision was that PRU0 places data in shared memory, signals to PRU1 that the data is ready, and PRU1 reads the memory), TI does have an example using interrupts you can build off of. Go to the PRU software support package (in your Linux Processor SDK under example-packages/pru-icss.../ or at the git repo git.ti.com/.../ , read the description if you want to download a tar file of the repo). Take a look at examples/am335x/PRU_Direct_Connect0 and PRU_Direct_Connect1.

    Regards,
    Nick