Serial UARTs — Configuration and Implementation Details of Serial UART Support
Support is included in this processor HAL package for the on-chip serial UART devices.
There are two forms of support: HAL diagnostic I/O; and a fully interrupt-driven serial driver. Unless otherwise specified in the platform HAL documentation, for all serial ports the default settings are 115200,8,N,1 with no flow control.
HAL Diagnostic I/O
This first form is polled mode HAL diagnostic output, intended primarily for use during debug and development. Operations are usually performed with global interrupts disabled, and thus this mode is not usually suitable for deployed systems. This can operate on any port, according to the configuration settings.
There are several configuration options usually found within a
platform HAL which affect the use of this support in the IProc
processor HAL. The CDL option
selects the serial port channel to use as the console at startup
time. This will be the channel that receives output from, for
diag_printf(). The CDL option
selects the serial port channel to use for GDB communication by
default. Note that when using RedBoot, these options are usually
inactive as it is RedBoot that decides which channels are
used. Applications may override RedBoot's selections by enabling
option in the HAL. Baud rates for each channel are set with the
Interrupt-driven Serial Driver
The second form of support is an interrupt-driven serial driver,
which is integrated into the eCos standard serial I/O
support can be enabled on any port.
Note that it is not recommended to share this driver when using the HAL diagnostic I/O on the same port. If the driver is shared with the GDB debugging port, it will prevent Ctrl-C operation when debugging.
The main part of this driver is contained in the generic
CYGPKG_IO_SERIAL_GENERIC_16X5X package. The
contains definitions that configure the generic driver for the
IProc. That driver package should also be consulted for
documentation and configuration options. The driver is not active
configuration option within the generic serial driver support
CYGPKG_IO_SERIAL is enabled in the
Support for hardware flow control and modem control lines is present in the driver, but should only be enabled if these control signals are brought out to the physical serial port.
|2018-07-27||eCosPro Non-Commercial Public License|