...the world's most energy friendly microcontrollers
2014-07-02 - Tiny Gecko Family - d0034_Rev1.20
201
www.silabs.com
In mono-mode, the word-select signal pulses at the beginning of each word instead of toggling for each
word. Mono I2S waveform is shown in Figure 15.20 (p. 201) .
Figure 15.20. USART Mono I2S waveform
USn_CLK
USn_CS
(word select )
USn_TX/
USn_RX
MSB
Left channel
Right channel
Right channel
LSB
MSB
15.3.3.6.3 Using I2S Mode
When using the USART in I2S mode, DATABITS in USARTn_FRAME must be set to 8 or 16 data-bits.
8 databits can be used in all modes, and 16 can be used in the modes where the number of bytes in the
I2S word is even. In addition to this, MSBF in USARTn_CTRL should be set, and CLKPOL and CLKPHA
in USARTn_CTRL should be cleared.
The USART does not have separate TX and RX buffers for left and right data, so when using I2S in stereo
mode, the application must keep track of whether the buffers contain left or right data. This can be done
by observing TXBLRIGHT, RXDATAVRIGHT and RXFULLRIGHT in USARTn_STATUS. TXBLRIGHT
tells whether TX is expecting data for the left or right channel. It will be set with TXBL if right data is
expected. The receiver will set RXDATAVRIGHT if there is at least one right element in the buffer, and
RXFULLRIGHT if the buffer is full of right elements.
When using I2S with DMA, separate DMA requests can be used for left and right data by setting
DMASPLIT in USARTn_I2SCTRL.
In both master and slave mode the USART always starts transmitting on the LEFT channel after being
enabled. In master mode, the transmission will stop if TX becomes empty. In that case, TXC is set.
Continuing the transmission in this case will make the data-stream continue where it left off. To make
the USART start on the LEFT channel after going empty, disable and re-enable TX.
15.3.4 PRS-triggered Transmissions
If a transmission must be started on an event with very little delay, the PRS system can be used
to trigger the transmission. The PRS channel to use as a trigger can be selected using TSEL in
USARTn_TRIGCTRL. When a positive edge is detected on this signal, the receiver is enabled if RXTEN
in USARTn_TRIGCTRL is set, and the transmitter is enabled if TXTEN in USARTn_TRIGCTRL is set.
Only one signal input is supported by the USART.
The AUTOTX feature can also be enabled via PRS. If an external SPI device sets a pin high when there is
data to be read from the device, this signal can be routed to the USART through the PRS system and be
used to make the USART clock data out of the external device. If AUTOTXTEN in USARTn_TRIGCTRL
is set, the USART will transmit data whenever the PRS signal selected by TSEL is high given that there
is enough room in the RX buffer for the chosen frame size. Note that if there is no data in the TX buffer
when using AUTOTX, the TX underflow interrupt will be set.
AUTOTXTEN can also be combined with TXTEN to make the USART transmit a command to the
external device prior to clocking out data. To do this, disable TX using the TXDIS command, load the
Summary of Contents for EFM32TG
Page 543: ......