IP2022 Users ManualPeripherals
www.ubicom.com
287
4.6.12 SERDES Protocol-Specific Considerations
UART Interface
To set up a SERDES unit for UART mode, select UART mode in
the PRS3:0 bits of the SxMODE register. This causes the data to
be clocked in after a valid start bit is detected. Make sure that the
polarity selected by the RPOREV bit in the SxRCFG register and
the TPOREV bit in the SxTCFG register match the polarity
provided by the RS-232 transceiver. (Most of them are inverted.)
Make sure the bit order is compatible with the data format (RS-232
uses LSB-first bit order). The receiver uses 16X oversampling, so
select a clock divisor that is 16 times the desired baud rate.
To operate in UART mode, depending on the application, either
transmit or receive can be performed first. In both cases, the
configuration register needs to be programmed with a bit count
that is appropriate for the format. The bit count depends on the
number of data bits, stop bits, and parity bits. The start bit is
included in the bit count. The receiver does not check for the
presence of stop bits. To detect framing errors caused by missing
stop bits, increase the receivers bit count (i.e. the RXSCNT field
in the SxRCFG register) and test the trailing bit(s) in software.
SPI Protocol
To set up a SERDES unit for the SPI protocol, set up the clock with
opposing phases for transmit and receive by programming the
SUBM1:0 field of the SxMODE register. If in slave mode, specify
an external clock. If in master mode, specify an internal clock. In
slave mode, software must check if the designated slave select