I making some DMA examples with connection between PRU and ARM.
So I need to measure the time between two PRU code commands.
The simplest way to do it on the ARM side is using library time or something like that.
Are there some software method to do the same on the PRU side?
Each PRU has a CYCLE register which counts the number of cycles since the PRU was enabled. They also have a STALL register that counts how many times the PRU stalled fetching an instruction.
I’ve have some notes about them in the PRU Cookbook.
It may not be exactly what you want, but, for quick measurements, I tend to toggle a bit on R30 and use an oscilloscope connected to the corresponding pin.