RM0402 Rev 6 811/1163
RM0402 Serial peripheral interface/ inter-IC sound (SPI/I2S)
862
26 Serial peripheral interface/ inter-IC sound (SPI/I2S)
26.1 Introduction
The SPI/I²S interface can be used to communicate with external devices using the SPI
protocol or the I
2
S audio protocol. SPI or I
2
S mode is selectable by software. SPI mode is
selected by default after a device reset.
The serial peripheral interface (SPI) protocol supports half-duplex, full-duplex and simplex
synchronous, serial communication with external devices. The interface can be configured
as master and in this case it provides the communication clock (SCK) to the external slave
device. The interface is also capable of operating in multimaster configuration.
The Inter-IC sound (I
2
S) protocol is also a synchronous serial communication interface. It
can operate in slave or master mode with full-duplex and half-duplex communication.
It can address four different audio standards including the Philips I
2
S standard, the MSB-
and LSB-justified standards and the PCM standard.
Warning: Since some SPI1 pins may be mapped onto some pins used
by the JTAG interface, you can either map SPI/I2S onto other
pins, disable the JTAG and use the SWD interface prior to
configuring the pins listed as SPI I/Os (when debugging the
application) or disable both JTAG/SWD interfaces (for
standalone applications). For more information on the
configuration of the JTAG/SWD interface pins, please refer to
Section 7.3.2: I/O pin multiplexer and mapping.