Skip to content

Commit 28db6b6

Browse files
committed
slight doc refresh
1 parent 0d8687a commit 28db6b6

File tree

4 files changed

+51
-41
lines changed

4 files changed

+51
-41
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Summary
1818

1919
A software defined, industry-standard, UART (Universal Asynchronous
2020
Receiver/Transmitter) library
21-
that allows you to control a UART serial connection via the
22-
xCORE GPIO ports. This library is controlled
21+
that allows the user to control a UART serial connection via the
22+
xcore GPIO ports. This library is controlled
2323
via XC using the XMOS multicore extensions.
2424

2525
********

doc/rst/lib_uart.rst

Lines changed: 46 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,44 @@ Inroduction
88

99
A software defined, industry-standard, UART (Universal Asynchronous
1010
Receiver/Transmitter) library
11-
that allows you to control a UART serial connection via the
12-
xCORE GPIO ports. This library is controlled
11+
that allows the user to control a UART serial connection via the
12+
xcore GPIO ports. This library is controlled
1313
via XC using the XMOS multicore extensions.
1414

15+
|newpage|
16+
17+
``lib_uart`` components
18+
=======================
19+
20+
There are four ways to use the UART library detailed in the table below.
21+
22+
.. list-table::
23+
:widths: 20 80
24+
:header-rows: 1
25+
26+
* - UART type
27+
- Description
28+
* - Standard
29+
- Standard UARTs provide a flexible, fully configurable UART for
30+
speeds up to 115200 baud. The UART connects to ports via the GPIO
31+
library so can be used with single bits of
32+
multi-bit ports. Transmit can be buffered or unbuffered. The UART
33+
components run on a logical core but are combinable so can be
34+
run with other tasks on the same core (though the timing may be affected).
35+
* - Fast/streaming
36+
- The fast/streaming UART components provide a fixed configuration
37+
fast UART that streams data in and out via a streaming channel.
38+
* - Half-duplex
39+
- The half-duplex component performs receive and transmit on the
40+
same data line. The application controls the direction of the
41+
UART at runtime. It is particularly useful for RS485 connections.
42+
* - Multi-UART
43+
- The multi-UART components efficiently run several UARTS on the
44+
same core using a multibit port.
45+
46+
Using ``lib_uart``
47+
==================
48+
1549
``lib_uart`` is intended to be used with the `XCommon CMake <https://www.xmos.com/file/xcommon-cmake-documentation/?version=latest>`_
1650
, the `XMOS` application build and dependency management system.
1751

@@ -49,7 +83,7 @@ rate which is the number of bits per second.
4983
Connecting to the `xcore` device
5084
================================
5185

52-
If you are using the general UART Rx/Tx components then the UART line
86+
If using the standard UART Rx/Tx components then the UART line
5387
can be connected to a bit of any port. The other bits of the port can
5488
be shared using the GPIO library. Please refer to the GPIO library
5589
user guide for restrictions on sharing bits of a port (for example,
@@ -93,9 +127,9 @@ the pins of the port not connected (:ref:`connect_multi`).
93127

94128
For multi-UART receive, an incoming clock is required to acheive
95129
standard baud rates. The clock should be a multiple of the maximum
96-
BAUD rate required e.g. a 1843200Khz oscillator is a multiple of
130+
BAUD rate required e.g. a 1843200 Hz oscillator is a multiple of
97131
115200 baud (and lower rates also). The maximum allowable incoming
98-
signal is 1843200Khz.
132+
signal is 1843200 Hz.
99133

100134
For multi-UART transmit, an incoming clock can also be used. The same
101135
clock signal can be shared between receive and transmit (i.e. only a
@@ -107,35 +141,7 @@ single 1-bit port need be used).
107141
Usage
108142
*****
109143

110-
The are four ways to use the UART library detailed in the table below.
111-
112-
.. list-table::
113-
:widths: 20 80
114-
:header-rows: 1
115-
116-
* - UART type
117-
- Description
118-
* - Standard
119-
- Standard UARTs provide a flexible, fully configurable UART for
120-
speeds up to 115200 baud. The UART connects to ports via the GPIO
121-
library so can be used with single bits of
122-
multi-bit ports. Transmit can be buffered or unbuffered. The UART
123-
components runs on a logical core but are combinable so can be
124-
run with other tasks on the same core (though the timing may be affected).
125-
* - Fast/streaming
126-
- The fast/streaming UART components provide a fixed configuration
127-
fast UART that streams data in and out via a streaming channel.
128-
* - Half-duplex
129-
- The half-duplex component performs receive and transmit on the
130-
same data line. The application controls the direction of the
131-
UART at runtime. It is particularly useful for RS485 connections (link?)
132-
* - Multi-UART
133-
- The multi-UART components efficiently run several UARTS on the
134-
same core using a multibit port.
135-
136-
All the UARTs use the XMOS multicore extensions to C (xC) to perform
137-
their operations, see the `XMOS Programming
138-
Guide` for more details.
144+
The following sections describe the four ways to use the UART library.
139145

140146
Standard UART usage
141147
===================
@@ -186,8 +192,8 @@ component and connects to them:
186192
}
187193
188194
The ``output_gpio`` task and ``input_gpio_with_events`` tasks are part
189-
of the GPIO library for flexible use of multi-bit ports. See the GPIO
190-
library user guide for details.
195+
of the GPIO library for flexible use of multi-bit ports.
196+
See the `GPIO library user guide <https://www.xmos.com/file/lib_gpio>`_ for details.
191197

192198
The application can use the client end of the interface connection to
193199
perform UART operations e.g.:
@@ -261,6 +267,8 @@ transmitted and that there is more space in the buffer by calling the
261267
The unbuffered UART does not take its own logical core but calls to
262268
``write`` will block until the character has been sent.
263269

270+
|newpage|
271+
264272
Fast/Streaming UART usage
265273
=========================
266274

@@ -487,7 +495,7 @@ The multi-UART RX component must be clocked of a rate which is a
487495
multiple of the BAUD rates required.
488496

489497
If a port is not explicitly configured, then it will be clocked of the
490-
reference 100Mhz clock of the xCORE. The TX component can also work
498+
reference 100Mhz clock of the xcore. The TX component can also work
491499
with this clock rate.
492500

493501
|newpage|
@@ -531,7 +539,7 @@ Multi-UART example
531539
==================
532540

533541
The multi-UART example demonstrates the use of the multi-UART API to loopback data between multi-UART Tx and Rx components .
534-
This example requires 2 8-bit ports and a shared clock.
542+
This example requires two 8-bit ports and a shared clock.
535543
The ports chosen are *XS1_PORT_8B* on tile 0 (*X0D14* - *X0D21* in the top left header) and *XS1_PORT_8A* on tile 1 (*X1D02* - *X1D08* in the bottom left header and *CODEC RST_N* which is *X1D09*).
536544
The application will generate a PLL clock on *MCLK* (*X1D11*) which needs to be shared with tile 0 *XS1_PORT_1A* (*X0D00*) port.
537545
Make sure to connect 8-bit ports and the share the clock for the example to work.

doc/substitutions.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
.. _XMOS Programming Guide: https://www.xmos.com/download/XMOS-Programming-Guide-(documentation)(E).pdf/
2+
.. _XMOS Programming Guide: https://www.xmos.com/documentation/XM-014363-PC/html/prog-guide/index.html

settings.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ documentation:
1111
substitutions_path: doc/substitutions.inc
1212
root_doc: doc/rst/lib_uart.rst
1313
linkcheck_ignore_regex: ['']
14+
latex_toc_depth: 3
15+
latex_secnum_depth: 3
1416
cognidox_part_number: XM-006381-UG
1517
doxygen_projects:
1618
lib_uart:

0 commit comments

Comments
 (0)