21 I
2
S
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
21-9
4
3
5, 6
4, 5, 6
6
Empty
I2SSTART
I2SBUSY
FIFO
I2S_WS pin
FIFOSTAT[2:0]
I2SFIFOFF
I2SFIFOEF
Interrupt
1, 2, 3, 4
2
2
3
2
3
2, 3, 4
2, 3, 4, 5
One empty interrupt
Write 4 L & R data (1–4)
Write 1 L & R data (5)
Write 1 L & R data (6)
3, 4, 5
3, 4, 5, 6
1L
1R
2L
2R
3L
3R
4L
4R
5L
5R
6L
6R
1
0
Start
Empty
5.1 FIFO Data and Interrupts
Figure 21.
The 16-bit register I2S_FIFO is used to write the output data to the FIFO. Up to four stereo data (16 bits
×
2 channels (L & R)
×
4) can be written to the FIFO when it is absolutely empty.
Use a 16-bit or 32-bit memory write instruction for writing data. Note that 8-bit memory write instructions
cannot be used.
When a 16-bit memory write instruction is used, first write 16-bit L-channel data to address 0x301410, and
then 16-bit R-channel data to address 0x301412. Both channel data must be written as a pair even if “mono”
is selected as the output channel mode.
When a 32-bit memory write instruction is used, write both L-channel data (low-order 16-bits) and R-chan-
nel data (high-order 16-bits) to address 0x301410 (fixed address).
For more information on the I
2
S interrupt, see Section 21.6.1.
6.2) Using DMA transfer
The I
2
S module includes two different types of DMA mode.
DMA transfers are invoked by the cause of one-empty interrupt regardless of the DMA mode set. The inter-
rupt signal is output to both the ITC and DMAC. Therefore, DMA transfer can be performed without gener-
ating any I
2
S interrupt.
• Single channel DMA mode
If L-channel and R-channel audio data are sequentially stored in one memory area, use single channel
DMA mode. Use 32-bit data transfer to write both L (low-order 16 bits) and R (high-order 16 bits) data to
the FIFO (fixed address 0x301410) for each DMA request.
Note that 16-bit and 8-bit data transfers cannot be specified when single channel DMA mode is used.
• Dual channel DMA mode
If L-channel and R-channel audio data are stored in different locations, use dual channel DMA mode. In
this case, perform 16-bit data transfer to write L-channel data to the FIFO (fixed address 0x301410) via
DMA Ch.0 and to write R-channel data to the FIFO (fixed address 0x301412) via DMA Ch.1.
Note that 8-bit and 32-bit data transfers cannot be specified when dual channel DMA mode is used. Also be
aware that the DMA priority for L-channel data must be higher than that of R-channel data.
For more information on the DMA transfer, see Section 21.6.2.
The I
2
S module provides two status flags I2SFIFOFF/I2S_FIFO_STAT register and I2SFIFOEF/I2S_FIFO_
STAT register to show the FIFO empty or full status.
When four stereo data is written to the FIFO, the FIFO becomes full and I2SFIFOFF is set to 1. Note that the
newest data of the FIFO is overwritten if data is written to I2S_FIFO in this status.
When the FIFO becomes empty, I2SFIFOEF is set to 1. When data is written to the FIFO, I2SFIFOEF is reset
to 0. Note, however, that the I
2
S module continues idle status until the FIFO becomes full again.