296
8331B–AVR–03/12
Atmel AVR XMEGA AU
Note:
1. The baud rate is defined to be the transfer rate in bits per second (bps)
For BSEL=0, all baud rates must be achieved by changing BSEL instead of setting BSCALE:
BSEL = (2
BSCALE-1
)
23.3.2
External Clock
External clock (XCK) is used in synchronous slave mode operation. The XCK clock input is sam-
pled on the peripheral clock frequency (f
PER
), and the maximum XCK clock frequency (f
XCK
)is
limited by the following:
For each high and low period, XCK clock cycles must be sampled twice by the peripheral clock.
If the XCK clock has jitter, or if the high/low period duty cycle is not 50/50, the maximum XCK
clock speed must be reduced or the peripheral clock must be increased accordingly.
Table 23-1.
Equations for calculating baud rate register settings.
Operating Mode
Conditions
Baud Rate
Calculation
BSEL Value Calculation
Asynchronous normal
speed mode (CLK2X = 0)
BSCALE
≥
0
BSCALE < 0
Asynchronous double
speed mode (CLK2X = 1)
BSCALE
≥
0
BSCALE < 0
Synchronous and master
SPI mode
f
BAUD
f
PER
16
-----------
≤
f
BAUD
f
PER
2
BSCALE
16(
⋅
BSEL
1)
+
--------------------------------------------------------------
=
BSEL
f
PER
2
BSCALE
16
⋅
f
BAUD
------------------------------------------------
1
–
=
f
BAUD
f
PER
16
-----------
≤
f
BAUD
f
PER
16((2
BSCALE
BSEL
)
⋅
1)
+
-------------------------------------------------------------------
=
BSEL
1
2
BSCALE
---------------------
f
PER
16
f
BAUD
----------------------
1
–
⎝
⎠
⎛
⎞
=
f
BAUD
f
PER
8
-----------
≤
f
BAUD
f
PER
2
BSCALE
8
BSEL
1
+
(
)
⋅ ⋅
---------------------------------------------------------------
=
BSEL
f
PER
2
BSCALE
8
⋅
f
BAUD
---------------------------------------------
1
–
=
f
BAUD
f
PER
8
-----------
≤
f
BAUD
f
PER
8((2
BSCALE
BSEL
)
⋅
1)
+
----------------------------------------------------------------
=
BSEL
1
2
BSCALE
---------------------
f
PER
8
f
BAUD
-------------------
1
–
⎝
⎠
⎛
⎞
=
f
BAUD
f
PER
2
-----------
<
f
BAUD
f
PER
2
BSEL
1
+
(
)
⋅
-------------------------------------
=
BSEL
f
PER
2
f
BAUD
-------------------
1
–
=
BSCALE
BSEL
BSCALE
BSEL
1
0
→
0
1
2
0
→
0
3
3
0
→
0
7
4
0
→
0
15
5
0
→
0
31
6
0
→
0
63
7
0
→
0
127
f
XCK
f
PER
4
-----------
<