Related Information
on page 16-1
For details about the DMA burst length microcode setup, refer to the
DMA controller
chapter of the
Cyclone
V Device Handbook, Volume 3
.
Transmit FIFO Underflow
During I
2
C serial transfers, transmit FIFO requests are made to the DMA controller whenever the number
of entries in the transmit FIFO is less than or equal to the value in DMA Transmit Data Level Register
(
IC_DMA_TDLR
), also known as the watermark level. The DMA controller responds by writing a burst of
data to the transmit FIFO buffer, of length specified as DMA burst length. †
Data should be fetched from the DMA often enough for the transmit FIFO to perform serial transfers
continuously, that is, when the FIFO begins to empty, another DMA request should be triggered.
Note:
Otherwise, the FIFO will run out of the data (underflow) causing the maser to stall the transfer by
holding the SCL line low. To prevent this condition, you must set the watermark level correctly.†
Related Information
on page 16-1
For details about the DMA burst length microcode setup, refer to the
DMA controller
chapter of the
Cyclone
V Device Handbook, Volume 3
.
Transmit Watermark Level
Consider the example where the assumption is made: †
DMA burst length =
FIFO_DEPTH
-
IC_DMA_TDLR
†
Here the number of data items to be transferred in a DMA burst is equal to the empty space in the transmit
FIFO. Consider the following two different watermark level settings: †
• Case 1:
IC_DMA_TDLR
= 16: †
• Transmit FIFO watermark level =
IC_DMA_TDLR
= 16: †
• DMA burst length =
FIFO_DEPTH
-
IC_DMA_TDLR
= 48: †
• I
2
C transmit
FIFO_DEPTH
= 64: †
• Block transaction size = 240: †
Figure 20-11: Transmit FIFO Watermark Level = 16
FIFO_DEPTH = 64
DMA
Controller
Transmit FIFO
Watermark Level
Data In
Data Out
IC_DMA_TDLR = 16
FIFO_DEPTH - IC_DMA_TDLR = 48
Empty
Full
Transmit
FIFO Buffer
I2C Controller
Altera Corporation
cv_54020
Transmit FIFO Underflow
20-18
2013.12.30