Document number
204911
Version
Rev. K
Issue date
2016-10-11
Sirius Breadboard User Manual
www.aacmicrotec.com
Page
33
of
106
5.5. UART
5.5.1. Description
This driver is using the de facto standard interface for a 16550D UART given in [RD5] and
as such has an 8-bit interface, but has been expanded to provide a faster and more delay-
tolerant implementation.
5.5.1.1. RX/TX buffer depth
The RX and TX FIFOs have been expanded to 128 characters compared to the original
specification of 16 characters. To be backwards compatible as well as being able to utilize
the larger depth of the FIFOs, a new parameter has been brought in called buffer depth. The
set buffer depth decides how much of the FIFOs real depth it should base its calculations
on. Buffer depth affects both RX and TX FIFOs handling in the RTEMS driver.
5.5.1.2. Trigger levels
To be able to utilize the larger FIFOs, the meaning of the trigger levels have been changed.
In the specification in [RD5], it defines the trigger levels as 1 character, 4 characters, 8
characters and 14 characters. This has now been changed to instead mean 1 character, 1/4
of the FIFO is full, 1/2 of the FIFO is full and the FIFO is 2 characters from the given buffer
depth top. This results in the IP being fully backwards compatible, since a buffer depth of 16
characters would yield the same trigger levels as those given in [RD5].
5.5.2. RTEMS API
This API represents the driver interface of the module from an RTEMS user application's
perspective.
The driver functionality is accessed through the RTEMS POSIX API for ease of usage. In
case of a failure on a function call, the
errno
value is set for determining the cause.
5.5.2.1. Function int open(...)
Opens access to the requested UART. Only blocking mode is supported.
Upon each open call the device interface is reset to 115200 bps and its default mode
according to the table below.
Argument name
Type
Direction
Description
pathname
const char *
in
The absolute path to the file that is to be
opened.
See table below for uart naming.
flags
Int
in
A bitwise 'or' separated list of values that
determine the method in which the file is to be
opened (whether it should be read only,
read/write etc). See below.
Flags
Description
O_RDONLY
Open for reading only.
O_WRONLY
Open for writing only.
O_RDWR
Open for reading and writing.