266
XMEGA B [DATASHEET]
8291B–AVR–01/2013
Figure 21-2. Clock generation logic, block diagram.
21.3.1 Internal Clock Generation - The Fractional Baud Rate Generator
The fractional baud rate generator is used for internal clock generation for asynchronous modes, synchronous master
mode, and master SPI mode operation. The output frequency generated (f
BAUD
) is determined by the period setting
(BSEL), an optional scale setting (BSCALE), and the peripheral clock frequency (f
PER
calculating the baud rate (in bits per second) and for calculating the BSEL value for each mode of operation. It also
shows the maximum baud rate versus peripheral clock frequency. BSEL can be set to any value between 0 and 4095.
BSCALE can be set to any value between -7 and +7, and increases or decreases the baud rate slightly to provide the
fractional baud rate scaling of the baud rate generator.
When BSEL is 0, BSCALE must also be 0. Also, the value 2
ABS(BSCALE)
must at most be one half of the minimum number
of clock cycles a frame requires. For more details, see
“Fractional Baud Rate Generation” on page 274
Table 21-1. Equations for calculating baud rate register settings.
Baud Rate
Generator
/2
BSEL
/4
/2
Sync
Register
f
OSC
XCK
Pin
txclk
CLK2X
UMSEL [1]
DDR_XCK
0
1
0
1
xcki
xcko
DDR_XCK
rxclk
0
1
1
0
Edge
Detector
PORT_INV
f
BAUD
Operating Mode
Conditions
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
BSE L
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
BSE L
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
–
=
Summary of Contents for XMEGA B
Page 320: ...320 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 12 7 segments Character Table...
Page 321: ...321 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 13 14 segments Character Table...
Page 322: ...322 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 14 16 segments Character Table...
Page 412: ...412 XMEGA B DATASHEET 8291B AVR 01 2013...
Page 413: ...413 XMEGA B DATASHEET 8291B AVR 01 2013...