Datasheet

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
(1)
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
16f
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
8f
BAUD
------------------ - 1
⎝⎠
⎛⎞
=
f
BAUD
f
PER
2
---------- -
<
f
BAUD
f
PER
2 BSEL 1+()
------------------------------------ -=
BSEL
f
PER
2f
BAUD
------------------ - 1=
BSCALE BSEL BSCALE BSEL
10 01
20 03
30 07
40 015
50 031
60 063
70 0 127
f
XCK
f
PER
4
---------- -
<