time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

Designing an embedded precision GPS time server

NS
Nick Sayer
Thu, Oct 26, 2017 12:53 AM

I’ve just completed a project (off topic) with the ATSAMS70 chip and learned a lot in a relatively short time, and I really like the result.

I am considering a new project based on its cousin, the ATSAME70. The E70 has an Ethernet 10/100 MAC built in as well as the rest of the stuff the S70 has (USARTs, SD/MMC, AES-256, TRNG, high-speed USB… it’s quite nice), and Atmel Start (the software development framework I’ve been using) purports to have a ready-to-use IP stack (alas, no IPv6, but it’s a starting point at least).

Where I am going with this is I am considering designing a precision embedded NTP/PTP server. I’d connect one of the SkyTraq modules I’ve got piles of up to a GPIO and USART and the Ethernet port would provide NTP/PTP. The idea behind making it an embedded system would be to try and make it as accurate as it reasonably can be with the hope that (at least on the local segment) it would wind up being more accurate than a Pi Zero doing the same thing. At the very least, you’d expect such a thing to be a whole lot less hassle to set up, given decent firmware.

This may be a fool’s errand, certainly, but looking at it from here, I would think that such a design might offer accuracy in the microsecond range, but that’s just a tremendously uninformed guess at this point (and what does that accuracy mean to a peer that might itself be incapable of better than 2 orders of magnitude coarser?).

Anybody have any ideas or suggestions along these lines?

I’ve just completed a project (off topic) with the ATSAMS70 chip and learned a lot in a relatively short time, and I really like the result. I am considering a new project based on its cousin, the ATSAME70. The E70 has an Ethernet 10/100 MAC built in as well as the rest of the stuff the S70 has (USARTs, SD/MMC, AES-256, TRNG, high-speed USB… it’s quite nice), and Atmel Start (the software development framework I’ve been using) purports to have a ready-to-use IP stack (alas, no IPv6, but it’s a starting point at least). Where I am going with this is I am considering designing a precision embedded NTP/PTP server. I’d connect one of the SkyTraq modules I’ve got piles of up to a GPIO and USART and the Ethernet port would provide NTP/PTP. The idea behind making it an embedded system would be to try and make it as accurate as it reasonably can be with the hope that (at least on the local segment) it would wind up being more accurate than a Pi Zero doing the same thing. At the very least, you’d expect such a thing to be a whole lot less hassle to set up, given decent firmware. This may be a fool’s errand, certainly, but looking at it from here, I would think that such a design might offer accuracy in the microsecond range, but that’s just a tremendously uninformed guess at this point (and what does that accuracy mean to a peer that might itself be incapable of better than 2 orders of magnitude coarser?). Anybody have any ideas or suggestions along these lines?
GE
Gary E. Miller
Thu, Oct 26, 2017 1:34 AM

Yo Nick!

On Wed, 25 Oct 2017 17:53:46 -0700
Nick Sayer via time-nuts time-nuts@febo.com wrote:

This may be a fool’s errand, certainly, but looking at it from here,
I would think that such a design might offer accuracy in the
microsecond range,

I'm looking at 6 Raspberry Pi's right now, each with a different GPS
model.  Running NTPec and kernel PPS.  Adjacent jitter is from 10 to 35
micro seconds over 100 Base-T.

Local PPS jitter, is from 250 ns to up to 3,000 ns.

The biggest issue is the 186 ns granularity in the kernel system
clock.  Then interrupt latency and the usual Linux stuff.

Anybody have any ideas or suggestions along these lines?

This may be not time-nutty enough for here.  Feel free to contact
me off list.

RGDS
GARY

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem@rellim.com  Tel:+1 541 382 8588

    Veritas liberabit vos. -- Quid est veritas?
"If you can’t measure it, you can’t improve it." - Lord Kelvin
Yo Nick! On Wed, 25 Oct 2017 17:53:46 -0700 Nick Sayer via time-nuts <time-nuts@febo.com> wrote: > This may be a fool’s errand, certainly, but looking at it from here, > I would think that such a design might offer accuracy in the > microsecond range, I'm looking at 6 Raspberry Pi's right now, each with a different GPS model. Running NTPec and kernel PPS. Adjacent jitter is from 10 to 35 micro seconds over 100 Base-T. Local PPS jitter, is from 250 ns to up to 3,000 ns. The biggest issue is the 186 ns granularity in the kernel system clock. Then interrupt latency and the usual Linux stuff. > Anybody have any ideas or suggestions along these lines? This may be not time-nutty enough for here. Feel free to contact me off list. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 gem@rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can’t measure it, you can’t improve it." - Lord Kelvin
BK
Bob kb8tq
Thu, Oct 26, 2017 2:40 PM

Hi

Since time stamping hardware does exist for 1588, why not simply put the effort into
folding that into NTP? Then you have a “generic” solution that addresses a lot of the
ambiguity a wide range of cases. It shows up in many of the low end micro’s so it’s
not just a “big box only” solution. It’s not a 100% solution (NTP is not 1588) but it
gets rid of a lot of noise.

Bob

On Oct 25, 2017, at 8:53 PM, Nick Sayer via time-nuts time-nuts@febo.com wrote:

I’ve just completed a project (off topic) with the ATSAMS70 chip and learned a lot in a relatively short time, and I really like the result.

I am considering a new project based on its cousin, the ATSAME70. The E70 has an Ethernet 10/100 MAC built in as well as the rest of the stuff the S70 has (USARTs, SD/MMC, AES-256, TRNG, high-speed USB… it’s quite nice), and Atmel Start (the software development framework I’ve been using) purports to have a ready-to-use IP stack (alas, no IPv6, but it’s a starting point at least).

Where I am going with this is I am considering designing a precision embedded NTP/PTP server. I’d connect one of the SkyTraq modules I’ve got piles of up to a GPIO and USART and the Ethernet port would provide NTP/PTP. The idea behind making it an embedded system would be to try and make it as accurate as it reasonably can be with the hope that (at least on the local segment) it would wind up being more accurate than a Pi Zero doing the same thing. At the very least, you’d expect such a thing to be a whole lot less hassle to set up, given decent firmware.

This may be a fool’s errand, certainly, but looking at it from here, I would think that such a design might offer accuracy in the microsecond range, but that’s just a tremendously uninformed guess at this point (and what does that accuracy mean to a peer that might itself be incapable of better than 2 orders of magnitude coarser?).

Anybody have any ideas or suggestions along these lines?


time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Hi Since time stamping hardware does exist for 1588, why not simply put the effort into folding that into NTP? Then you have a “generic” solution that addresses a lot of the ambiguity a wide range of cases. It shows up in many of the low end micro’s so it’s not just a “big box only” solution. It’s not a 100% solution (NTP is not 1588) but it gets rid of a lot of noise. Bob > On Oct 25, 2017, at 8:53 PM, Nick Sayer via time-nuts <time-nuts@febo.com> wrote: > > I’ve just completed a project (off topic) with the ATSAMS70 chip and learned a lot in a relatively short time, and I really like the result. > > I am considering a new project based on its cousin, the ATSAME70. The E70 has an Ethernet 10/100 MAC built in as well as the rest of the stuff the S70 has (USARTs, SD/MMC, AES-256, TRNG, high-speed USB… it’s quite nice), and Atmel Start (the software development framework I’ve been using) purports to have a ready-to-use IP stack (alas, no IPv6, but it’s a starting point at least). > > Where I am going with this is I am considering designing a precision embedded NTP/PTP server. I’d connect one of the SkyTraq modules I’ve got piles of up to a GPIO and USART and the Ethernet port would provide NTP/PTP. The idea behind making it an embedded system would be to try and make it as accurate as it reasonably can be with the hope that (at least on the local segment) it would wind up being more accurate than a Pi Zero doing the same thing. At the very least, you’d expect such a thing to be a whole lot less hassle to set up, given decent firmware. > > This may be a fool’s errand, certainly, but looking at it from here, I would think that such a design might offer accuracy in the microsecond range, but that’s just a tremendously uninformed guess at this point (and what does that accuracy mean to a peer that might itself be incapable of better than 2 orders of magnitude coarser?). > > Anybody have any ideas or suggestions along these lines? > _______________________________________________ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there.
CC
Chris Caudle
Thu, Oct 26, 2017 4:45 PM

On Thu, October 26, 2017 9:40 am, Bob kb8tq wrote:

Since time stamping hardware does exist for 1588, why not simply put the
effort into folding that into NTP?

According to the Chrony project web page chronyd already includes support
for that.
See "NTP timestamping" section:
https://chrony.tuxfamily.org/comparison.html

--
Chris Caudle

On Thu, October 26, 2017 9:40 am, Bob kb8tq wrote: > Since time stamping hardware does exist for 1588, why not simply put the > effort into folding that into NTP? According to the Chrony project web page chronyd already includes support for that. See "NTP timestamping" section: https://chrony.tuxfamily.org/comparison.html -- Chris Caudle
BK
Bob kb8tq
Thu, Oct 26, 2017 5:17 PM

Hi

So, get it up and running on the 1588 hardware built into one of these “all in one”
MCU’s should be possible. Note the absence of words like easy or straightforward :)

Bob

On Oct 26, 2017, at 12:45 PM, Chris Caudle chris@chriscaudle.org wrote:

On Thu, October 26, 2017 9:40 am, Bob kb8tq wrote:

Since time stamping hardware does exist for 1588, why not simply put the
effort into folding that into NTP?

According to the Chrony project web page chronyd already includes support
for that.
See "NTP timestamping" section:
https://chrony.tuxfamily.org/comparison.html

--
Chris Caudle


time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Hi So, get it up and running on the 1588 hardware built into one of these “all in one” MCU’s should be possible. Note the absence of words like easy or straightforward :) Bob > On Oct 26, 2017, at 12:45 PM, Chris Caudle <chris@chriscaudle.org> wrote: > > On Thu, October 26, 2017 9:40 am, Bob kb8tq wrote: >> Since time stamping hardware does exist for 1588, why not simply put the >> effort into folding that into NTP? > > According to the Chrony project web page chronyd already includes support > for that. > See "NTP timestamping" section: > https://chrony.tuxfamily.org/comparison.html > > -- > Chris Caudle > > > _______________________________________________ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there.
CC
Chris Caudle
Thu, Oct 26, 2017 9:11 PM

On Wed, October 25, 2017 7:53 pm, Nick Sayer via time-nuts wrote:

I am considering a new project based on its cousin, the ATSAME70.

What is a reasonable cost target for that at the volumes you could
produce?  Coming up with something that is a better value than BeagleBone
Black at any kind of hobby project volume seems difficult.

The processor you mentioned has a Cortex-M7 at 300MHz.  BBBB has a
Cortex-A8 running at 1GHz plus a Cortex-M processor available as a
coprocessor. Peripheral set is pretty comparable, and you can buy BBB at
retail for $50 which gets you the faster higher class processor, 512MB of
DRAM and 4GB of flash.  It runs linux right out of the box so you
basically  power it on and have NTP running.

Anybody have any ideas or suggestions along these lines?

On my list of projects to work on is a cape for BeagleBone Black that
takes 10MHz and 1PPS inputs along with a couple of RS232 converters for
the UARTs so you can connect a GPSDO to a BBB to make a time server.  In
my estimation that seemed like the best return on effort.

--
Chris Caudle

On Wed, October 25, 2017 7:53 pm, Nick Sayer via time-nuts wrote: > I am considering a new project based on its cousin, the ATSAME70. What is a reasonable cost target for that at the volumes you could produce? Coming up with something that is a better value than BeagleBone Black at any kind of hobby project volume seems difficult. The processor you mentioned has a Cortex-M7 at 300MHz. BBBB has a Cortex-A8 running at 1GHz plus a Cortex-M processor available as a coprocessor. Peripheral set is pretty comparable, and you can buy BBB at retail for $50 which gets you the faster higher class processor, 512MB of DRAM and 4GB of flash. It runs linux right out of the box so you basically power it on and have NTP running. > Anybody have any ideas or suggestions along these lines? On my list of projects to work on is a cape for BeagleBone Black that takes 10MHz and 1PPS inputs along with a couple of RS232 converters for the UARTs so you can connect a GPSDO to a BBB to make a time server. In my estimation that seemed like the best return on effort. -- Chris Caudle
IY
Iain Young
Thu, Oct 26, 2017 9:26 PM

On 26/10/17 22:11, Chris Caudle wrote:

The processor you mentioned has a Cortex-M7 at 300MHz.  BBBB has a
Cortex-A8 running at 1GHz plus a Cortex-M processor available as a
coprocessor. Peripheral set is pretty comparable, and you can buy BBB at
retail for $50 which gets you the faster higher class processor, 512MB of
DRAM and 4GB of flash.  It runs linux right out of the box so you
basically  power it on and have NTP running.

The BB Green is even better value for money, and why would we need HDMI
for timing apps ? (It also simplifies doing my Poor man's TIC!)

On my list of projects to work on is a cape for BeagleBone Black that
takes 10MHz and 1PPS inputs along with a couple of RS232 converters for
the UARTs so you can connect a GPSDO to a BBB to make a time server.  In
my estimation that seemed like the best return on effort.

Wheen you get around to it, Please consider:

1) multiplying that 10MHz up to 24 MHz as an option
2) RS422 option instead of RS232 (for the Lucent/HP GPS/Rb boxes)
3) PPS routed to TIMER4/5/6/7 rather than any old GPIO
4) Cover _all_ UARTS, even if serial headers are needed, rather than

9-pin D connectors
5) Some method of dropping a 5V PPS down to 3.3V (2N2222 comes to
mind, as does a /2 voltage divider [2.5V is sufficient to trigger the
GPIO pins], I have done both - and yes measured the delay through the
2N2222!)

(Sorry Chris, I was looking at the serial cape options earlier today
to try an santise my lash-ups, and was most disappointed!)

Iain

On 26/10/17 22:11, Chris Caudle wrote: > The processor you mentioned has a Cortex-M7 at 300MHz. BBBB has a > Cortex-A8 running at 1GHz plus a Cortex-M processor available as a > coprocessor. Peripheral set is pretty comparable, and you can buy BBB at > retail for $50 which gets you the faster higher class processor, 512MB of > DRAM and 4GB of flash. It runs linux right out of the box so you > basically power it on and have NTP running. The BB Green is even better value for money, and why would we need HDMI for timing apps ? (It also simplifies doing my Poor man's TIC!) > On my list of projects to work on is a cape for BeagleBone Black that > takes 10MHz and 1PPS inputs along with a couple of RS232 converters for > the UARTs so you can connect a GPSDO to a BBB to make a time server. In > my estimation that seemed like the best return on effort. Wheen you get around to it, *Please* consider: 1) multiplying that 10MHz up to 24 MHz as an option 2) RS422 option instead of RS232 (for the Lucent/HP GPS/Rb boxes) 3) PPS routed to TIMER4/5/6/7 rather than any old GPIO 4) Cover _all_ UARTS, even if serial headers are needed, rather than 9-pin D connectors 5) Some method of dropping a 5V PPS down to 3.3V (2N2222 comes to mind, as does a /2 voltage divider [2.5V is sufficient to trigger the GPIO pins], I have done both - and yes measured the delay through the 2N2222!) (Sorry Chris, I was looking at the serial cape options earlier today to try an santise my lash-ups, and was most disappointed!) Iain
BK
Bob kb8tq
Thu, Oct 26, 2017 10:58 PM

Hi

Why go to the green? Just go with one of these Pocket Beagle’s I have sitting
here wondering what to do with them. They were just a bit under $20 when I
picked them up. I doubt the price will climb over time …… Indeed you could
get two Pi Zero W’s for the pice of the Pocket Beagle. Lash an interface onto
any of them (just like the Green) and get going.

Is any of that cheaper once you get 1588 Ethernet going than a board (or chip) with
integrated Ethernet? My guess is no.

Bob

On Oct 26, 2017, at 5:26 PM, Iain Young iain@g7iii.net wrote:

On 26/10/17 22:11, Chris Caudle wrote:

The processor you mentioned has a Cortex-M7 at 300MHz.  BBBB has a
Cortex-A8 running at 1GHz plus a Cortex-M processor available as a
coprocessor. Peripheral set is pretty comparable, and you can buy BBB at
retail for $50 which gets you the faster higher class processor, 512MB of
DRAM and 4GB of flash.  It runs linux right out of the box so you
basically  power it on and have NTP running.

The BB Green is even better value for money, and why would we need HDMI
for timing apps ? (It also simplifies doing my Poor man's TIC!)

On my list of projects to work on is a cape for BeagleBone Black that
takes 10MHz and 1PPS inputs along with a couple of RS232 converters for
the UARTs so you can connect a GPSDO to a BBB to make a time server.  In
my estimation that seemed like the best return on effort.

Wheen you get around to it, Please consider:

  1. multiplying that 10MHz up to 24 MHz as an option
  2. RS422 option instead of RS232 (for the Lucent/HP GPS/Rb boxes)
  3. PPS routed to TIMER4/5/6/7 rather than any old GPIO
  4. Cover all UARTS, even if serial headers are needed, rather than
    9-pin D connectors
  5. Some method of dropping a 5V PPS down to 3.3V (2N2222 comes to
    mind, as does a /2 voltage divider [2.5V is sufficient to trigger the
    GPIO pins], I have done both - and yes measured the delay through the
    2N2222!)

(Sorry Chris, I was looking at the serial cape options earlier today
to try an santise my lash-ups, and was most disappointed!)

Iain


time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Hi Why go to the green? Just go with one of these Pocket Beagle’s I have sitting here wondering what to do with them. They were just a bit under $20 when I picked them up. I doubt the price will climb over time …… Indeed you could get two Pi Zero W’s for the pice of the Pocket Beagle. Lash an interface onto any of them (just like the Green) and get going. Is any of that cheaper once you get 1588 Ethernet going than a board (or chip) with integrated Ethernet? My guess is no. Bob > On Oct 26, 2017, at 5:26 PM, Iain Young <iain@g7iii.net> wrote: > > On 26/10/17 22:11, Chris Caudle wrote: > >> The processor you mentioned has a Cortex-M7 at 300MHz. BBBB has a >> Cortex-A8 running at 1GHz plus a Cortex-M processor available as a >> coprocessor. Peripheral set is pretty comparable, and you can buy BBB at >> retail for $50 which gets you the faster higher class processor, 512MB of >> DRAM and 4GB of flash. It runs linux right out of the box so you >> basically power it on and have NTP running. > > The BB Green is even better value for money, and why would we need HDMI > for timing apps ? (It also simplifies doing my Poor man's TIC!) > >> On my list of projects to work on is a cape for BeagleBone Black that >> takes 10MHz and 1PPS inputs along with a couple of RS232 converters for >> the UARTs so you can connect a GPSDO to a BBB to make a time server. In >> my estimation that seemed like the best return on effort. > > Wheen you get around to it, *Please* consider: > > 1) multiplying that 10MHz up to 24 MHz as an option > 2) RS422 option instead of RS232 (for the Lucent/HP GPS/Rb boxes) > 3) PPS routed to TIMER4/5/6/7 rather than any old GPIO > 4) Cover _all_ UARTS, even if serial headers are needed, rather than > 9-pin D connectors > 5) Some method of dropping a 5V PPS down to 3.3V (2N2222 comes to > mind, as does a /2 voltage divider [2.5V is sufficient to trigger the > GPIO pins], I have done both - and yes measured the delay through the > 2N2222!) > > (Sorry Chris, I was looking at the serial cape options earlier today > to try an santise my lash-ups, and was most disappointed!) > > > Iain > _______________________________________________ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there.
DP
Denny Page
Fri, Oct 27, 2017 12:38 AM

If you are going to do PTP with ptp4l, or NTP with Chrony, you are going to want hardware timestamping support on the ethernet phy. I would view this as one of the principal concerns in choosing a system.

I’m not sufficiently familiar with Beagles… do any of them support hardware timestamping?

Denny

If you are going to do PTP with ptp4l, or NTP with Chrony, you are going to want hardware timestamping support on the ethernet phy. I would view this as one of the principal concerns in choosing a system. I’m not sufficiently familiar with Beagles… do any of them support hardware timestamping? Denny
BK
Bob kb8tq
Fri, Oct 27, 2017 2:06 AM

Hi

I suspect that once you find a group of chips that do have 1588 embedded in them that
digging into all the nasty details will take a bit. Time stamping to a 1 ms resolution might
not be a very helpful thing ….. There are ex-Freescale / now NXP devices that do have
pretty good 1588 in them. I’m sure they are not the only ones to go down that route.

Bob

On Oct 26, 2017, at 8:38 PM, Denny Page denny@cococafe.com wrote:

If you are going to do PTP with ptp4l, or NTP with Chrony, you are going to want hardware timestamping support on the ethernet phy. I would view this as one of the principal concerns in choosing a system.

I’m not sufficiently familiar with Beagles… do any of them support hardware timestamping?

Denny


time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Hi I suspect that once you find a group of chips that do have 1588 embedded in them that digging into all the nasty details will take a bit. Time stamping to a 1 ms resolution might not be a very helpful thing ….. There are ex-Freescale / now NXP devices that do have pretty good 1588 in them. I’m sure they are not the only ones to go down that route. Bob > On Oct 26, 2017, at 8:38 PM, Denny Page <denny@cococafe.com> wrote: > > If you are going to do PTP with ptp4l, or NTP with Chrony, you are going to want hardware timestamping support on the ethernet phy. I would view this as one of the principal concerns in choosing a system. > > I’m not sufficiently familiar with Beagles… do any of them support hardware timestamping? > > Denny > > > _______________________________________________ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there.