EasyManuals Logo

Atmel AVR XMEGA AU series User Manual

Atmel AVR XMEGA AU series
512 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #290 background imageLoading...
Page #290 background image
290
8331B–AVR–03/12
Atmel AVR XMEGA AU
22.7 Register Description
22.7.1 CTRL – Control register
• Bit 7 – CLK2X: Clock Double
When this bit is set, the SPI speed (SCK frequency) will be doubled in master mode (see Table
22-3 on page 291).
• Bit 6 – ENABLE: Enable
Setting this bit enables the SPI module. This bit must be set to enable any SPI operations.
• Bit 5 – DORD: Data Order
DORD decides the data order when a byte is shifted out from the DATA register. When DORD is
written to one, the least-significant bit (lsb) of the data byte is transmitted first, and when DORD
is written to zero, the most-significant bit (msb) of the data byte is transmitted first.
• Bit 4 – MASTER: Master Select
This bit selects master mode when written to one, and slave mode when written to zero. If SS
is
configured as an input and driven low while master mode is set, master mode will be cleared.
• Bit 3:2 – MODE[1:0]: Transfer Mode
These bits select the transfer mode. The four combinations of SCK phase and polarity with
respect to the serial data are shown in Table 22-2 on page 290. These bits decide whether the
first edge of a clock cycle (leading edge) is rising or falling, and whether data setup and sample
occur on the leading or trailing edge.
When the leading edge is rising, the SCK signal is low when idle, and when the leading edge is
falling, the SCK signal is high when idle.
• Bits 1:0 – PRESCALER[1:0]: Clock Prescaler
These two bits control the SPI clock rate configured in master mode. These bits have no effect in
slave mode. The relationship between SCK and the peripheral clock frequency ( clk
PER
) is
shown in Table 22-3 on page 291.
Bit 76543210
+0x00 CLK2X ENABLE DORD MASTER MODE[1:0] PRESCALER[1:0] CTRL
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value00000000
Table 22-2. SPI transfer modes.
MODE[1:0] Group Configuration Leading Edge Trailing Edge
00 0 Rising, sample Falling, setup
01 1 Rising, setup Falling, sample
10 2 Falling, sample Rising, setup
11 3 Falling, setup Rising, sample

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atmel AVR XMEGA AU series and is the answer not in the manual?

Atmel AVR XMEGA AU series Specifications

General IconGeneral
BrandAtmel
ModelAVR XMEGA AU series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals