Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Aug 2019 09:20:17 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        Ian Lepore <ian@freebsd.org>, Per Hedeland <per@hedeland.org>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Is it a good idea to use a usb-serial adapter for PPS? Yes, it is.
Message-ID:  <540c8b5f-5e81-b67b-4a00-49b86044efe0@selasky.org>
In-Reply-To: <cd1b38bb0b8873af96a41bce1b03676f735ae3f9.camel@freebsd.org>
References:  <alpine.BSF.2.21.99999.352.1908071046410.98975@autopsy.pc.athabascau.ca> <69a9bed3-4d0a-f8f6-91af-a8f7d84ee307@hedeland.org> <345bae77417c2495f55799b4c7ca2784f4ece9ed.camel@freebsd.org> <7312032d-2908-9414-0445-6b442c3a02e5@hedeland.org> <523b6f0a0fa5f2aeec298fa74df25d3c4af66acc.camel@freebsd.org> <0426fc8b-5398-d8ab-561e-7823c24403a5@hedeland.org> <24b0eaf25b64d6098b390df092866c69e352d859.camel@freebsd.org> <16c91be1-6f2a-b26d-22c7-be8e4ba8eec0@hedeland.org> <72a964c78cbfc36be2345919633ca2196f0783e3.camel@freebsd.org> <fe2c2d77-3030-6734-e1d8-c1375f231a24@hedeland.org> <cd1b38bb0b8873af96a41bce1b03676f735ae3f9.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2019-08-18 23:57, Ian Lepore wrote:
> I think HPS reads the arm@ list, but I'll cc him directly on this
> reply, just in case he has time to weigh in on this stuff.

Hi,

I'm subscribed.

The behaviour of BULK transfers depend on the actual USB host controller 
manufacturer.

USB transfers are executed by priority, typically:
ISOCHRONOUS, INTERRUPT, CONTROL, BULK

Depending on the endpoint descriptor, the service rate may vary. The 
minimum guarantee is to be serviced one time every 125us (for USB2.0).

Completion interrupts are usually delayed a bit (63-125us for EHCI/XHCI, 
1ms for USB 1.0 via UHCI/OHCI).

The USB stack in FreeBSD does not have any memory allocations in the 
fast path and so is very quick to complete jobs. Also in user-space.

Technically speaking, the time device could make predictions about when 
the packet is read from the USB buffer and when the USB host issues the 
completion interrupt.

These adjustment values could be calibrated by some kind of ping protocol.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?540c8b5f-5e81-b67b-4a00-49b86044efe0>