enabled by writing '1' to the corresponding bit in the Interrupt Enable Set register (INTENSET), and
disabled by writing '1' to the corresponding bit in the Interrupt Enable Clear register (INTENCLR).
An interrupt request is generated when the interrupt flag is set and if the corresponding interrupt is
enabled. The interrupt request remains active until either the interrupt flag is cleared, the interrupt is
disabled, or the SPI is reset. For details on clearing interrupt flags, refer to the INTFLAG register
description.
The SPI has one common interrupt request line for all the interrupt sources. The value of INTFLAG
indicates which interrupt is executed. Note that interrupts must be globally enabled for interrupt requests.
Refer to
Nested Vector Interrupt Controller
for details.
Related Links
Nested Vector Interrupt Controller
on page 44
33.6.4.3. Events
Not applicable.
33.6.5. Sleep Mode Operation
The behavior in sleep mode is depending on the master/slave configuration and the Run In Standby bit in
the Control A register (CTRLA.RUNSTDBY):
•
Master operation, CTRLA.RUNSTDBY=1: The peripheral clock GCLK_SERCOM_CORE will
continue to run in idle sleep mode and in standby sleep mode. Any interrupt can wake up the
device.
•
Master operation, CTRLA.RUNSTDBY=0: GLK_SERCOMx_CORE will be disabled after the
ongoing transaction is finished. Any interrupt can wake up the device.
•
Slave operation, CTRLA.RUNSTDBY=1: The Receive Complete interrupt can wake up the device.
•
Slave operation, CTRLA.RUNSTDBY=0: All reception will be dropped, including the ongoing
transaction.
33.6.6. Synchronization
Due to asynchronicity between the main clock domain and the peripheral clock domains, some registers
need to be synchronized when written or read.
The following bits are synchronized when written:
•
Software Reset bit in the CTRLA register (CTRLA.SWRST)
•
Enable bit in the CTRLA register (CTRLA.ENABLE)
•
Receiver Enable bit in the CTRLB register (CTRLB.RXEN)
Note:
CTRLB.RXEN is write-synchronized somewhat differently. See also
for details.
Required write-synchronization is denoted by the "Write-Synchronized" property in the register
description.
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
656