Tom, I had a hard time understanding exactly what your problem is, so I really don't have an answer for you. I'll just try to address the "what you are trying to do part", because it seems you may be making things harder on yourself.
Firstly, I am taking that what you mean by "a nanosecond scale" is actually "on the order of nanoseconds". A PRU instruction takes 5ns to execute and I'm counting at least 4 or 5 instructions in that loop. A solution for you to completely avoid the issues you have by using another pin (polled by the linux kernel, which will give you some non deterministic timing) is to do everything in the PRU. First, use the dedicated RAM in the PRUs. The bridge to the rest of the ARM core (OCP) is not in the real-time domain of the PRUs and has to deal with clashes and resources being occupied by the kernel. Second, use the PRU to ARM interrupt to signal that there was an edge. You'll get less latency and lower jitter, although you really can't do much better than lower here. Also, PRUs have two RAM banks so you can do a ping pong buffer too. If your problem requires you to do some action on the rising edges (and any delay or jitter is unacceptable in your application), I would suggest you do everything in the PRUs (if it is not too complicated, after all there's some code size limitations). Sorry I couldn't be of more help. If you give me more details on your applications, I can try again... ;) Cheers! -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.