Altera Cyclone V Device Handbook page 737

Hide thumbs Also See for Cyclone V:
Table of Contents

Advertisement

cv_54011
2013.12.30
To use the card read threshold feature effectively and to guarantee that the card clock does not stop because
of a FIFO Full condition in the middle of a block of data being read from the card, follow these steps:
1. Choose a block size that is a multiple of four bytes.
2. Enable card read threshold feature. The card read threshold can be enabled only if the block size for the
given transfer is less than or equal to the total depth of the FIFO buffer:
(block size / 4) ≤ 1024
3. Choose the card read threshold value:
• If (block size / 4) ≥ 512, choose cardrdthreshold such that:
• cardrdthreshold ≤ (block size / 4) in bytes
• If (block size / 4) < 512, choose cardrdthreshold such that:
• cardrdthreshold = (block size / 4) in bytes
4. Set the dw_dma_multiple_transaction_size field in the fifoth register to the number of
transfers that make up a DMA transaction. For example, size = 1 means 4 bytes are moved. The possible
values for the size are 1, 4, 8, 16, 32, 64, 128, and 256 transfers. Select the size so that the value (block size
/ 4) is evenly divided by the size.
5. Set the rx_wmark field in the fifoth register to the size – 1.
For example, if your block size is 512 bytes, legal values of dw_dma_multiple_transaction_size
and rx_wmark are listed in the following table.
Table 11-32: Legal Values of dw_dma_multiple_transaction_size and rx_wmark for Block Size = 512
Block Size
512
512
512
512
512
512
512
Card Read Threshold Programming Examples
This section shows examples of how to program the card read threshold.
SD/MMC Controller
Send Feedback
dw_dma_multiple_transaction_size
1
4
8
16
32
64
128
Card Read Threshold Programming Examples
0
3
7
15
31
63
127
11-59
rx_wmark
Altera Corporation

Advertisement

Table of Contents
loading

Table of Contents