Figure 33-7. Hardware Controlled SS
_SS
SCK
T
T = 1 to 2 baud cycles
T
T
T
T
When CTRLB.MSSEN=0, the SS pin(s) is/are controlled by user software and normal GPIO.
33.6.3.6. Slave Select Low Detection
In slave mode, the SPI can wake the CPU when the slave select (SS) goes low. When the Slave Select
Low Detect is enabled (CTRLB.SSDE=1), a high-to-low transition will set the Slave Select Low interrupt
flag (INTFLAG.SSL) and the device will wake up if applicable.
33.6.4. DMA, Interrupts, and Events
Table 33-4. Module Request for SERCOM SPI
Condition
Request
DMA
Interrupt
Event
Data Register Empty (DRE)
Yes
(request cleared when data is written)
Yes
NA
Receive Complete (RXC)
Yes
(request cleared when data is read)
Yes
Transmit Complete (TXC)
NA
Yes
Slave Select low (SSL)
NA
Yes
Error (ERROR)
NA
Yes
33.6.4.1. DMA Operation
The SPI generates the following DMA requests:
•
Data received (RX): The request is set when data is available in the receive FIFO. The request is
cleared when DATA is read.
•
Data transmit (TX): The request is set when the transmit buffer (TX DATA) is empty. The request is
cleared when DATA is written.
33.6.4.2. Interrupts
The SPI has the following interrupt sources. These are asynchronous interrupts, and can wake up the
device from any sleep mode:
•
Data Register Empty (DRE)
•
Receive Complete (RXC)
•
Transmit Complete (TXC)
•
Slave Select Low (SSL)
•
Error (ERROR)
Each interrupt source has its own interrupt flag. The interrupt flag in the Interrupt Flag Status and Clear
register (INTFLAG) will be set when the interrupt condition is met. Each interrupt can be individually
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
655