Data Sheet

449
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181G–SAM-D21_Datasheet–09/2015
Figure 25-8. IrDA Transmit Encoding
The reception decoder has two main functions. The first is to synchronize the incoming data to the IrDA baud rate
counter. Synchronization is performed at the start of each zero pulse. The second function is to decode incoming Rx
data. If a pulse width meets the minimum length set by configuration (RXPL.RXPL), it is accepted. When the baud rate
counter reaches its middle value (1/2 bit length), it is transferred to the receiver.
Figure 25-9 illustrates reception where RXPL.RXPL is set to 19. This indicates that the pulse width should be at least 20
SE clock cycles. When assuming BAUD = 0xE666 or 160 SE cycles per bit, this corresponds to 2/16 baud clock as
minimum pulse width required. In this case the first bit is accepted as a zero, the second bit is a one, and the third bit is
also a one. A low pulse is rejected since it does not meet the minimum requirement of 2/16 baud clock.
Figure 25-9. IrDA Receive Decoding
Note that the polarity of the transmitter and receiver are opposite. During transmission, a zero bit is transmitted as a one
pulse. During reception, an accepted zero pulse is received as a zero bit.
25.6.3.4 Break Character Detection and Auto-baud
Break character detection and auto-baud are available with the following configuration:
z Auto-baud frame format (CTRLA.FORM = 0x04 or 0x05)
z Asynchronous mode (CTRLA.CMODE = 0).
z 16x sample rate using fractional baud rate generation (CTRLA.SAMPR = 1).
The auto-baud follows the LIN format. All LIN Frames start with a Break Field followed by a Sync Field. The USART uses
a break detection threshold of greater than 11 nominal bit times at the configured baud rate. At any time, if more than 11
consecutive dominant bits are detected on the bus, the USART detects a Break Field. When a Break Field has been
detected, the Receive Break interrupt flag (INTFLAG.RXBRK) is set and the USART expects the Sync Field character to
be 0x55. This field is used to update the actual baud rate in order to stay synchronized. If the received Sync character is
not 0x55, then the Inconsistent Sync Field error flag (STATUS.ISF) is set along with the Error interrupt flag
(INTFLAG.ERROR) and the baud rate is unchanged.
Figure 25-10.LIN Break and Sync Fields
IrDA encoded TXD
TXD
1 baud clock
3/16 baud clock
IrDA encoded RXD
RXD
Baud clock
20 SE clock cycles
0 0.5
1
1.5
2
2.5
Break Field Sync Field
8 bit times