21 I
2
S
21-12
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
• When filling the FIFO before enabling the interrupt
The application program should write four stereo data to the FIFO first, and then enable the in-
terrupt.
• When filling the FIFO after enabling the interrupt
The application program can enable the interrupt directly. The FIFO becomes full when the first
whole-empty interrupt, second half-empty interrupt, or fourth one-empty interrupt occurs after
the interrupt is enabled.
DMA Transfer
21.6.2
The cause of one empty interrupt can invoke a DMA. This allows continuous data output through DMA transfer be-
tween memory and the FIFO. The interrupt signal is output to both the ITC and DMAC. Therefore, DMA transfer
can be performed without generating any I
2
S interrupt.
The following lists the DMAC channels that allow selection of the I
2
S one-empty interrupt cause as the trigger.
DMAC Ch.0: Used for L and R data transfer with single DMA, or L data transfer with dual DMA.
DMAC Ch.1: Used for L and R data transfer with single DMA, or R data transfer with dual DMA.
Use single or dual DMAC channels according to the audio data storing method.
Single channel DMA mode
When L-channel and R-channel audio data are sequentially stored in a memory area, use a DMAC channel and
perform 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 transfer cannot be specified.
Dual channel DMA mode
When L-channel and R-channel audio data are stored in different locations, use DMAC Ch.0 and Ch.1. In this
case, perform 16-bit data transfer to write L-channel data to the FIFO (fixed address 0x301410) using DMAC
Ch.0 and to write R-channel data to the FIFO (fixed address 0x301412) using DMAC Ch.1. The I
2
S one-empty
DMA request is sent to DMAC Ch.0 and Ch.1 simultaneously. However, DMAC Ch.0 starts a DMA transfer
first as it priority over Ch.1. Therefore, DMAC Ch.0 must be used for L-channel data transfer. Since DMAC
Ch.0 transfers L-channel data first, then DMAC Ch.1 transfers R-channel data, enable DMAC Ch.1 end-of-
transfer interrupt only. The DMAC Ch.0 end-of-transfer interrupt should be disabled. In the DMAC Ch.1 inter-
rupt handler, configure the DMAC transfer counter, memory access address and enable DMAC for both Ch.0
and Ch.1. Note that 8-bit and 32-bit data transfer cannot be specified when dual DMA channels are used.
For more information on DMA transfer, see the “DMA Controller (DMAC)” chapter.
Control Register Details
21.7
7.1 List of I
Table 21.
2
S Registers
Address
Register name
Function
0x301400 I2S_CTL
I
2
S Control Register
Sets the I
2
S output conditions.
0x301404 I2S_DV_MCLK
I
2
S Master Clock Division ratio Register
Configures the master clock.
0x301406 I2S_DV_AUDIO_CLK I
2
S Audio Clock Division ratio Register
Configures the audio clock.
0x301408 I2S_START
I
2
S Start/Stop Register
Controls/indicates I
2
S start/stop status.
0x30140a I2S_FIFO_STAT
I
2
S FIFO Status Register
Indicates the FIFO status.
0x30140c I2S_INT
I
2
S Interrupt Control Register
Controls I
2
S interrupts.
0x301410 I2S_FIFO
I
2
S FIFO Register
L-channel output data
0x301412
R-channel output data
The following describes each I
2
S register. These are all 16-bit registers.
Note: When data is written to the registers, the “Reserved” bits must always be written as 0 and not 1.