Hi Robert,
Thanks for the quick reply.  I am already using a custom overlay and
using the PPS/GPS tools...

trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1548882288.001021883, sequence: 3727 - clear
0.000000000, sequence: 0
source 0 - assert 1548882289.001020522, sequence: 3728 - clear
0.000000000, sequence: 0
^C

On Wed, Jan 30, 2019 at 3:01 PM Robert Nelson <[email protected]> wrote:
>
> On Wed, Jan 30, 2019 at 2:54 PM Thomas Remmert
> <[email protected]> wrote:
> >
> > Hello,
> > I have a contact closure switch connected to P8_14.  When the switch is 
> > activated, P8_14 is brought to ground.  I need to apply a time stamp when 
> > this occurs with millisecond accuracy.
> >
> > 1) I have an adafruit GPS with 1 pps output.  I see the NMEA strings and 
> > have confirmed the 1 PPS is working.
> >
> > 2) I have NTP running with my local GPS and 1PPS source configured.  (Maybe 
> > chrony is a better choice?)
> >
> > 3) Just for testing, I am using the following python code:
> >
> > import Adafruit_BBIO.GPIO as GPIO
> > import time
> > import datetime
> >
> > GPIO.setup("P8_14", GPIO.IN, pull_up_down=GPIO.PUD_UP)
> >
> > #GPIO.add_event_detect("P8_14", GPIO.RISING, callback=my_callback, 
> > bouncetime=1000)
> >
> > while True:
> >         GPIO.wait_for_edge("P8_14", GPIO.RISING)
> >         ttime = datetime.datetime.now()
> >         print(ttime)
> >
> >
> > When I compare my time with a very expensive DAQ, my time stamp is always 
> > off by 2-4ms and it is not a consistent offset.  Does anyone have any other 
> > thoughts at to how I might approach this?  I am needing to get the 
> > timestamp accurate to 1ms.
>
> Use the pps driver, setup an overlay like shown:
>
> https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/PB-UART4-TESEO-LIV3F.dts#L63-L71
>
> Then you can use the pps/gps tools...
>
> Regards,
>
> --
> Robert Nelson
> https://rcn-ee.com/



-- 
Thomas Remmert
Cell: 936-647-6030
Office: 281-203-0855

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAGiPVCua3F%3DUGFiyBReQ02cWk3oo-ykJJnAU2-%3DwWo9Ju7dLVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to