English
Language : 

SAM4L Datasheet, PDF (573/1185 Pages) ATMEL Corporation – ATSAM ARM-based Flash MCU
ATSAM4L4/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 583
• Hardware handshaking, described in Section 24.6.6 ”Hardware Handshaking” on page 584
• Modem, described in Section 24.6.7 ”Modem Mode” on page 585
• ISO7816, described in Section 24.6.8 ”ISO7816 Mode” on page 586
• IrDA, described in Section 24.6.9 ”IrDA Mode” on page 589
• LIN Master, described in Section 24.6.10 ”LIN Mode” on page 591
• LIN Slave, described in Section 24.6.10 ”LIN Mode” on page 591
• SPI Master, described in Section 24.6.15 ”SPI Mode” on page 603
• SPI Slave, described in Section 24.6.15 ”SPI Mode” on page 603
The operating mode is selected by writing to the Mode field in the “Mode Register” (MR.MODE).
Table 24-3. MR.MODE
MR.MODE
0x0
0x1
0x2
0x3
0x4
0x6
0x8
0xA
0xB
0xE
0xF
Others
Mode of the USART
Normal
RS485
Hardware Handshaking
Modem
IS07816 Protocol: T = 0
IS07816 Protocol: T = 1
IrDA
LIN Master
LIN Slave
SPI Master
SPI Slave
Reserved
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 581
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
42023C–SAM–02/2013
573