![](http://datasheet.mmic.net.cn/Energy-Micro/EFM32TG840F16_datasheet_97240/EFM32TG840F16_194.png)
Preliminary
...the world's most energy friendly microcontrollers
2011-05-19 - d0034_Rev0.91
194
www.energymicro.com
15.3.3.5 Synchronous Half Duplex Communication
Half duplex communication in synchronous mode is very similar to half duplex communication in
the master must generate the bus clock even when it is not transmitting data, i.e. it must provide the
slave with a clock to receive data. To generate the bus clock, the master should transmit data with the
transmitter tristated, i.e. TXTRI in USARTn_STATUS set, when receiving data. If 2 bytes are expected
from the slave, then transmit 2 bytes with the transmitter tristated, and the slave uses the generated
bus clock to transmit data to the master. TXTRI can be set by setting the TXTRIEN command bit in
USARTn_CMD.
Note
When operating as SPI slave in half duplex mode, TX has to be tristated (not disabled)
during data reception if the slave is to transmit data in the current transfer.
15.3.3.6 I2S
I2S is a synchronous format for transmission of audio data. The frame format is 32-bit, but since data is
always transmitted with MSB first, an I2S device operating with 16-bit audio may choose to only process
the 16 msb of the frame, and only transmit data in the 16 msb of the frame.
In addition to the bit clock used for regular synchronous transfers, I2S mode uses a separate word clock.
When operating in mono mode, with only one channel of data, the word clock pulses once at the start of
each new word. In stereo mode, the word clock toggles at the start of new words, and also gives away
whether the transmitted word is for the left or right audio channel; A word transmitted while the word
clock is low is for the left channel, and a word transmitted while the word clock is high is for the right.
When operating in I2S mode, the CS pin is used as a the word clock. In master mode, this is automatically
driven by the USART, and in slave mode, the word clock is expected from an external master.
15.3.3.6.1 Word Format
The general I2S word format is 32 bits wide, but the USART also supports 16-bit and 8-bit words. In
addition to this, it can be specified how many bits of the word should actually be used by the USART.
These parameters are given by FORMAT in USARTn_I2SCTRL.
As an example, configuring FORMAT to using a 32-bit word with 16-bit data will make each word on the
I2S bus 32-bits wide, but when receiving data through the USART, only the 16 most significant bits of
each word can be read out of the USART. Similarly, only the 16 most significant bits have to be written
to the USART when transmitting. The rest of the bits will be transmitted as zeroes.
15.3.3.6.2 Major Modes
The USART supports a set of different I2S formats as shown in
Table 15.9 (p. 194) , but it is not limited
to these modes. MONO, JUSTIFY and DELAY in USARTn_I2SCTRL can be mixed and matched to
create an appropriate format. MONO enables mono mode, i.e. one data stream instead of two which is
the default. JUSTIFY aligns data within a word on the I2S bus, either left or right which can bee seen in
word should be started directly on the edge of the word-select signal, or one bit-period after the edge.
Table 15.9. USART I2S Modes
Mode
MONO
JUSTIFY
DELAY
CLKPOL
Regular I2S
0
1
0
Left-Justified
0
1
Right-Justified
0
1
0
1
Mono
1
0