Commit 37ecaba6 authored by Benoit Rat's avatar Benoit Rat Committed by Alessandro Rubini

doc: update doc with new P/p, C/c mode

parent e0e8e29c
......@@ -1008,23 +1008,55 @@ The current version of the tool supports the following commands:
Configure one or more channels for the specified mode. Each mode
is represented by one character; the latter form above thus
configures all 5 channels by means of a since 5-bytes-long string.
Supported modes are ``@code{I}'' (input),
``@code{0}'' and ``@code{1}'' (output, steady state),
``@code{D}'' (DIO core output) or ``@code{-}'' (unchanged).
configures all 5 channels by means of a 5-bytes-long string,
each characters specifies a mode according to the next table.
@end table
This is the list of supported modes for channels:
@table @code
@item I i
Input mode, with termination or without termination. Uppercase
forces the termination on (the rationale is you need a stronger
signal to drive the input). Termination is 50 Ohm. Pulses on
an input channel are timestamped.
@item C c
``Clock'' input. This mode (with or without termination) is
used to feed a clock to the White Rabbit core (currently the
WR core supports a 10MHz input on channel 4 (the last one).
For other channel, the mode is just like @t{I} or @t{i} but
without timestamping (and thus without a software interrupt).
@item 0 1
Digital output mode, from the GPIO logic core, resp. low and high.
Both modes disable the termination resistor.
@item D d
DIO core output (not the GPIO core). With this mode the channel
is driven by the WR-aware digital I/O, and can thus generate pulses
and so on. Uppercase enables the termination.
A channel managed by the DIO core is normally low and can
pulse high on request (see @code{pulse}
command. Uppercase @code{D} or @code{I} activate the 50-ohm termination
resistor with either WR-DIO or input mode,
while lowercase @code{d} or @code{i} disable the termination.
Currently output modes are always without termination,
but I may add @code{L} and
@code{H} if needed: the hardware supports all combinations).
Please note that the @code{pulse} command turns the affected channel in
@i{DIO} mode anyways (without changing the termination).
command. The termination resistor doesn't make much sense for
output, but the code is provided for consistency with input modes.
@item P p
Pulse per second output from the White Rabbit core. This
@i{pps} is sharper in its absolute time than the one that can be
generated by software using DIO pulses. Again, upper case
selects the termination, for symmetry with input modes.
@end table
Generation of a pulse train is performed by
software running at interrupt time,
because the @i{simple DIO} card and gateware can only emit a single pulse at
......@@ -1100,6 +1132,11 @@ and the @i{simple-DIO} mezzanine card, this package includes
@file{wr-dio-pps}, which features a very small and readable source
file.
The program is meant as a source code example, more than a real PPS
signal. If you need a real WR-driven pulse-per-second, you should
configure the channel accordingly, with ``@t{wr-dio-cmd mode <ch>
p}''.
The program just fires a 1ms-long @i{pps} pulse on one of the output
channels. The device name defaults to @i{wr0} but can specify a different one;
the channel number is a mandatory argument.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment