Texas Instruments TMS320DM644x manual Fifo Operation Diagram

Page 16

www.ti.com

Peripheral Architecture

A high-level operational description is as follows:

Data is written to the FIFO through the MMC data transmit register (MMCDXR). Data is read from the FIFO through the MMC data receive register (MMCDRR). This is true for both the CPU and EDMA driven transactions; however, for the EDMA transaction, the EDMA access to the FIFO is transparent.

The ACCWD bits in the MMC FIFO control register (MMCFIFOCTL) determines the behavior of the FIFO full (FIFOFUL) and FIFO empty (FIFOEMP) status flags in the MMC status register 1 (MMCST1):

If ACCWD = 00b:

FIFO full is active when the write pointer + 4 > read pointer

FIFO empty is active when the write pointer - 4 < read pointer

If ACCWD = 01b:

FIFO full is active when the write pointer + 3 > read pointer

FIFO empty is active when the write pointer - 3 < read pointer

If ACCWD = 10b:

FIFO full is active when the write pointer + 2 > read pointer

FIFO empty is active when the write pointer - 2 < read pointer

If ACCWD = 11b:

FIFO full is active when the write pointer + 1 > read pointer

FIFO empty is active when the write pointer - 1 < read pointer

 

Figure 7. FIFO Operation Diagram

 

ARM/EDMA reads/writes

 

Transmission of data

 

 

 

 

 

 

Step 1:

Set FIFO reset

Write

Read

 

Step 2:

Set FIFO direction

 

Step 3:

EDMA driven transaction

 

 

EDMA

FIFO

 

Step 4:

CPU driven transaction:

 

request

Pointer increment

 

 

Fill the FIFO by writing to

 

is created

 

or decrease

 

EDMA event

 

MMCDXR (only first time)

 

 

 

or every 128 or 256−bits

 

 

128 or 256 bit

 

transmitted and DXRDYINT

 

 

 

interrupt is generated

8−bit x 32

 

EDMA event

Step 5: EDMA send xmit data

(256−bit)

 

 

128 or 256 bit

Step 6: If DXR ready is active,

FIFO

 

 

 

FIFO −> 16−bit DXR

 

 

 

 

EDMA event

Reception of data

 

the end of a

 

 

 

Pointer increment

transfer

Step 1:

Set FIFO reset

or decrease

 

Step 2:

Set FIFO direction

FIFO

 

 

Step 3:

If DRR ready is active,

 

 

DXR

DRR

 

16−bit DRR −> FIFO

Step 4:

EDMA driven transaction

 

 

 

 

Step 5:

DRRDYINT interrupt occur

16−bit DXR

16−bit DRR

 

when FIFO every 128 or

 

256−bits of data received

 

 

 

 

 

 

by FIFO

16−bit DXR

16−bit DRR

Step 6:

EDMA read reception data

 

 

shifter

shifter

 

 

16

Multimedia Card (MMC)/Secure Digital (SD) Card Controller

SPRUE30B –September 2006

Image 16
Contents Users Guide Submit Documentation Feedback Contents Appendix a List of Figures List of Tables Read This First Trademarks Functional Block Diagram FeaturesPurpose of the Peripheral Supported Use Case Statement Industry Standards Compliance StatementMMC/SD Controller Interface Diagram MMC/SD Controller Clocking Diagram Clock ControlSignal Descriptions MMC/SD Controller Pins Used in Each Mode1 MMC/SD Mode Write Sequence Protocol Descriptions2 MMC/SD Mode Read Sequence MMC/SD Mode Write SequencePortion Sequence Description MMC/SD Mode Read Sequence Data Flow in the Input/Output FifoCRC RD CMDFifo Operation Diagram Data Flow in the Data Registers Mmcdrr and Mmcdxr 1st 2nd 3rd 4th Mmcdrr or Mmcdxr registers Support byten =1st 2nd 3rd 4th Support byten = 1111 1110 Edma Reads Fifo Operation During Card Read OperationCPU Reads Fifo Operation During Card Read Diagram Edma Writes Fifo Operation During Card Write OperationCPU Writes Fifo Operation During Card Write Diagram Reset Considerations InitializationInitializing the Clock Controller Registers Mmcclk Initialize the Interrupt Mask Register MmcimInitialize the Time-Out Registers Mmctor and Mmctod Initialize the Data Block Registers Mmcblen and MmcnblkMonitoring Activity in the MMC/SD Mode Determining Whether New Data is Available in MmcdrrChecking For a Data Transmit Empty Condition Interrupt Support Interrupt Events and RequestsInterrupt Multiplexing Description of MMC/SD Interrupt RequestsDMA Event Support Power ManagementEmulation Considerations MMC Card Identification Procedure Card Identification OperationProcedures for Common Operations SD Card Identification Procedure MMC/SD Mode Single-Block Write Operation Using CPU MMC/SD Mode Single-Block Write Operation MMC/SD Mode Single-Block Write Operation Using the Edma MMC/SD Mode Single-Block Read Operation Using the CPUMMC/SD Mode Single-Block Read Operation Using Edma MMC/SD Mode Single-Block Read OperationMMC/SD Mode Multiple-Block Write Operation Using CPU MMC/SD Multiple-Block Write Operation MMC/SD Mode Multiple-Block Write Operation Using Edma MMC/SD Mode Multiple-Block Read Operation Using CPUMMC/SD Mode Multiple-Block Read Operation Using Edma MMC/SD Mode Multiple-Block Read OperationOffset Acronym Register Description MMC Control Register Mmcctl Field Descriptions MMC Control Register MmcctlBit Field Value Description MMC Memory Clock Control Register Mmcclk MMC Memory Clock Control Register Mmcclk Field DescriptionsClken Clkrt ClkenMMC Status Register 0 MMCST0 Field Descriptions MMC Status Register 0 MMCST0Bit Field Write-data CRC error MMC Status Register 1 MMCST1 MMC Status Register 1 MMCST1 Field DescriptionsFifoful Fifoemp DAT3ST Drful Dxemp Clkstp Busy FifofulMMC Interrupt Mask Register Mmcim MMC Interrupt Mask Register Mmcim Field DescriptionsEtrndne Edated Edrrdy Edxrdy EtrndneMMC Response Time-Out Register Mmctor Field Descriptions MMC Response Time-Out Register MmctorTOR MMC Data Read Time-Out Register Mmctod MMC Data Read Time-Out Register Mmctod Field DescriptionsMMC Block Length Register Mmcblen Field Descriptions MMC Block Length Register MmcblenBlen MMC Number of Blocks Register Mmcnblk MMC Number of Blocks Counter Register MmcnblcMMC Number of Blocks Register Mmcnblk Field Descriptions NblkMMC Data Receive Register Mmcdrr MMC Data Transmit Register MmcdxrMMC Data Receive Register Mmcdrr Field Descriptions MMC Data Transmit Register Mmcdxr Field DescriptionsMMC Command Register Mmccmd MMC Command Register Mmccmd Field DescriptionsDmatrig Dclr Initck Wdatx Strmtp Dtrw Rspfmt Bsyexp PplenBit Position Command Register Description Stream enableCRC7 MMC Argument Register Mmcarghl MMC Argument Register Mmcarghl Field DescriptionsArgh ArglMMC Response Registers MMCRSP0-MMCRSP7 R1, R3, R4, R5, or R6 Response 48 Bits R2 Response 136 BitsBit Position of Response Register MMCRSP4-0MMC Command Index Register Mmccidx MMC Command Index Register Mmccidx Field DescriptionsMMC Data Response Register Mmcdrsp MMC Data Response Register Mmcdrsp Field DescriptionsMMC Fifo Control Register Mmcfifoctl MMC Fifo Control Register Mmcfifoctl Field DescriptionsAccwd Fifolev Fifodir Fiforst AccwdTable A-1. Document Revision History Reference Additions/Modifications/DeletionsAppendix a Important Notice