SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
Several internal module events can generate an interrupt. Each interrupt has a status bit, an interrupt enable bit, and a signal status enable:
If an interrupt status is disabled in the MMCi.MMCHS_IE register, then the corresponding interrupt request is not transmitted, and the value of the corresponding interrupt signal enable in the MMCi.MMCHS_ISE register is ignored.
When an interrupt event occurs, the corresponding status bit is automatically set to 0x1 (the eMMC/SD/SDIOi host controller updates the status bit) in the MMCi.MMCHS_STAT register. If a mask is later applied on the interrupt in the MMCi.MMCHS_ISE register, the interrupt request is deactivated.
When the interrupt source has not been serviced, if the interrupt status is cleared in the MMCi.MMCHS_STAT register and the corresponding mask is removed from the MMCi.MMCHS_ISE register, the interrupt status is not asserted again in the MMCi.MMCHS_STAT register and the eMMC/SD/SDIOi host controller does not transmit an interrupt request.
If the buffer write ready (BWR) interrupt or the buffer read ready (BRR) only interrupt are not serviced and are cleared in the MMCi.MMCHS_STAT register, and the corresponding mask is removed, then the eMMC/SD/SDIOi host controller waits for the service of the interrupt without updating the status MMCi.MMCHS_STAT register or transmitting an interrupt request.
Table 25-11 lists the event flags, and their mask, that can cause module interrupts.
Event Flag | Event Mask | Map to | Description |
---|---|---|---|
MMCHS_STAT[29] BADA | MMCHS_IE[29] BADA_ENABLE | MMCi_IRQ | Bad access to data space. This bit is set automatically to indicate a bad access to buffer when not allowed: |
This bit is set during a read access to the data register (MMCHS_DATA) while buffer reads are not allowed (MMCHS_PSTATE[11] BRE = 0). | |||
This bit is set during a write access to the data register (MMCHS_DATA) while buffer writes are not allowed (MMCHS_PSTATE[10] BWE = 0). | |||
MMCHS_STAT[28] CERR | MMCHS_IE[28] CERR_ENABLE | MMCi_IRQ | Card error. This bit is set automatically when there is at least one error in a response of type R1, R1b, R6, R5, or R5b. Only bits referenced as type E (error) in the status field in the response can set a card status error. An error bit in the response is flagged only if the corresponding bit in the card status response error MMCHS_CSRE is set. There is no card error detection for the auto CMD12 command. |
MMCHS_STAT[26] TE | MMCHS_IE[26] TE_ENABLE | MMCi_IRQ | Tuning Error. This bit is set when an unrecoverable error is detected in a tuning circuit except during tuning procedure. The Tuning Error is with higher priority than the other error interrupts generated during data transfer. |
MMCHS_STAT[25] ADMAE | MMCHS_IE[25] ADMAE_ENABLE | MMCi_IRQ | ADMA error. This bit is set when the host controller detects errors during an ADMA-based data transfer. The state of the ADMA at an error occurrence is saved in the ADMA error status register. In addition, the host controller generates this interrupt when it detects invalid descriptor data (Valid=0) at the ST_FDS state. |
MMCHS_STAT[24] ACE | MMCHS_IE[24] ACE_ENABLE | MMCi_IRQ | Auto CMD12 error and Auto CMD23 error. This bit is set automatically when one of the bits MMCHS_AC12[4:0] changes from 0 to 1. |
MMCHS_STAT[22] DEB | MMCHS_IE[22] DEB_ENABLE | MMCi_IRQ | Data end bit error. This bit is set automatically when detecting a 0 at the end bit position of read data on the DAT line or at the end position of the CRC status in write mode. |
MMCHS_STAT[21] DCRC | MMCHS_IE[21] DCRC_ENABLE | MMCi_IRQ | Data CRC error. This bit is set automatically when there is a CRC16 error in the data phase response following a block read command or if there is a 3-bit CRC status difference of a position 010 token during a block write command. |
MMCHS_STAT[20] DTO | MMCHS_IE[20] DTO_ENABLE | MMCi_IRQ | Data time-out error. This bit is set automatically according to the following conditions:
|
MMCHS_STAT[19] CIE | MMCHS_IE[19] CIE_ENABLE | MMCi_IRQ | Command index error. This bit is set automatically when the response index differs from the corresponding command index previously emitted. The check is enabled through the MMCHS_CMD[20] CICE bit. |
MMCHS_STAT[18] CEB | MMCHS_IE[18] CEB_ENABLE | MMCi_IRQ | Command end bit error. This bit is set automatically when detecting a 0 at the end bit position of a command response. |
MMCHS_STAT[17] CCRC | MMCHS_IE[17] CCRC_ENABLE | MMCi_IRQ | Command CRC error. This bit is set automatically when a CRC7 error occurs in the command response. CRC check is enabled through the MMCHS_CMD[19] CCCE bit. |
MMCHS_STAT[16] CTO | MMCHS_IE[16] CTO_ENABLE | MMCi_IRQ | Command time-out error. This bit is set automatically when no response is received within 64 clock cycles from the end bit of the command. For commands that reply within five clock cycles, the time-out is still detected at 64 clock cycles. |
MMCHS_STAT[15] ERRI | MMCHS_IE[15] ERRI_ENABLE | MMCi_IRQ | Error interrupt. If any of the bits in the error interrupt status register (MMCHS_STAT[31:16]) are set, this bit is set to 1. |
MMCHS_STAT[10] BSR | MMCHS_IE[10] BSR_ENABLE | MMCi_IRQ | Boot status received interrupt. This bit is set automatically when the MMCHS_CON[18] BOOT_CF0 bit is set to 0x1 or 0x2 and a boot status is received on the dat0 line. This interrupt is useful only for the MMC card. |
MMCHS_STAT[8] CIRQ | MMCHS_IE[8] CIRQ_ENABLE | MMCi_IRQ | Card interrupt. This bit is used only for SD, SDIO, and CE-ATA cards. In 1-bit mode, the interrupt source is asynchronous (can be a source of asynchronous wakeup). In 4-bit mode, the interrupt source is sampled during the interrupt cycle. In CE-ATA mode, the interrupt source is detected when the card drives the CMD line to 0 during one cycle after data transmission end. |
MMCHS_STAT[7] CREM | MMCHS_IE[7] CREM_ENABLE | MMCi_IRQ | Card removal. This bit is set automatically when MMCHS_PSTATE[16] CINS changes from 1 to 0. |
MMCHS_STAT[6] CINS | MMCHS_IE[6] CINS_ENABLE | MMCi_IRQ | Card insertion. This bit is set automatically when MMCHS_PSTATE[16] CINS changes from 0 to 1. |
MMCHS_STAT[5] BRR | MMCHS_IE[5] BRR_ENABLE | MMCi_IRQ | Buffer read ready. This bit is set automatically during a read operation to the card (see class 2 block-oriented read commands) when one block specified by the MMCHS_BLK[10:0] BLEN bit field is completely written in the buffer. It indicates that the memory card has filled out the buffer and that the LH must empty the buffer by reading it. |
MMCHS_STAT[4] BWR | MMCHS_IE[4] BWR_ENABLE | MMCi_IRQ | Buffer write ready. This bit is set automatically during a write operation to the card (see class 4 block-oriented write command) when the host can write a complete block as specified by the MMCHS_BLK[10:0] BLEN bit field. It indicates that the memory card has emptied one block from the buffer and that the LH can write one block of data into the buffer. |
MMCHS_STAT[3] DMA | MMCHS_IE[3] DMA_ENABLE | MMCi_IRQ | DMA interrupt. This status is set when an interrupt is required in the ADMA instruction and after the data transfer completes. |
MMCHS_STAT[2] BGE | MMCHS_IE[2] BGE_ENABLE | MMCi_IRQ | Block gap event. When a stop at the block gap is requested (MMCHS_HCTL[16] SBGR), this bit is automatically set when transaction is stopped at the block gap during a read or write operation. |
MMCHS_STAT[1] TC | MMCHS_IE[1] TC_ENABLE | MMCi_IRQ | Transfer completed. This bit is always set when a read/write transfer is complete or between two blocks when the transfer is stopped because of a stop at block gap request (MMCHS_HCTL[16] SBGR).
|
MMCHS_STAT[0] CC | MMCHS_IE[0] CC_ENABLE | MMCi_IRQ | Command complete. This bit is set when a 1-to-0 transition occurs in the register command inhibit (MMCHS_PSTATE[0] CMDI). If the command is a type for which no response is expected, then the command complete interrupt is generated at the end of the command. A command time-out error (MMCHS_STAT[16] CTO) has higher priority than command complete (MMCHS_STAT[0] CC). If a response is expected but none is received, then a command time-out error is detected and signaled, instead of the command complete interrupt. |
To send an interrupt request to the MMCi_IRQ line, the mask/unmask bit must be set in the MMCi.MMCHS_IE and MMCi.MMCHS_ISE registers.
The eMMC/SD/SDIOi host controller supports interrupt-driven operation and polling.