English
Language : 

LM3S5D51 Datasheet, PDF (640/1266 Pages) Texas Instruments – Stellaris® LM3S5D51 Microcontroller
Universal Asynchronous Receivers/Transmitters (UARTs)
13.3.7.1
LIN Master
The UART is enabled to be the LIN master by setting the MASTER bit in the UARTLCTL register.
The length of the Sync Break is programmable using the BLEN field in the UARTLCTL register and
can be 13-16 bits (baud clock cycles).
13.3.7.2
LIN Slave
The LIN UART slave is required to adjust its baud rate to that of the LIN master. In slave mode, the
LIN UART recognizes the Sync Break, which must be at least 13 bits in duration. A timer is provided
to capture timing data on the 1st and 5th falling edges of the Sync field so that the baud rate can
be adjusted to match the master.
After detecting a Sync Break, the UART waits for the synchronization field. The first falling edge
generates an interrupt using the LME1RIS bit in the UARTRIS register, and the timer value is
captured and stored in the UARTLSS register (T1). On the fifth falling edge, a second interrupt is
generated using the LME5RIS bit in the UARTRIS register, and the timer value is captured again
(T2). The actual baud rate can be calculated using (T2-T1)/8, and the local baud rate should be
adjusted as needed. Figure 13-5 on page 640 illustrates the synchronization field.
Figure 13-5. LIN Synchronization Field
Sync Break
Synch Field
0 1 2 3 4 5 6 7 8 9 10 11 12 13
Sync Break Detect
0
1
2
3
4
5
6
7
8
Edge 1
Edge 5
8 Tbit
13.3.8
FIFO Operation
The UART has two 16x8 FIFOs; one for transmit and one for receive. Both FIFOs are accessed via
the UART Data (UARTDR) register (see page 646). Read operations of the UARTDR register return
a 12-bit value consisting of 8 data bits and 4 error flags while write operations place 8-bit data in
the transmit FIFO.
Out of reset, both FIFOs are disabled and act as 1-byte-deep holding registers. The FIFOs are
enabled by setting the FEN bit in UARTLCRH (page 657).
FIFO status can be monitored via the UART Flag (UARTFR) register (see page 651) and the UART
Receive Status (UARTRSR) register. Hardware monitors empty, full and overrun conditions. The
UARTFR register contains empty and full flags (TXFE, TXFF, RXFE, and RXFF bits), and the
UARTRSR register shows overrun status via the OE bit. If the FIFOs are disabled, the empty and
full flags are set according to the status of the 1-byte-deep holding registers.
The trigger points at which the FIFOs generate interrupts is controlled via the UART Interrupt FIFO
Level Select (UARTIFLS) register (see page 663). Both FIFOs can be individually configured to
trigger interrupts at different levels. Available configurations include ⅛, ¼, ½, ¾, and ⅞. For example,
if the ¼ option is selected for the receive FIFO, the UART generates a receive interrupt after 4 data
bytes are received. Out of reset, both FIFOs are configured to trigger an interrupt at the ½ mark.
640
January 23, 2012
Texas Instruments-Production Data