Atmel SAM4L-EK Atmel ATSAM4L-EK ATSAM4L-EK Data Sheet

Product codes
ATSAM4L-EK
Page of 1204
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 
• Hardware handshaking, described in 
• Modem, described in 
• ISO7816, described in 
• IrDA, described in 
• LIN Master, described in 
• LIN Slave, described in 
• SPI Master, described in 
• SPI Slave, described in 
The operating mode is selected by writing to the Mode field in the 
(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 
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