Добавил:
ИВТ (советую зайти в "Несортированное") Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
interfeysy_1 / ИДЗ_машинка / даташиты / esp32_technical_reference_manual_en.pdf
Скачиваний:
16
Добавлен:
26.01.2024
Размер:
9.62 Mб
Скачать

9 SD/MMC Host Controller

 

Figure 9­2. SD/MMC Controller External Interface Signals

 

 

Table 9­1. SD/MMC Signal Description

 

 

 

 

Pin

Direction

 

Description

cclk_out

Output

 

Clock signals for slave device

 

 

 

 

ccmd

Duplex

 

Duplex command/response lines

 

 

 

 

cdata

Duplex

 

Duplex data read/write lines

 

 

 

 

card_detect_n

Input

 

Card detection input line

 

 

 

 

card_write_prt

Input

 

Card write protection status input

 

 

 

 

9.4Functional Description

9.4.1SD/MMC Host Controller Architecture

The SD/MMC host controller consists of two main functional blocks, as shown in Figure 9-3:

Bus Interface Unit (BIU): It provides APB interfaces for registers, data read and write operation by FIFO and DMA.

Card Interface Unit (CIU): It handles external memory card interface protocols. It also provides clock control.

Figure 9­3. SDIO Host Block Diagram

Espressif Systems

192

ESP32 TRM (Version 5.0)

Submit Documentation Feedback

9 SD/MMC Host Controller

9.4.1.1BIU

The BIU provides the access to registers and FIFO data through the Host Interface Unit (HIU). Additionally, it provides FIFO access to independent data through a DMA interface. The host interface can be configured as an APB interface. Figure 9-3 illustrates the internal components of the BIU. The BIU provides the following functions:

Host interface

DMA interface

Interrupt control

Register access

FIFO access

Power/pull-up control and card detection

9.4.1.2CIU

The CIU module implements the card-specific protocols. Within the CIU, the command path control unit and data path control unit prompt the controller to interface with the command and data ports, respectively, of the SD/MMC/CE-ATA cards. The CIU also provides clock control. Figure 9-3 illustrates the internal structure of the CIU, which consists of the following primary functional blocks:

Command path

Data path

SDIO interrupt control

Clock control

Mux/demux unit

9.4.2Command Path

The command path performs the following functions:

Configures clock parameters

Configures card command parameters

Sends commands to card bus (ccmd_out line)

Receives responses from card bus (ccmd_in line)

Sends responses to BIU

Drives the P-bit on the command line

The command path State Machine is shown in Figure 9-4.

Espressif Systems

193

ESP32 TRM (Version 5.0)

Submit Documentation Feedback

9 SD/MMC Host Controller

Figure 9­4. Command Path State Machine

9.4.3Data Path

The data path block pops FIFO data and transmits them on cdata_out during a write-data transfer, or it receives data on cdata_in and pushes them into FIFO during a read-data transfer. The data path loads new data parameters, i.e., expected data, read/write data transfer, stream/block transfer, block size, byte count, card type, timeout registers, etc., whenever a data transfer command is not in progress.

If the data_expected bit is set in the Command register, the new command is a data-transfer command and the data path starts one of the following operations:

Transmitting data if the read/write bit = 1

Receiving data if read/write bit = 0

9.4.3.1Data Transmit Operation

The data transmit state machine is illustrated in Figure 9-5. The module starts data transmission two clock cycles after a response for the data-write command is received. This occurs even if the command path detects a response error or a cyclic redundancy check (CRC) error in a response. If no response is received from the card until the response timeout, no data are transmitted. Depending on the value of the transfer_mode bit in the Command register, the data-transmit state machine adds data to the card’s data bus in a stream or in block(s). The data transmit state machine is shown in Figure 9-5.

Figure 9­5. Data Transmit State Machine

Espressif Systems

194

ESP32 TRM (Version 5.0)

Submit Documentation Feedback

Соседние файлы в папке даташиты