Datasheet
578
42023E–SAM–07/2013
ATSAM4L8/L4/L2
24.6 Functional Description
24.6.1 USART Operating Modes
The USART can operate in several modes:
•Normal
• RS485, described in Section 24.6.5 ”RS485 Mode” on page 588
• Hardware handshaking, described in Section 24.6.6 ”Hardware Handshaking” on page 589
• Modem, described in Section 24.6.7 ”Modem Mode” on page 590
• ISO7816, described in Section 24.6.8 ”ISO7816 Mode” on page 591
• IrDA, described in Section 24.6.9 ”IrDA Mode” on page 594
• LIN Master, described in Section 24.6.10 ”LIN Mode” on page 596
• LIN Slave, described in Section 24.6.10 ”LIN Mode” on page 596
• SPI Master, described in Section 24.6.15 ”SPI Mode” on page 608
• SPI Slave, described in Section 24.6.15 ”SPI Mode” on page 608
The operating mode is selected by writing to the Mode field in the “Mode Register” (MR.MODE).
In addition, Synchronous or Asynchronous mode is selected by writing to the Synchronous
Mode Select bit in MR (MR.SYNC). By default, MR.MODE and MR.SYNC are both zero, and the
USART operates in Normal Asynchronous mode.
24.6.2 Basic Operation
To start using the USART, the user must perform the following steps:
1. Configure the baud rate by writing to the Baud Rate Generator Register (BRGR) as
described in ”Baud Rate Generator” on page 586
2. Select the operating mode by writing to the relevant fields in the Mode Register (MR)
3. Enable the transmitter and/or receiver, by writing a one to CR.TXEN and/or CR.RXEN
respectively
Table 24-3. MR.MODE
MR.MODE Mode of the USART
0x0 Normal
0x1 RS485
0x2 Hardware Handshaking
0x3 Modem
0x4 IS07816 Protocol: T = 0
0x6 IS07816 Protocol: T = 1
0x8 IrDA
0xA LIN Master
0xB LIN Slave
0xE SPI Master
0xF SPI Slave
Others Reserved