In order for this driver to work, the local clock must be set to within +-500 ms by another means, such as a radio clock or NTP itself. The PPS signal is connected via a serial port and gadget box consisting of a one-shot and RS232 level converter. When operated at 38.4 kbps with a SPARCstation IPC, this arrangement has a worst-case jitter less than 26 us.
There are three ways in which this driver can be used. The first way uses the ppsclock line discipline and works only for the baseboard serial ports of the Sun SPARCstation running SunOS 4.x. The PPS signal is connected via the gadget box to the carrier detect (DCD) line of a serial port. The signal is activated for this port by a fudge flag3 1 command following the server command in the configuration file. This causes the ppsclock streams module to be configured for that port and to capture a timestamp at the on-time transition of the PPS signal. This driver then reads the timestamp directly by a designated ioctl() system call. This provides the most accurate time and least jitter of any other scheme. There is no need to configure a dedicated device for this purpose, which ordinarily is the device used for the associated radio clock.
The second way uses the tty_clk line discipline and works for any architecture supporting a serial port. If after a few seconds this driver finds no ppsclock module configured, it attempts to open a serial port device /dev/pps%d, where %d is the unit number, and assign the tty_clk line discipline to it. If the line discipline fails, no harm is done except the accuracy is reduced somewhat. The pulse generator in the gadget box must be adjusted to produce a start bit of length 26 usec at 38400 bps. Used with the tty_clk line discipline, this produces an ASCII DEL character ('\377') followed by a timestamp at the on-time transition of the PPS signal.
The third way involves an auxiliary radio clock driver which calls the PPS driver with a timestamp captured by that driver. This use is documented in the source code for the driver(s) involved.
Additional Information