Figure 31-3. Baud Rate Generator
Base
Period
Selectable
Internal Clk
(GCLK)
Ext Clk
CTRLA.MODE[0]
0
1
0
1
0
1
0
1
f
ref
Clock
Recovery
Tx Clk
Rx Clk
CTRLA.MODE
/2
/8
/1
/2
/16
Baud Rate Generator
contains equations for the baud rate (in bits per second) and the BAUD register value for each
operating mode.
For asynchronous operation, there are two different modes: In
arithmetic mode
, the BAUD register value
is 16 bits (0 to 65,535). In
fractional mode
, the BAUD register is 13 bits, while the fractional adjustment is
3 bits. In this mode the BAUD setting must be greater than or equal to 1.
For synchronous operation, the BAUD register value is 8 bits (0 to 255).
Table 31-2. Baud Rate Equations
Operating Mode Condition
Baud Rate (Bits Per Second)
BAUD Register Value Calculation
Asynchronous
Arithmetic
�
����
≤
�
���
S
�
����
=
�
���
S 1 −
����
65536
���� = 65536 ⋅ 1 − � ⋅
�
����
�
���
Asynchronous
Fractional
�
����
≤
�
���
S
�
����
=
�
���
S ⋅ ���� +
��
8
���� =
�
���
� ⋅ �
����
− ��
8
Synchronous
�
����
≤
�
���
2
�
����
=
�
���
2 ⋅ ���� + 1
���� =
�
���
2 ⋅ �
����
− 1
S
- Number of samples per bit. Can be 16, 8, or 3.
The Asynchronous Fractional option is used for auto-baud detection.
The baud rate error is represented by the following formula:
Error = 1 − ExpectedBaudRate
ActualBaudRate
Asynchronous Arithmetic Mode BAUD Value Selection
The formula given for f
BAUD
calculates the average frequency over 65536 f
ref
cycles. Although the BAUD
register can be set to any value between 0 and 65536, the actual average frequency of f
BAUD
over a
single frame is more granular. The BAUD register values that will affect the average frequency over a
single frame lead to an integer increase in the cycles per frame (CPF)
��� =
�
���
�
����
� + �
where
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
597