User manual
...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 467
www.energymicro.com
Figure 17.19. USART Right-justified I2S waveform
USn_CLK
USn_TX/
USn_RX
MSB
Left channelRight channel Right channel
LSBLSB
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 17.20 (p. 467) .
Figure 17.20. USART Mono I2S waveform
USn_CLK
USn_CS
(word select)
USn_TX/
USn_RX
MSB
Left channelRight channel Right channel
LSB MSB
17.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.
17.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