I have a developed an application that uses the PRU to capture some data from several I/O pins and then copy this data to a data array of 100 short int values in shared RAM. Once the data is copied to memory the PRU interrupts the CPU to indicate that the data is available and then the PRU spins waiting for a flag in the PRU RAM to be cleared. The ISR in the CPU copies the shared data and then clears the flag in the PRU RAM to release the PRU to can capture a new set of data.
The handshake between the CPU and PRU work as expected but sometimes the data in the shared RAM is not valid. When the data in the shared RAM is not valid it is as if the PRU fails to write to the shared RAM locations. Normally the bad locations are lumped together in groups of 10 to 20 locations but the boundaries of good vs. bad locations are not repeatable or on powers of 2. This problem happens when I have the shared RAM in external DDR and in L3 memory.
I have verified that the problem is with the write of the shared RAM memory by the PRU since I have the PRU writing a constant value into the shared RAM and then checking for this constant value in the ISR.
All of the examples on the PRU transferring data into shared RAM only do the transfer once then halt. In my code the first time the transfer takes place it is always successful but on successive transfers there is a problem.
Is there some limitation on how shared RAM is used with the PRU? Is there a memory speed issue between the PRU clock speed and the clock for the memory? Is there an issue in using shared RAM while running SYS/BIOS? I am using SYS/BIOS ver 6.32.5.54 with this code.