MTB CAT1 Peripheral driver library

General Description

Enumerations

enum  cy_en_sd_host_cmd_type_t {
  CY_SD_HOST_CMD_NORMAL = 0U,
  CY_SD_HOST_CMD_SUSPEND = 1U,
  CY_SD_HOST_CMD_RESUME = 2U,
  CY_SD_HOST_CMD_ABORT = 3U
}
 SD command types. More...
 
enum  cy_en_sd_host_auto_cmd_t {
  CY_SD_HOST_AUTO_CMD_NONE = 0U,
  CY_SD_HOST_AUTO_CMD_12 = 1U,
  CY_SD_HOST_AUTO_CMD_23 = 2U,
  CY_SD_HOST_AUTO_CMD_AUTO = 3U
}
 SD Host auto command enable selection. More...
 
enum  cy_en_sd_host_reset_t {
  CY_SD_HOST_RESET_DATALINE = 0U,
  CY_SD_HOST_RESET_CMD_LINE = 1U,
  CY_SD_HOST_RESET_ALL = 2U
}
 SD Host reset types. More...
 
enum  cy_en_sd_host_adma_error_t {
  CY_SD_HOST_ADMA_ST_STOP = 0U,
  CY_SD_HOST_ADMA_ST_FDS = 1U,
  CY_SD_HOST_ADMA_ST_TFR = 3U,
  CY_SD_HOST_ADMA_LEN_ERR = 4U
}
 SD Host error interrupt types. More...
 
enum  cy_en_sd_host_auto_cmd_status_t {
  CY_SD_HOST_AUTO_CMD12_NOT_EXEC = 0U,
  CY_SD_HOST_AUTO_CMD_TOUT_ERR = 1U,
  CY_SD_HOST_AUTO_CMD_CRC_ERR = 2U,
  CY_SD_HOST_AUTO_CMD_EBIT_ERR = 3U,
  CY_SD_HOST_AUTO_CMD_IDX_ERR = 4U,
  CY_SD_HOST_AUTO_CMD_RESP_ERR = 5U,
  CY_SD_HOST_CMD_NOT_ISSUED_AUTO_CMD12 = 7U
}
 Auto CMD Status error codes. More...
 
enum  cy_en_sd_host_status_t {
  CY_SD_HOST_SUCCESS = 0U,
  CY_SD_HOST_ERROR = CY_SD_HOST_ID | CY_PDL_STATUS_ERROR | 1U,
  CY_SD_HOST_ERROR_INVALID_PARAMETER = CY_SD_HOST_ID | CY_PDL_STATUS_ERROR | 2U,
  CY_SD_HOST_ERROR_OPERATION_IN_PROGRESS = CY_SD_HOST_ID | CY_PDL_STATUS_ERROR | 3U,
  CY_SD_HOST_ERROR_UNINITIALIZED = CY_SD_HOST_ID | CY_PDL_STATUS_ERROR | 4U,
  CY_SD_HOST_ERROR_TIMEOUT = CY_SD_HOST_ID | CY_PDL_STATUS_ERROR | 5U,
  CY_SD_HOST_OPERATION_INPROGRESS = CY_SD_HOST_ID | CY_PDL_STATUS_ERROR | 6U,
  CY_SD_HOST_ERROR_UNUSABLE_CARD = CY_SD_HOST_ID | CY_PDL_STATUS_ERROR | 7U,
  CY_SD_HOST_ERROR_DISCONNECTED = CY_SD_HOST_ID | CY_PDL_STATUS_ERROR | 8U
}
 SD host error codes. More...
 
enum  cy_en_sd_host_bus_width_t {
  CY_SD_HOST_BUS_WIDTH_1_BIT = 0U,
  CY_SD_HOST_BUS_WIDTH_4_BIT = 1U,
  CY_SD_HOST_BUS_WIDTH_8_BIT = 2U
}
 The widths of the data bus. More...
 
enum  cy_en_sd_host_bus_speed_mode_t {
  CY_SD_HOST_BUS_SPEED_DEFAULT = 0U,
  CY_SD_HOST_BUS_SPEED_HIGHSPEED = 1U,
  CY_SD_HOST_BUS_SPEED_SDR12_5 = 2U,
  CY_SD_HOST_BUS_SPEED_SDR25 = 3U,
  CY_SD_HOST_BUS_SPEED_SDR50 = 4U,
  CY_SD_HOST_BUS_SPEED_EMMC_LEGACY = 5U,
  CY_SD_HOST_BUS_SPEED_EMMC_HIGHSPEED_SDR = 6U,
  CY_SD_HOST_BUS_SPEED_DDR50 = 7U
}
 The bus speed modes. More...
 
enum  cy_en_sd_host_io_voltage_t {
  CY_SD_HOST_IO_VOLT_3_3V = 0U,
  CY_SD_HOST_IO_VOLT_1_8V = 1U
}
 The SD bus voltage select. More...
 
enum  cy_en_sd_host_erase_type_t {
  CY_SD_HOST_ERASE_ERASE = 0U,
  CY_SD_HOST_ERASE_DISCARD = 1U,
  CY_SD_HOST_ERASE_FULE = 2U,
  CY_SD_HOST_ERASE_SECURE = 3U,
  CY_SD_HOST_ERASE_SECURE_TRIM_STEP_2 = 4U,
  CY_SD_HOST_ERASE_SECURE_TRIM_STEP_1 = 5U,
  CY_SD_HOST_ERASE_TRIM = 6U
}
 Erase type. More...
 
enum  cy_en_sd_host_card_type_t {
  CY_SD_HOST_SD = 0U,
  CY_SD_HOST_SDIO = 1U,
  CY_SD_HOST_EMMC = 2U,
  CY_SD_HOST_COMBO = 3U,
  CY_SD_HOST_UNUSABLE = 4U,
  CY_SD_HOST_NOT_EMMC = 5U
}
 Card type. More...
 
enum  cy_en_sd_host_card_capacity_t {
  CY_SD_HOST_SDSC = 0U,
  CY_SD_HOST_SDHC = 1U,
  CY_SD_HOST_EMMC_LESS_2G = 0U,
  CY_SD_HOST_EMMC_GREATER_2G = 1U,
  CY_SD_HOST_SDXC = 2U,
  CY_SD_HOST_UNSUPPORTED = 4U
}
 The card capacity type. More...
 
enum  cy_en_sd_host_response_type_t {
  CY_SD_HOST_RESPONSE_NONE = 0U,
  CY_SD_HOST_RESPONSE_LEN_136 = 1U,
  CY_SD_HOST_RESPONSE_LEN_48 = 2U,
  CY_SD_HOST_RESPONSE_LEN_48B = 3U
}
 SDHC response types. More...
 
enum  cy_en_sd_host_dma_type_t {
  CY_SD_HOST_DMA_SDMA = 0U,
  CY_SD_HOST_DMA_ADMA2 = 2U,
  CY_SD_HOST_DMA_ADMA2_ADMA3 = 3U
}
 The DMA type enum. More...
 
enum  cy_en_sd_host_write_protect_t {
  CY_SD_HOST_PERMANENT = 0U,
  CY_SD_HOST_ENABLE_TEMPORARY = 1U,
  CY_SD_HOST_DISABLE_TEMPORARY = 2U
}
 Write Protect type enum. More...
 
enum  cy_en_sd_host_r1_response_t {
  CY_SD_HOST_AKE_SEQ_ERROR_R1_RESP = 3U,
  CY_SD_HOST_APP_CMD_R1_RESP = 5U,
  CY_SD_HOST_FX_EVENT_R1_RESP = 6U,
  CY_SD_HOST_READY_FOR_DATA_R1_RESP = 8U,
  CY_SD_HOST_CURRENT_STATE_0_R1_RESP = 9U,
  CY_SD_HOST_CURRENT_STATE_1_R1_RESP = 10U,
  CY_SD_HOST_CURRENT_STATE_2_R1_RESP = 11U,
  CY_SD_HOST_CURRENT_STATE_3_R1_RESP = 12U,
  CY_SD_HOST_ERASE_RESET_R1_RESP = 13U,
  CY_SD_HOST_CARD_ECC_DISABLED_R1_RESP = 14U,
  CY_SD_HOST_WP_ERASE_SKIP_R1_RESP = 15U,
  CY_SD_HOST_CSD_OVERWRITE_R1_RESP = 16U,
  CY_SD_HOST_ERROR_R1_RESP = 19U,
  CY_SD_HOST_CC_ERROR_R1_RESP = 20U,
  CY_SD_HOST_CARD_ECC_FAILED_R1_RESP = 21U,
  CY_SD_HOST_ILLEGAL_COMMAND_R1_RESP = 22U,
  CY_SD_HOST_COM_CRC_ERROR_R1_RESP = 23U,
  CY_SD_HOST_LOCK_UNLOCK_FAILED_R1_RESP = 24U,
  CY_SD_HOST_CARD_IS_LOCKED_R1_RESP = 25U,
  CY_SD_HOST_WP_VIOLATION_R1_RESP = 26U,
  CY_SD_HOST_ERASE_PARAM_R1_RESP = 27U,
  CY_SD_HOST_ERASE_SEQ_ERROR_R1_RESP = 28U,
  CY_SD_HOST_BLOCK_LEN_ERROR_R1_RESP = 29U,
  CY_SD_HOST_ADDRESS_ERROR_R1_RESP = 30U,
  CY_SD_HOST_OUT_OF_RANGE_R1_RESP = 31U
}
 Card status in R1 response type enum. More...
 

Enumeration Type Documentation

◆ cy_en_sd_host_cmd_type_t

SD command types.

Enumerator
CY_SD_HOST_CMD_NORMAL 

Other commands.

CY_SD_HOST_CMD_SUSPEND 

CMD52 for writing "Bus Suspend" in CCCR.

CY_SD_HOST_CMD_RESUME 

CMD52 for writing "Function Select" in CCCR.

CY_SD_HOST_CMD_ABORT 

CMD12, CMD52 for writing "I/O Abort" in CCCR.

◆ cy_en_sd_host_auto_cmd_t

SD Host auto command enable selection.

Enumerator
CY_SD_HOST_AUTO_CMD_NONE 

Auto command disable.

CY_SD_HOST_AUTO_CMD_12 

Auto command 12 enable.

CY_SD_HOST_AUTO_CMD_23 

Auto command 23 enable.

CY_SD_HOST_AUTO_CMD_AUTO 

Auto command Auto enable.

◆ cy_en_sd_host_reset_t

SD Host reset types.

Enumerator
CY_SD_HOST_RESET_DATALINE 

Reset the data circuit only.

CY_SD_HOST_RESET_CMD_LINE 

Reset the command circuit only.

CY_SD_HOST_RESET_ALL 

Reset the whole SD Host controller.

◆ cy_en_sd_host_adma_error_t

SD Host error interrupt types.

Enumerator
CY_SD_HOST_ADMA_ST_STOP 

Stop DMA - The SYS_ADR register points to a location next to the error descriptor.

CY_SD_HOST_ADMA_ST_FDS 

Fetch Descriptor - The SYS_ADR register points to the error descriptor.

CY_SD_HOST_ADMA_ST_TFR 

Transfer Data - SYS_ADR register points to a location next to the error descriptor.

CY_SD_HOST_ADMA_LEN_ERR 

The ADMA Length Mismatch error.

◆ cy_en_sd_host_auto_cmd_status_t

Auto CMD Status error codes.

Enumerator
CY_SD_HOST_AUTO_CMD12_NOT_EXEC 

Auto CMD12 Not Executed.

CY_SD_HOST_AUTO_CMD_TOUT_ERR 

Auto CMD Timeout Error.

CY_SD_HOST_AUTO_CMD_CRC_ERR 

Auto CMD CRC Error.

CY_SD_HOST_AUTO_CMD_EBIT_ERR 

Auto CMD End Bit Error.

CY_SD_HOST_AUTO_CMD_IDX_ERR 

Auto CMD Index Error.

CY_SD_HOST_AUTO_CMD_RESP_ERR 

Auto CMD Response Error.

CY_SD_HOST_CMD_NOT_ISSUED_AUTO_CMD12 

Command Not Issued By Auto CMD12 Error.

◆ cy_en_sd_host_status_t

SD host error codes.

Enumerator
CY_SD_HOST_SUCCESS 

Successful.

CY_SD_HOST_ERROR 

Non-specific error code.

CY_SD_HOST_ERROR_INVALID_PARAMETER 

The provided parameter is not valid.

CY_SD_HOST_ERROR_OPERATION_IN_PROGRESS 

A conflicting or requested operation is still in progress.

CY_SD_HOST_ERROR_UNINITIALIZED 

The module (or part of it) was not initialized properly.

CY_SD_HOST_ERROR_TIMEOUT 

A Time Out error occurred.

CY_SD_HOST_OPERATION_INPROGRESS 

The indicator for operation in progress.

CY_SD_HOST_ERROR_UNUSABLE_CARD 

The card is unusable.

CY_SD_HOST_ERROR_DISCONNECTED 

The card is disconnected.

◆ cy_en_sd_host_bus_width_t

The widths of the data bus.

Enumerator
CY_SD_HOST_BUS_WIDTH_1_BIT 

The 1-bit mode data transfer width.

CY_SD_HOST_BUS_WIDTH_4_BIT 

The 4-bit mode data transfer width.

CY_SD_HOST_BUS_WIDTH_8_BIT 

The 8-bit mode data transfer width.

◆ cy_en_sd_host_bus_speed_mode_t

The bus speed modes.

Enumerator
CY_SD_HOST_BUS_SPEED_DEFAULT 

Default Speed mode: 3.3V signaling at 25 MHz SDClk.

CY_SD_HOST_BUS_SPEED_HIGHSPEED 

High Speed mode: 3.3V signaling at 50 MHz SDClk.

CY_SD_HOST_BUS_SPEED_SDR12_5 

SDR12: UHS-I (1.8V signaling) at 25 MHz SDClk (12.5 MB/sec).

CY_SD_HOST_BUS_SPEED_SDR25 

SDR25: UHS-I (1.8V signaling) at 50 MHz SDClk (25 MB/sec).

CY_SD_HOST_BUS_SPEED_SDR50 

SDR50: UHS-I (1.8V signaling) at 100 MHz SDClk (50 MB/sec).

CY_SD_HOST_BUS_SPEED_EMMC_LEGACY 

Backwards Compatibility with legacy MMC card (26MB/sec max).

CY_SD_HOST_BUS_SPEED_EMMC_HIGHSPEED_SDR 

eMMC High speed SDR (52MB/sec max)

CY_SD_HOST_BUS_SPEED_DDR50 

DDR50: UHS-I (1.8V signaling) at 50 MHz SDClk (50 MB/sec).

◆ cy_en_sd_host_io_voltage_t

The SD bus voltage select.

Enumerator
CY_SD_HOST_IO_VOLT_3_3V 

3.3V.

CY_SD_HOST_IO_VOLT_1_8V 

1.8V.

◆ cy_en_sd_host_erase_type_t

Erase type.

Enumerator
CY_SD_HOST_ERASE_ERASE 

The ERASE operation.

CY_SD_HOST_ERASE_DISCARD 

The DISCARD operation.

CY_SD_HOST_ERASE_FULE 

The Full User Area Logical Erase (FULE) operation.

CY_SD_HOST_ERASE_SECURE 

The secure purge according to Secure Removal Type in EXT_CSD on the erase groups identified by the startAddr&endAddr parameters and any copies of those erase groups.

CY_SD_HOST_ERASE_SECURE_TRIM_STEP_2 

The secure purge operation on the write blocks according to Secure Removal Type in EXT_CSD and copies of those write blocks that were previously identified using Cy_SD_Host_Erase with CY_SD_HOST_ERASE_SECURE_TRIM_STEP_1.

CY_SD_HOST_ERASE_SECURE_TRIM_STEP_1 

Mark the write blocks, indicated by the startAddr&endAddr parameters, for secure erase.

CY_SD_HOST_ERASE_TRIM 

Trim the write blocks identified by the startAddr&endAddr parameters.

The controller can perform the actual erase at convenient time.

◆ cy_en_sd_host_card_type_t

Card type.

Enumerator
CY_SD_HOST_SD 

The Secure Digital card (SD).

CY_SD_HOST_SDIO 

The CD Input Output card (SDIO).

CY_SD_HOST_EMMC 

The Embedded Multimedia card (eMMC).

CY_SD_HOST_COMBO 

The Combo card (SD + SDIO).

CY_SD_HOST_UNUSABLE 

The unusable or not supported.

CY_SD_HOST_NOT_EMMC 

The card is not eMMC.

◆ cy_en_sd_host_card_capacity_t

The card capacity type.

Enumerator
CY_SD_HOST_SDSC 

SDSC - Secure Digital Standard Capacity (up to 2 GB).

CY_SD_HOST_SDHC 

SDHC - Secure Digital High Capacity (up to 32 GB).

CY_SD_HOST_EMMC_LESS_2G 

The eMMC block addressing for less than 2GB.

CY_SD_HOST_EMMC_GREATER_2G 

The eMMC block addressing for greater than 2GB.

CY_SD_HOST_SDXC 

SDXC - Secure Digital Extended Capacity (up to 2 TB).

CY_SD_HOST_UNSUPPORTED 

Not supported.

◆ cy_en_sd_host_response_type_t

SDHC response types.

Enumerator
CY_SD_HOST_RESPONSE_NONE 

No Response.

CY_SD_HOST_RESPONSE_LEN_136 

Response Length 136.

CY_SD_HOST_RESPONSE_LEN_48 

Response Length 48.

CY_SD_HOST_RESPONSE_LEN_48B 

Response Length 48.

Check Busy after response.

◆ cy_en_sd_host_dma_type_t

The DMA type enum.

Enumerator
CY_SD_HOST_DMA_SDMA 

SDMA mode.

CY_SD_HOST_DMA_ADMA2 

ADMA2 mode.

CY_SD_HOST_DMA_ADMA2_ADMA3 

ADMA2-ADMA3 mode.

◆ cy_en_sd_host_write_protect_t

Write Protect type enum.

Enumerator
CY_SD_HOST_PERMANENT 

The permanent write protect.

CY_SD_HOST_ENABLE_TEMPORARY 

The temporary write protect.

CY_SD_HOST_DISABLE_TEMPORARY 

Clear the temporary write protect.

◆ cy_en_sd_host_r1_response_t

Card status in R1 response type enum.

Enumerator
CY_SD_HOST_AKE_SEQ_ERROR_R1_RESP 

Error in the sequence of the authentication process.

CY_SD_HOST_APP_CMD_R1_RESP 

The card will expect ACMD, or an indication that the command has been interpreted as ACMD.

CY_SD_HOST_FX_EVENT_R1_RESP 

Extension Functions may set this bit to get host to deal with events.

CY_SD_HOST_READY_FOR_DATA_R1_RESP 

Corresponds to buffer empty signaling on the bus.

CY_SD_HOST_CURRENT_STATE_0_R1_RESP 

The state of the card when receiving the command.

The four bits are interpreted as a binary coded number between 0 and 15. It is 0th bit.

CY_SD_HOST_CURRENT_STATE_1_R1_RESP 

The state of the card when receiving the command.

The four bits are interpreted as a binary coded number between 0 and 15. It is 1st bit.

CY_SD_HOST_CURRENT_STATE_2_R1_RESP 

The state of the card when receiving the command.

The four bits are interpreted as a binary coded number between 0 and 15. It is 2nd bit.

CY_SD_HOST_CURRENT_STATE_3_R1_RESP 

The state of the card when receiving the command.

The four bits are interpreted as a binary coded number between 0 and 15. It is 3rd bit.

CY_SD_HOST_ERASE_RESET_R1_RESP 

It indicates if an erase sequence was cleared before executing because an out of erase sequence command was received.

CY_SD_HOST_CARD_ECC_DISABLED_R1_RESP 

It indicates if the command has been executed without using the internal ECC.

CY_SD_HOST_WP_ERASE_SKIP_R1_RESP 

It is set when only partial address space was erased due to existing write protected blocks or the temporary or permanent write protected card was erased.

CY_SD_HOST_CSD_OVERWRITE_R1_RESP 

It indicates read only section of the CSD does not match the card content or there was an attempt to reverse the copy or permanent WP bits was made.

CY_SD_HOST_ERROR_R1_RESP 

A general or an unknown error occurred during the operation.

CY_SD_HOST_CC_ERROR_R1_RESP 

Internal card controller error.

CY_SD_HOST_CARD_ECC_FAILED_R1_RESP 

Card internal ECC was applied but failed to correct the data.

CY_SD_HOST_ILLEGAL_COMMAND_R1_RESP 

Command not legal for the card.

CY_SD_HOST_COM_CRC_ERROR_R1_RESP 

The CRC check of the previous command failed.

CY_SD_HOST_LOCK_UNLOCK_FAILED_R1_RESP 

Set when a sequence or password error has been detected in lock/unlock card command.

CY_SD_HOST_CARD_IS_LOCKED_R1_RESP 

When set, signals that the card is locked by the host.

CY_SD_HOST_WP_VIOLATION_R1_RESP 

Set when the host attempts to write to a protected block or to the temporary or permanent write protected card.

CY_SD_HOST_ERASE_PARAM_R1_RESP 

An invalid selection of write-blocks for erase occurred.

CY_SD_HOST_ERASE_SEQ_ERROR_R1_RESP 

An error in the sequence of erase commands occurred.

CY_SD_HOST_BLOCK_LEN_ERROR_R1_RESP 

The transferred block length is not allowed for this card, or the number of transferred bytes does not match the block length.

CY_SD_HOST_ADDRESS_ERROR_R1_RESP 

A misaligned address which did not match the block length was used in the command.

CY_SD_HOST_OUT_OF_RANGE_R1_RESP 

The command's argument was out of the allowed range for this card.