Name
Serial UARTs — Configuration and implementation details of serial UART support
Overview
There are two forms of support for the built-in high-speed and console serial UARTs. In all cases the default serial port settings are 115200,8,N,1 with no flow control.
HAL diagnostic I/O
One 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 is not usually suitable for deployed systems. This can operate on either port, according to the configuration settings.
Several configuration options within the IXP4xx processor HAL affect HAL
diagnostic operation. The CDL option
CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL
selects the serial port channel to use as the console at startup time.
Channel 0 is the debug serial port, channel 1 is the high-speed serial
port. This will be the channel that receives output from, for example,
diag_printf()
. The CDL option
CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL
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 the
CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS
CDL option
in the HAL. Baud rates for each channel are set with the
CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD
and
CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD
options.
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 infrastructure
(CYGPKG_IO_SERIAL
). This support can be enabled
on either port. Note that if this form of serial driver is enabled on
a port, it will prevent ctrl-c operation when debugging.
This driver uses the eCos generic 16x5x UART driver found in
CYGPKG_IO_SERIAL_GENERIC_16X5X
to provide most of
the support. That driver package should also be consulted for
documentation and configuration options.
Note that a standard 16550A compatible UART has receive FIFO trigger
levels that can be set with the
CYGPKG_IO_SERIAL_GENERIC_16X5X_FIFO_RX_THRESHOLD
to 1, 4, 7, 8 or 14 bytes. However the IXP4xx family has a larger
64-byte FIFO, and so these values should be mapped to 1, 8, 16 or 32.
In other words setting the
CYGPKG_IO_SERIAL_GENERIC_16X5X_FIFO_RX_THRESHOLD
option to 8 bytes would in fact cause the receive FIFO to trigger at
16 bytes and so forth.
The maximum baud rate supported by the generic eCos infrastructure is 230,400 and so at this time the higher baud rates of 460,800 and 921,600 baud are not supported.
2024-03-18 | eCosPro Non-Commercial Public License |