APU2 NTP server

I bought an apu2c0. I believe it will make a better NTP server than my other NTP servers.

I bought an apu2c0.  I believe it will make a better NTP server than my other NTP servers.

The reasons I was interested in it:

  • Quad core 1GHz AMD CPU
  • 2x Intel i211AT Gigabit NICs
  • mSATA support
  • USB3 support
  • 2x UARTS (one RS232, one 3.3V)
  • published board schematics
  • access to the Intel NIC software defined pins (SDP)

For more information on the software defined pins, I looked at the i211AT datasheet, "The I211 has four software-defined pins (SDP pins) that can be used for IEEE1588 auxiliary device connections" and "Upon a change in the input level of one of the SDP pins that was configured to detect Timestamp events [...], a time stamp of the system time is captured [...]"

In other words, this NIC can take a GPS PPS input and provide timestamps against its local clock.  This is the same clock that is used to timestamp NTP and IEEE1588/PTP packets.  Having the GPS PPS and the packet timestamps using the same clock greatly reduces the time measurement errors.  Having the timestamps be captured in hardware eliminates the interrupt latency time measurement errors.

Another thing I wanted to know from the datasheet was: what voltages was it expecting?

SDP voltages

So this is just expecting 3.3 volts, which is convenient because all the GPS modules I have are 3.3V.

Next, I located the SDP pins on the schematic for both NICs (LAN2 is not included on my board):

LAN3
LAN1

Next, let's locate them on the physical board:

LAN1
LAN3

Those are some tiny test pads (TP67 & TP69).  I practiced soldering small things first.  After soldering the wires to the test pads, I also put two wires onto nearby ground pads. I put some hot glue on top of my wires in the hopes that they would be less likely to break.  There's a nearby hole in the case already (designed for wifi antennas), so I routed my wires through that.

"finished"

I connected the GPS PPS to the orange wire on LAN3, connected the GPS ground to the APU's ground, and used USB serial to power and communicate with the GPS module.

I'll skip the OS install, because that's already well covered elsewhere.  I went with Fedora 29.

The relevant parts of my chrony.conf:

# xleave = use interleaving for better response timestamp quality
server ntp1.lan minpoll 0 maxpoll 4 xleave
server ntp2.lan minpoll 0 maxpoll 4 xleave
server ntp3.lan minpoll 0 maxpoll 4 xleave
server ntp4.lan minpoll 0 maxpoll 4 xleave

# enable hardware timestamps on all interfaces
hwtimestamp *
# allocate 1MB to client information
clientloglimit 1000000

# use PPS on LAN3(/dev/ptp1), use pin=0 (SDP0), PPS expected to be 700us long
refclock PHC /dev/ptp1:extpps:nocrossts:pin=0 width 0.0007 poll 2 refid GPS pps

Initial results are promising:

MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* GPS                           0   2   377     7     +1ns[  +10ns] +/- 3166ns

Name/IP Address            NP  NR  Span  Frequency  Freq Skew  Offset  Std Dev
==============================================================================
GPS                         6   3    19     -0.001      0.009     -2ns    17ns

Reference ID    : 47505300 (GPS)
Stratum         : 1
Ref time (UTC)  : Thu Jan 31 04:02:51 2019
System time     : 0.000000003 seconds fast of NTP time
Last offset     : +0.000000004 seconds
RMS offset      : 0.000000022 seconds
Frequency       : 21.651 ppm slow
Residual freq   : +0.000 ppm
Skew            : 0.005 ppm
Root delay      : 0.000000001 seconds
Root dispersion : 0.000006471 seconds
Update interval : 4.0 seconds
Leap status     : Normal

More results to come!