Actions

EmSys

Tm4clib-UART-FIFO-control

From EdWiki

Enabling and controlling UART FIFO

The UART on the LM4F can either be used with a single character TX and RX buffer, or with a 8 character TX and RX FIFO. In order to use the FIFO it must be enabled, this is done with uart_enable_fifo() and can be disabled again with uart_disable_fifo(). On reset the FIFO is disabled, and it must be explicitly be enabled.

When enabling the UART FIFOs, RX and TX interrupts are triggered according to the amount of data in the FIFOs. For the RX FIFO the trigger level is defined by how full the FIFO is. The TX FIFO trigger level is defined by how empty the FIFO is instead.

For example, to enable the FIFOs and trigger interrupts for a single received and single transmitted character:

uart_enable_fifo(UART0);
uart_set_fifo_trigger_levels(UART0, UART_FIFO_RX_TRIG_1_8, UART_FIFO_TX_TRIG_7_8);

Functions