|
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
|
▷ |