by the UART. The polarity of transmitted pulses and expected receive pulses can be
inverted so that a direct connection can be made to external IrDA transceiver modules
that use active high pulses.
The infrared submodule receives its clock sources from the LPUART. One of these two
clocks are selected in the infrared submodule to generate either 1/OSR, 2/OSR, 3/OSR, or
4/OSR narrow pulses during transmission.
47.3.5.1 Infrared transmit encoder
The infrared transmit encoder converts serial bits of data from transmit shift register to
the LPUART_TX signal. A narrow pulse is transmitted for a zero bit and no pulse for a
one bit. The narrow pulse is sent at the start of the bit with a duration of 1/OSR, 2/OSR,
3/OSR, or 4/OSR of a bit time. A narrow low pulse is transmitted for a zero bit when
LPUART_CTRL[TXINV] is cleared, while a narrow high pulse is transmitted for a zero
bit when LPUART_CTRL[TXINV] is set.
47.3.5.2 Infrared receive decoder
The infrared receive block converts data from the LPUART_RX signal to the receive
shift register. A narrow pulse is expected for each zero received and no pulse is expected
for each one received. A narrow low pulse is expected for a zero bit when
LPUART_STAT[RXINV] is cleared, while a narrow high pulse is expected for a zero bit
when LPUART_STAT[RXINV] is set. This receive decoder meets the edge jitter
requirement as defined by the IrDA serial infrared physical layer specification.
47.3.6 Interrupts and status flags
The LPUART transmitter has two status flags that can optionally generate hardware
interrupt requests. Transmit data register empty LPUART_STAT[TDRE]) indicates when
there is room in the transmit data buffer to write another transmit character to
LPUART_DATA. If the transmit interrupt enable LPUART_CTRL[TIE]) bit is set, a
hardware interrupt is requested when LPUART_STAT[TDRE] is set. Transmit complete
(LPUART_STAT[TC]) indicates that the transmitter is finished transmitting all data,
preamble, and break characters and is idle with LPUART_TX at the inactive level. This
flag is often used in systems with modems to determine when it is safe to turn off the
modem. If the transmit complete interrupt enable (LPUART_CTRL[TCIE]) bit is set, a
hardware interrupt is requested when LPUART_STAT[TC] is set. Instead of hardware
Chapter 47 Low Power Universal asynchronous receiver/transmitter (LPUART)
K22F Sub-Family Reference Manual , Rev. 3, 7/2014
Freescale Semiconductor, Inc.
1249