Any ideas?
Originally shared by Jonathan Rockway
All right, so now I can see how low I can really get the latency in reacting to a PPS signal. Apparently, on the order of 40 nanoseconds with very simple code:
https://github.com/jrockway/pru-experiments/blob/master/copy_pin.c (which is just “while(1) { __R30 = 0x0001 & ((__R31 & 2) >> 1) }”).
Now the question is… what to do with this information. The PRU clock and ARM clock aren’t synchronized, I don’t think, so even though we can communicate between Linux and the PRU, they don’t agree on any timing reference. I will have to think about this more.