PSoC 6 Peripheral Driver Library

General Description

The constants below can be used with Cy_SD_Host_GetNormalInterruptStatus, Cy_SD_Host_ClearNormalInterruptStatus, Cy_SD_Host_GetErrorInterruptStatus and Cy_SD_Host_ClearErrorInterruptStatus functions.

Each event is encoded in a separate bit, and therefore it is possible to notify about multiple events.

Macros

#define CY_SD_HOST_CMD_COMPLETE   (0x0001U)
 Command complete. More...
 
#define CY_SD_HOST_XFER_COMPLETE   (0x0002U)
 Transfer complete. More...
 
#define CY_SD_HOST_BGAP   (0x0004U)
 Block gap. More...
 
#define CY_SD_HOST_DMA_INTERRUPT   (0x0008U)
 DMA Interrupt. More...
 
#define CY_SD_HOST_BUF_WR_READY   (0x0010U)
 The Buffer Write is ready. More...
 
#define CY_SD_HOST_BUF_RD_READY   (0x0020U)
 The Buffer Read is ready. More...
 
#define CY_SD_HOST_CARD_INSERTION   (0x0040U)
 Card insertion. More...
 
#define CY_SD_HOST_CARD_REMOVAL   (0x0080U)
 Card removal. More...
 
#define CY_SD_HOST_CARD_INTERRUPT   (0x0100U)
 The Card interrupt. More...
 
#define CY_SD_HOST_FX_EVENT   (0x2000U)
 FX event. More...
 
#define CY_SD_HOST_CQE_EVENT   (0x4000U)
 Command Queuing event. More...
 
#define CY_SD_HOST_ERR_INTERRUPT   (0x8000U)
 Error Interrupt. More...
 
#define CY_SD_HOST_CMD_TOUT_ERR   (0x0001U)
 Command timeout error. More...
 
#define CY_SD_HOST_CMD_CRC_ERR   (0x0002U)
 Command CRC error. More...
 
#define CY_SD_HOST_CMD_END_BIT_ERR   (0x0004U)
 Command End Bit error. More...
 
#define CY_SD_HOST_CMD_IDX_ERR   (0x0008U)
 Command Index error. More...
 
#define CY_SD_HOST_DATA_TOUT_ERR   (0x0010U)
 Data Timeout error. More...
 
#define CY_SD_HOST_DATA_CRC_ERR   (0x0020U)
 Data CRC error. More...
 
#define CY_SD_HOST_DATA_END_BIT_ERR   (0x0040U)
 Data End Bit error. More...
 
#define CY_SD_HOST_CUR_LMT_ERR   (0x0080U)
 Current Limit error. More...
 
#define CY_SD_HOST_AUTO_CMD_ERR   (0x0100U)
 Auto CMD error. More...
 
#define CY_SD_HOST_ADMA_ERR   (0x0200U)
 ADMA error. More...
 
#define CY_SD_HOST_TUNING_ERR   (0x0400U)
 Tuning error. More...
 
#define CY_SD_HOST_RESP_ERR   (0x0800U)
 Response error. More...
 
#define CY_SD_HOST_BOOT_ACK_ERR   (0x1000U)
 Boot Acknowledgement error. More...
 

Macro Definition Documentation

◆ CY_SD_HOST_CMD_COMPLETE

#define CY_SD_HOST_CMD_COMPLETE   (0x0001U)

Command complete.

In SD/eMMC mode, this event is set after detecting the end bit of a response except for Auto CMD12 and Auto CMD23. This event is not generated when the Response Interrupt is disabled.

◆ CY_SD_HOST_XFER_COMPLETE

#define CY_SD_HOST_XFER_COMPLETE   (0x0002U)

Transfer complete.

This event is set when a read/write transfer and a command with the Busy Status are completed.

◆ CY_SD_HOST_BGAP

#define CY_SD_HOST_BGAP   (0x0004U)

Block gap.

This event is set when both read/write transactions are stopped at the block gap due to a Stop-at-Block-Gap Request.

◆ CY_SD_HOST_DMA_INTERRUPT

#define CY_SD_HOST_DMA_INTERRUPT   (0x0008U)

DMA Interrupt.

This event is set if the Host Controller detects a SDMA Buffer Boundary during a transfer. For ADMA, the Host controller generates this interrupt by setting the Int field in the descriptor table. This interrupt is not generated after a Transfer Complete.

◆ CY_SD_HOST_BUF_WR_READY

#define CY_SD_HOST_BUF_WR_READY   (0x0010U)

The Buffer Write is ready.

This event is set if the Buffer Write Enable changes from 0 to 1.

◆ CY_SD_HOST_BUF_RD_READY

#define CY_SD_HOST_BUF_RD_READY   (0x0020U)

The Buffer Read is ready.

This event is set if the Buffer Read Enable changes from 0 to 1.

◆ CY_SD_HOST_CARD_INSERTION

#define CY_SD_HOST_CARD_INSERTION   (0x0040U)

Card insertion.

This event is set if the Card Inserted in the Present State register changes from 0 to 1.

◆ CY_SD_HOST_CARD_REMOVAL

#define CY_SD_HOST_CARD_REMOVAL   (0x0080U)

Card removal.

This event is set if the Card Inserted in the Present State register changes from 1 to 0.

◆ CY_SD_HOST_CARD_INTERRUPT

#define CY_SD_HOST_CARD_INTERRUPT   (0x0100U)

The Card interrupt.

This event reflects the synchronized value of DAT[1] Interrupt Input for SD Mode

◆ CY_SD_HOST_FX_EVENT

#define CY_SD_HOST_FX_EVENT   (0x2000U)

FX event.

This status is set when R[14] of the response register is set to 1 and Response Type R1/R5 is set to 0 in the Transfer Mode register. This interrupt is used with the response check function.

◆ CY_SD_HOST_CQE_EVENT

#define CY_SD_HOST_CQE_EVENT   (0x4000U)

Command Queuing event.

This status is set if a Command Queuing/Crypto related event has occurred in eMMC/SD mode.

◆ CY_SD_HOST_ERR_INTERRUPT

#define CY_SD_HOST_ERR_INTERRUPT   (0x8000U)

Error Interrupt.

If any of the bits in the Error Interrupt Status register are set, then this bit is set.

◆ CY_SD_HOST_CMD_TOUT_ERR

#define CY_SD_HOST_CMD_TOUT_ERR   (0x0001U)

Command timeout error.

In SD/eMMC Mode, this event is set only if no response is returned within 64 SD clock cycles from the end bit of the command. If the Host Controller detects a CMD line conflict, along with Command CRC Error bit, this event is set to 1, without waiting for 64 SD/eMMC card clock cycles.

◆ CY_SD_HOST_CMD_CRC_ERR

#define CY_SD_HOST_CMD_CRC_ERR   (0x0002U)

Command CRC error.

A Command CRC Error is generated in SD/eMMC mode when:

  1. A response is returned and the Command Timeout Error is set to 0 (indicating no timeout), this bit is set to 1 when detecting a CRC error in the command response.
  2. The Host Controller detects a CMD line conflict by monitoring the CMD line when a command is issued. If the Host Controller drives the CMD line to level 1, but detects level 0 on the CMD line at the next SD clock edge, then the Host Controller aborts the command (stop driving CMD line) and sets this bit to 1. The Command Timeout Error is also set to 1 to distinguish a CMD line conflict.

◆ CY_SD_HOST_CMD_END_BIT_ERR

#define CY_SD_HOST_CMD_END_BIT_ERR   (0x0004U)

Command End Bit error.

This bit is set after detecting that the end bit of a command response is 0 in SD/eMMC mode.

◆ CY_SD_HOST_CMD_IDX_ERR

#define CY_SD_HOST_CMD_IDX_ERR   (0x0008U)

Command Index error.

This bit is set if a Command Index error occurs in the command response in SD/eMMC mode.

◆ CY_SD_HOST_DATA_TOUT_ERR

#define CY_SD_HOST_DATA_TOUT_ERR   (0x0010U)

Data Timeout error.

This bit is set in SD/eMMC mode when detecting one of the following timeout conditions:

  • Busy timeout for R1b, R5b type
  • Busy timeout after Write CRC status
  • Write CRC Status timeout
  • Read Data timeout.

◆ CY_SD_HOST_DATA_CRC_ERR

#define CY_SD_HOST_DATA_CRC_ERR   (0x0020U)

Data CRC error.

This error occurs in SD/eMMC mode after detecting a CRC error while transferring read data that uses the DAT line, after detecting the Write CRC status having a value other than 010 or when writing a CRC status timeout.

◆ CY_SD_HOST_DATA_END_BIT_ERR

#define CY_SD_HOST_DATA_END_BIT_ERR   (0x0040U)

Data End Bit error.

This error occurs in SD/eMMC mode either when detecting 0 at the end bit position of read data that uses the DAT line or at the end bit position of the CRC status.

◆ CY_SD_HOST_CUR_LMT_ERR

#define CY_SD_HOST_CUR_LMT_ERR   (0x0080U)

Current Limit error.

The SD Host driver does not support this function, this bit is always set to 0.

◆ CY_SD_HOST_AUTO_CMD_ERR

#define CY_SD_HOST_AUTO_CMD_ERR   (0x0100U)

Auto CMD error.

This error status is used by Auto CMD12 and Auto CMD23 in SD/eMMC mode. This bit is set after detecting that any of the bits D00 to D05 in the Auto CMD Error Status register has changed from 0 to 1. D07 is effective in case for Auto CMD12. The Auto CMD Error Status register is valid while this bit is set to 1 and may be cleared by clearing this bit.

◆ CY_SD_HOST_ADMA_ERR

#define CY_SD_HOST_ADMA_ERR   (0x0200U)

ADMA error.

This bit is set when the Host Controller detects an error during an ADMA-based data transfer. The possible reasons for an error:

  • An error response is received from the System bus;
  • ADMA3, ADMA2 Descriptors are invalid;
  • CQE Task or Transfer descriptors are invalid. When an error occurs, the state of the ADMA is saved in the ADMA Error Status register.

◆ CY_SD_HOST_TUNING_ERR

#define CY_SD_HOST_TUNING_ERR   (0x0400U)

Tuning error.

The SD Host driver does not support this function.

◆ CY_SD_HOST_RESP_ERR

#define CY_SD_HOST_RESP_ERR   (0x0800U)

Response error.

Host Controller Version 4.00 supports the response error check function to avoid overhead of the response error check by Host Driver during DMA execution. If the Response Error Check Enable is set to 1 in the Transfer Mode register, the Host Controller checks R1 or R5 response. If an error is detected in a response, this bit is set to 1. This is applicable in SD/eMMC mode.

◆ CY_SD_HOST_BOOT_ACK_ERR

#define CY_SD_HOST_BOOT_ACK_ERR   (0x1000U)

Boot Acknowledgement error.

This bit is set when there is a timeout for boot acknowledgement or after detecting the boot ACK status having a value other than 010. This is applicable only when boot acknowledgement is expected in eMMC mode.