UART
22 UART
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
22.1 Introduction
The Universal Asynchronous Receiver/Transmitter (UART) API provides a set of functions for using
the UART modules. Functions are provided to configure and control the UART modules, to send
and receive data, and to manage interrupts for the UART modules.
The UART performs the functions of parallel-to-serial and serial-to-parallel conversions. It is very
similar in functionality to a 16C550 UART, but is not register-compatible.
Some of the features of the UART are:
A 16x12 bit receive FIFO and a 16x8 bit transmit FIFO.
Programmable baud rate generator.
Automatic generation and stripping of start, stop, and parity bits.
Line break generation and detection.
Programmable serial interface
• 5, 6, 7, or 8 data bits
• even, odd, stick, or no parity bit generation and detection
• 1 or 2 stop bit generation
• baud rate generation, from DC to processor clock/16
IrDA serial-IR (SIR) encoder/decoder.
DMA interface
22.2 Functions
Functions
void ROM_UART9BitAddrSend (uint32_t ui32Base, uint8_t ui8Addr)
void ROM_UART9BitAddrSet (uint32_t ui32Base, uint8_t ui8Addr, uint8_t ui8Mask)
void ROM_UART9BitDisable (uint32_t ui32Base)
void ROM_UART9BitEnable (uint32_t ui32Base)
void ROM_UARTBreakCtl (uint32_t ui32Base, bool bBreakState)
bool ROM_UARTBusy (uint32_t ui32Base)
int32_t ROM_UARTCharGet (uint32_t ui32Base)
int32_t ROM_UARTCharGetNonBlocking (uint32_t ui32Base)
void ROM_UARTCharPut (uint32_t ui32Base, uint8_t ui8Data)
bool ROM_UARTCharPutNonBlocking (uint32_t ui32Base, uint8_t ui8Data)
bool ROM_UARTCharsAvail (uint32_t ui32Base)
uint32_t ROM_UARTClockSourceGet (uint32_t ui32Base)
April 8, 2013 249