EasyManua.ls Logo

NXP Semiconductors MPC5606S - UART Transmitter

NXP Semiconductors MPC5606S
1344 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
LIN Controller (LINFlex)
MPC5606S Microcontroller Reference Manual, Rev. 7
868 Freescale Semiconductor
23.8.1.2 UART transmitter
In order to start transmission in UART mode, the UART bit and the transmitter enable (TXEN) bit in the
UARTCR must be set. Transmission starts when DATA0 (least significant data byte) is programmed. The
number of bytes transmitted is equal to the value configured by the TDFL[0:1] bits in the UARTCR (see
Table 23-10).
The Transmit buffer is 4 bytes, hence a 4-byte maximum transmission can be triggered. Once the
programmed number of bytes has been transmitted, the DTF bit is set in UARTSR. If the TXEN bit of
UART is reset during a transmission then the current transmission is completed and no further
transmission can be invoked.
23.8.1.3 UART receiver
The UART receiver is active as soon as the user exits Initialization mode and sets the RXEN bit in the
UARTCR. There is a dedicated 4-byte data buffer for received data bytes. Once the programmed number
(RDFL bits) of bytes has been received, the DRF bit is set in UARTSR. If the RXEN bit is reset during a
reception then the current reception is completed and no further reception can be invoked until RXEN is
set.
If a parity error occurs during reception of any byte, then the corresponding PEx bit in the UARTSR is set.
No interrupt is generated in this case. If a framing error occurs in any byte (FE bit in UARTSR is set) then
an interrupt is generated if the FEIE bit in the LINIER is set.
If the last received frame has not been read from the buffer (that is, RMB bit is not reset by the user) then
upon reception of the next byte an overrun error occurs (BOF bit in UARTSR is set) and one message will
be lost. Which message is lost depends on the configuration of the RBLM bit of LINCR1.
If the buffer lock function is disabled (RBLM bit in LINCR1 cleared) the last message stored in
the buffer is overwritten by the new incoming message. In this case the latest message is always
available to the application.
If the buffer lock function is enabled (RBLM bit in LINCR1 set) the most recent message is
discarded and the previous message is available in the buffer.
Table 23-31. Message buffer
Buffer data
register
LIN mode UART mode
BDRL[0:31] Transmit/Receive
buffer
DATA0[0:7] Transmit buffer Tx0
DATA1[0:7] Tx1
DATA2[0:7] Tx2
DATA3[0:7] Tx3
BDRM[0:31] DATA4[0:7] Receive buffer Rx0
DATA5[0:7] Rx1
DATA6[0:7] Rx2
DATA7[0:7] Rx3

Table of Contents

Related product manuals