Atmel Xplained Pro Evaluation Kit for the ATSAMD21J18A Microcontroller ATSAMD21-XPRO ATSAMD21-XPRO Data Sheet

Product codes
ATSAMD21-XPRO
Page of 1018
468
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181C–SAM-D21_Datasheet–07/2014
26.5.6 Events
Not applicable.
26.5.7 Debug Operation
When the CPU is halted in debug mode, the SPI continues normal operation. If the SPI is configured in a way that 
requires it to be periodically serviced by the CPU through interrupts or similar, improper operation or data loss may result 
during debugging. The SPI can be forced to halt operation during debugging. Refer to the Debug Control (DBGCTRL) 
register for details.
26.5.8 Register Access Protection
All registers with write-access are optionally write-protected by the Peripheral Access Controller (PAC), except the 
following registers:
z
Interrupt Flag Clear and Status register (INTFLAG)
z
Status register (STATUS)
z
Data register (DATA)
Write-protection is denoted by the Write-Protection property in the register description.
When the CPU is halted in debug mode, all write-protection is automatically disabled. 
Write-protection does not apply for accesses through an external debugger. Refer to 
26.5.9 Analog Connections
Not applicable.
26.6 Functional Description
26.6.1 Principle of Operation
The SPI is a high-speed synchronous data transfer interface. It allows fast communication between the device and 
peripheral devices. 
The SPI can operate as master or slave. As master, the SPI initiates and controls all data transactions. The SPI is single 
buffered for transmitting and double buffered for receiving. When transmitting data, the Data register can be loaded with 
the next character to be transmitted while the current transmission is in progress. For receiving, this means that the data 
is transferred to the two-level receive buffer upon reception, and the receiver is ready for a new character.
The SPI transaction format is shown in 
, where each transaction can contain one or more characters. The 
character size is configurable, and can be either 8 or 9 bits.
Figure 26-2. SPI Transaction Format
The SPI master must initiate a transaction by pulling low the slave select line (_SS) of the desired slave. The master and 
slave prepare data to be sent in their respective shift registers, and the master generates the serial clock on the SCK line. 
Character
Transaction
MOSI/MISO
_SS
Character 0
 
 
Character 1
Character 2