To get sub-millisecond accuracy, you'll need a good timer running that the PRU can read. The timer will have to have good jitter characteristics (within the sub-millisecond requirement), and will have to be synchronized to wall clock time somehow.
I haven't looked at the ADC's sampling time, but you'll probably have to account for that in your quest for accuracy. Many GPS modules have a 1 pulse-per-second signal that's supposed to trigger on the second. You might be able to set up a 1000 Hz (or more) PLL against that to update the timer, and read that from the PRU when you read your ADC sample. You'll have to evaluate the latencies involved in reading the timer register, and reading the ADC (how long from when the voltage was sampled until the ADC result is ready). Once you have those values, you can subtract them from the time you read. You probably don't have to do that math on the PRU, if you don't need the result right away. The timestamp could still be correct, just might take a while to compute (relative to the accuracy you're looking for). I once saw an article in Circuit Cellar about making a very accurate timer using the GPS PPS signal. You might want a hardware PLL to feed the timer clock input (I'm assuming there's one on the BBB, don't know for sure). You might also be able to get a software PLL working on one of the PRU cores, depending on how much else that core needs to do. > On Jan 19, 2015, at 13:00 , Istvan Burbank <[email protected]> wrote: > > > I am reading values from the ADC using the PRU. I need to timestamp the > values with sub-millisecond accuracy, but I'm not sure how to get the clock > time from the PRU. My BBB system clock is updated with a GPS, so pulling time > from that would be ideal. Is this possible? If so, how? > > Regards, > Istvan. > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. -- Rick Mann [email protected] -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
