-
Notifications
You must be signed in to change notification settings - Fork 52
Description
I would be interested in using the OLA to be able to log time signals with really high accuracy (typically microseconds, us).
I have done this in the past, and this is actually not very hard: all what is needed is log the PPS (Pulse Per Second) pin of a GPS receiver with an interrupt, i.e. for example (may be possible to do even better):
- connect the PPS output of a GPS module to a pin PIN_IN
- enable a rising edge interrupt on PIN_IN
- set up the ISR to i) get the value of the us timestamp on the board and write it to a volatile variable, ii) set a flag that a rising edge time has been captured
- have a function, called regularly in the main program loop, that i) checks for the flag, ii) if set, logs the us timestamp and resets the flag. This function should be called typically twice a second, to make sure a rising edge is never lost (these will happen only every 1 s anyways)
Then, at post processing, I can interpolate the MCU time base from millis or micros onto the UTC time base by combining the logs from the GPS and from the PPS, and the interpolation / matching has us accuracy.
My question: could such a functionality be offered on the OLA (of course it may require soldering 1 wire PPS <-> interrupt enabled pin, but that is fine enough :) )? That would be super useful and make the OLA usable for many more applications on my end :) .