Deleted Added
full compact
uart.4 (286591) uart.4 (293781)
1.\"
2.\" Copyright (c) 2003 Marcel Moolenaar
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\"

--- 9 unchanged lines hidden (view full) ---

18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
1.\"
2.\" Copyright (c) 2003 Marcel Moolenaar
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\"

--- 9 unchanged lines hidden (view full) ---

18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\" $FreeBSD: head/share/man/man4/uart.4 286591 2015-08-10 20:08:09Z ian $
26.\" $FreeBSD: head/share/man/man4/uart.4 293781 2016-01-12 18:42:00Z ian $
27.\"
27.\"
28.Dd August 10, 2015
28.Dd December 9, 2015
29.Dt UART 4
30.Os
31.Sh NAME
32.Nm uart
33.Nd driver for Universal Asynchronous Receiver/Transmitter (UART) devices
34.Sh SYNOPSIS
35.Cd "device uart"
36.Pp

--- 118 unchanged lines hidden (view full) ---

155The
156.Nm
157driver can capture PPS timing information as defined in RFC 2783.
158The API, accessed via
159.Xr ioctl 8 ,
160is available on the tty device.
161To use the PPS capture feature with
162.Xr ntpd 8 ,
29.Dt UART 4
30.Os
31.Sh NAME
32.Nm uart
33.Nd driver for Universal Asynchronous Receiver/Transmitter (UART) devices
34.Sh SYNOPSIS
35.Cd "device uart"
36.Pp

--- 118 unchanged lines hidden (view full) ---

155The
156.Nm
157driver can capture PPS timing information as defined in RFC 2783.
158The API, accessed via
159.Xr ioctl 8 ,
160is available on the tty device.
161To use the PPS capture feature with
162.Xr ntpd 8 ,
163symlink the tty device to
163symlink the tty callout device
164.Va /dev/cuau?
165to
164.Va /dev/pps0.
165.Pp
166The
167.Va hw.uart.pps_mode
168tunable configures the PPS capture mode for all uart devices;
169it can be set in
170.Xr loader.conf 5 .
171The
172.Va dev.uart.0.pps_mode
173sysctl configures the PPS capture mode for a specific uart device;
174it can be set in
175.Xr loader.conf 5
176or
177.Xr sysctl.conf 5 .
166.Va /dev/pps0.
167.Pp
168The
169.Va hw.uart.pps_mode
170tunable configures the PPS capture mode for all uart devices;
171it can be set in
172.Xr loader.conf 5 .
173The
174.Va dev.uart.0.pps_mode
175sysctl configures the PPS capture mode for a specific uart device;
176it can be set in
177.Xr loader.conf 5
178or
179.Xr sysctl.conf 5 .
180.Pp
178The following capture modes are available:
179.Bl -tag -compact -offset "mmmm" -width "mmmm"
181The following capture modes are available:
182.Bl -tag -compact -offset "mmmm" -width "mmmm"
180.It 0
183.It 0x00
181Capture disabled.
184Capture disabled.
182.It 1
185.It 0x01
183Capture pulses on the CTS line.
186Capture pulses on the CTS line.
184.It 2
185Capture pulses on the DCD line (default).
187.It 0x02
188Capture pulses on the DCD line.
186.El
189.El
190.Pp
191The following values may be ORed with the capture mode to configure
192capture processing options:
193.Bl -tag -compact -offset "mmmm" -width "mmmm"
194.It 0x10
195Invert the pulse (RS-232 logic low = ASSERT, high = CLEAR).
196.It 0x20
197Attempt to capture narrow pulses.
198.El
199.Pp
200Add the narrow pulse option when the incoming PPS pulse width is small
201enough to prevent reliable capture in normal mode.
202In narrow mode the driver uses the hardware's ability to latch a line
203state change; not all hardware has this capability.
204The hardware latch provides a reliable indication that a pulse occurred,
205but prevents distinguishing between the CLEAR and ASSERT edges of the pulse.
206For each detected pulse, the driver synthesizes both an ASSERT and a CLEAR
207event, using the same timestamp for each.
208To prevent spurious events when the hardware is intermittently able to
209see both edges of a pulse, the driver will not generate a new pair of
210events within a half second of the prior pair.
211Both normal and narrow pulse modes work with
212.Xr ntpd 8 .
213.Pp
214Add the invert option when the connection to the uart device uses TTL
215level signals, or when the PPS source emits inverted pulses.
216RFC 2783 defines an ASSERT event as a higher-voltage line level, and a CLEAR
217event as a lower-voltage line level, in the context of the RS-232 protocol.
218The modem control signals on a TTL-level connection are typically
219inverted from the RS-232 levels.
220For example, carrier presence is indicated by a high signal on an RS-232
221DCD line, and by a low signal on a TTL DCD line.
222This is due to the use of inverting line driver buffers to convert between
223TTL and RS-232 line levels in most hardware designs.
224Generally speaking, a connection to a DB-9 style connector is an RS-232
225level signal at up to 12 volts.
226A connection to header pins or an edge-connector on an embedded board
227is typically a TTL signal at 3.3 or 5 volts.
187.Sh FILES
188.Bl -tag -width ".Pa /dev/ttyu?.init" -compact
189.It Pa /dev/ttyu?
190for callin ports
191.It Pa /dev/ttyu?.init
192.It Pa /dev/ttyu?.lock
193corresponding callin initial-state and lock-state devices
194.Pp

--- 20 unchanged lines hidden ---
228.Sh FILES
229.Bl -tag -width ".Pa /dev/ttyu?.init" -compact
230.It Pa /dev/ttyu?
231for callin ports
232.It Pa /dev/ttyu?.init
233.It Pa /dev/ttyu?.lock
234corresponding callin initial-state and lock-state devices
235.Pp

--- 20 unchanged lines hidden ---