twteamware / raspberrypi-ptp

How to run IEEE-1588 on RaspberryPi hardware
78 stars 23 forks source link

What hardware do we require to generate a PPS in the GPIO pins? #4

Open MamanAhmadKhan opened 5 years ago

MamanAhmadKhan commented 5 years ago

Hi, I am new to RPI and the PTP concept. 1) First I would like to ask what hardware do we require to generate a PPS pulse in the GPIO of the RPI and how to transfer it to data acquisition board (which is LOGI-PI in this case) for sampling the data? 2) Can we connect the computer with the RPI3 and make the computer as the grandmaster clock synchronising RPI in micro-sec (like through USB to UART connection- laptop to RPI3) treating the RPI as the master and then slave clock with a computer as grandmaster clock?

Thanks a mil in advance.

Best Regards.

gizero commented 5 years ago

Hi!

  1. First I would like to ask what hardware do we require to generate a PPS pulse in the GPIO of the RPI and how to transfer it to data acquisition board (which is LOGI-PI in this case) for sampling the data?

Do you mean that you want to make your RPi a PPS source? If it's the case, I have been looking into it for a while some time ago and pps-generator.md is what I come up with. Once you trust your RPi's clock as a precise source, you can drive a GPIO pin with a PPS pulse. Please note that the driver implemented in patches/0001-pps-add-gpio-PPS-signal-generator.patch is very likely subject to the same issue described here for the parallel port driver this one is based on which is marked as broken in kernel config infrastructure.

  1. Can we connect the computer with the RPI3 and make the computer as the grandmaster clock synchronising RPI in micro-sec (like through USB to UART connection- laptop to RPI3) treating the RPI as the master and then slave clock with a computer as grandmaster clock?

I don't understand what you are trying to do here...

MamanAhmadKhan commented 5 years ago

Thank you so much for the great advice.

In my second query, I am just trying to ask that, Can I use my computer as the grandmaster clock and synchronise it with the RPI3. If yes, then what is the best method of connecting the computer to the RPI3 to get the time synchronisation?

Regards, Maman

On Thu, May 2, 2019 at 2:33 PM Andrea Galbusera notifications@github.com wrote:

Hi!

  1. First I would like to ask what hardware do we require to generate a PPS pulse in the GPIO of the RPI and how to transfer it to data acquisition board (which is LOGI-PI in this case) for sampling the data?

Do you mean that you want to make your RPi a PPS source? If it's the case, I have been looking into it for a while some time ago and pps-generator.md https://github.com/twteamware/raspberrypi-ptp/blob/master/pps-generator.md is what I come up with. Once you trust your RPi's clock as a precise source, you can drive a GPIO pin with a PPS pulse. Please note that the driver implemented in patches/0001-pps-add-gpio-PPS-signal-generator.patch https://github.com/twteamware/raspberrypi-ptp/blob/master/patches/0001-pps-add-gpio-PPS-signal-generator.patch is very likely subject to the same issue described here https://groups.google.com/forum/#!topic/fa.linux.kernel/4iFqiQ3u_LE for the parallel port driver this one is based on which is marked as broken in kernel config infrastructure.

  1. Can we connect the computer with the RPI3 and make the computer as the grandmaster clock synchronising RPI in micro-sec (like through USB to UART connection- laptop to RPI3) treating the RPI as the master and then slave clock with a computer as grandmaster clock?

I don't understand what you are trying to do here...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/twteamware/raspberrypi-ptp/issues/4#issuecomment-488675052, or mute the thread https://github.com/notifications/unsubscribe-auth/AIDTMUYNCEMXZDBXPDXYBP3PTLUT3ANCNFSM4HHEYHCQ .

ahmadexp commented 4 years ago

I spent days over days and I still cannot get the PPS output to work. I am wondering, does the clock needs to be locked in order to get the PPS out working. Also, I still cannot find the /dev/ppt0 device that is mentioned in the documentations. I have no idea where to find the kernel 4.14.71. Are you sure about the third number of the version (71)?