
V PeRiPheRaL MoDuLes 3 (inteRFaCe): i2s inteRFaCe (i2s)
V-4-10
ePson
s1C33L17 teChniCaL ManuaL
setting interrupt conditions in the i2s module
The following explains settings of the interrupt mode in the I2S module. For the interrupt settings in the ITC,
refer to Section V.4.7, “I2S Interrupt.”
interrupt mode for i2s output (Ch.0)
The I2S CH.0 has an embedded FIFO (24 bits
× 2 channels (L & R) × 4) for storing four stereo data to
be output. The I2S module can generate interrupts to request the application program to write output data
into the FIFO when it reads the data written into the FIFO to output. The I2S CH.0 provides three interrupt
modes with different interrupt timings: half empty interrupt mode, whole empty interrupt mode, and one
empty interrupt mode. Use I2SINTMD0[1:0] (D[3:2]/pI2S_INT_MOD register) to select an interrupt mode.
Furthermore, set I2SINTEN0 (D0/pI2S_INT_MOD register) to 1 to enable the I2S CH.0 interrupt.
i2sintMD0[1:0]: I2S CH.0 Interrupt Mode Select Bits in the I2S Interrupt Mode Select (pI2S_INT_MOD)
Register (D[3:2]/0x00301C18)
i2sinten0: I2S CH.0 Interrupt Enable Bit in the I2S Interrupt Mode Select (pI2S_INT_MOD) Register
(D0/0x00301C18)
Table V.4.4.5 Selecting I2S CH.0 Interrupt Mode
i2sintMD0[1:0]
interrupt mode
0x3
Reserved
0x2
One empty interrupt mode
0x1
Whole empty interrupt mode
0x0
Half empty interrupt mode
(Default: 0x0)
Whole empty interrupt mode
While audio data is being output in this mode, the I2S CH.0 generates an interrupt after all data (four
stereo data) has been read out from the FIFO to transmit. In other words, the FIFO is empty when an
interrupt occurs. Therefore, the application program needs to fill the FIFO with four stereo data (24 or
16 bits
× 2 channels (L & R) × 4) at once after an interrupt occurs.
Half empty interrupt mode (default)
In this mode, the I2S CH.0 generates an interrupt after two stereo data has been read out from the FIFO
to transmit. In this case, the FIFO may be empty or it may still contain one or two data remained (the
FIFO status can be checked using the status bits). The application program needs to fill the FIFO with
two stereo data (24 or 16 bits
× 2 channels (L & R) × 2) at once after an interrupt occurs.
One empty interrupt mode
In this mode, the I2S CH.0 generates an interrupt after one stereo data has been read out from the FIFO
to transmit. In this case, the FIFO may be empty or it may still contain one to three data remained (the
FIFO status can be checked using the status bits). The application program needs to fill the FIFO with
one stereo data (24 or 16 bits
× 2 channels (L & R) × 1) at once after an interrupt occurs.