PSoC 6 Peripheral Driver Library

General Description

The masks below are for CSD Register Version 2.0 and can be used with the Cy_SD_Host_GetCsd function.

Macros

#define CY_SD_HOST_CSD_V2_CSD_STRUCTURE   (0x0000FF00UL)
 CSD structure (contained in csd[3])
 
#define CY_SD_HOST_CSD_V2_TAAC   (0x0000FF00UL)
 The data read access-time (contained in csd[3]). More...
 
#define CY_SD_HOST_CSD_V2_NSAC   (0x000000FFUL)
 The data read access-time in CLK cycles (NSAC*100) (contained in csd[3]). More...
 
#define CY_SD_HOST_CSD_V2_TRAN_SPEED   (0xFF000000UL)
 The max. More...
 
#define CY_SD_HOST_CSD_V2_CCC   (0x00FFF000UL)
 The card command classes (contained in csd[2]). More...
 
#define CY_SD_HOST_CSD_V2_READ_BL_LEN   (0x00000F00UL)
 The max. More...
 
#define CY_SD_HOST_CSD_V2_READ_BL_PARTIAL   (0x00000080UL)
 The partial blocks for read allowed (contained in csd[2]). More...
 
#define CY_SD_HOST_CSD_V2_WRITE_BLK_MISALIGN   (0x00000040UL)
 The write block misalignment (contained in csd[2]). More...
 
#define CY_SD_HOST_CSD_V2_READ_BLK_MISALIGN   (0x00000020UL)
 The read block misalignment (contained in csd[2]). More...
 
#define CY_SD_HOST_CSD_V2_DSR_IMP   (0x00000010UL)
 The DSR implemented (contained in csd[2]). More...
 
#define CY_SD_HOST_CSD_V2_C_SIZE_MASK   (0x3FFFFF00UL)
 The device size (contained in csd[1]). More...
 
#define CY_SD_HOST_CSD_V2_ERASE_BLK_EN   (0x00000040UL)
 The erase single block enable (contained in csd[1]). More...
 
#define CY_SD_HOST_CSD_V2_SECTOR_SIZE_MSB   (0x0000003FUL)
 The MSB of erase sector size (6 MSB bits contained in csd[1]). More...
 
#define CY_SD_HOST_CSD_V2_SECTOR_SIZE_LSB   (0x80000000UL)
 The LSB of erase sector size (1 LSB bit of SECTOR_SIZE contained in csd[0]).
 
#define CY_SD_HOST_CSD_V2_WP_GRP_SIZE   (0x7F000000UL)
 The write protect group size (contained in csd[0]). More...
 
#define CY_SD_HOST_CSD_V2_WP_GRP_ENABLE   (0x00800000UL)
 The write protect group enable (contained in csd[0]). More...
 
#define CY_SD_HOST_CSD_V2_R2W_FACTOR   (0x001C0000UL)
 The write speed factor (contained in csd[0]). More...
 
#define CY_SD_HOST_CSD_V2_WRITE_BL_LEN   (0x0003C000UL)
 The max. More...
 
#define CY_SD_HOST_CSD_V2_WRITE_BL_PARTIAL   (0x00002000UL)
 The partial blocks for write allowed (contained in csd[0]). More...
 
#define CY_SD_HOST_CSD_V2_FILE_FORMAT_GRP   (0x00000080UL)
 The File format group (contained in csd[0]). More...
 
#define CY_SD_HOST_CSD_V2_COPY   (0x00000040UL)
 The copy flag (OTP) (contained in csd[0]). More...
 
#define CY_SD_HOST_CSD_V2_PERM_WRITE_PROTECT   (0x00000020UL)
 The permanent write protection (contained in csd[0]). More...
 
#define CY_SD_HOST_CSD_V2_TMP_WRITE_PROTECT   (0x00000010UL)
 The temporary write protection (contained in csd[0]). More...
 
#define CY_SD_HOST_CSD_V2_FILE_FORMAT   (0x0000000CUL)
 The File format (contained in csd[0]). More...
 

Macro Definition Documentation

◆ CY_SD_HOST_CSD_V2_TAAC

#define CY_SD_HOST_CSD_V2_TAAC   (0x0000FF00UL)

The data read access-time (contained in csd[3]).

This field is fixed to 0Eh, which indicates 1 ms.

◆ CY_SD_HOST_CSD_V2_NSAC

#define CY_SD_HOST_CSD_V2_NSAC   (0x000000FFUL)

The data read access-time in CLK cycles (NSAC*100) (contained in csd[3]).

This field is fixed to 00h. NSAC should not be used to calculate time-out values for CSD Version 2.0.

◆ CY_SD_HOST_CSD_V2_TRAN_SPEED

#define CY_SD_HOST_CSD_V2_TRAN_SPEED   (0xFF000000UL)

The max.

data transfer rate (contained in csd[2]). Equals to 0x32 (25 MHz) or 0x5A (50 MHz).

◆ CY_SD_HOST_CSD_V2_CCC

#define CY_SD_HOST_CSD_V2_CCC   (0x00FFF000UL)

The card command classes (contained in csd[2]).

The card command class register CCC defines which command classes are supported by this card. A value of 1 in a CCC bit means that the corresponding command class is supported.

◆ CY_SD_HOST_CSD_V2_READ_BL_LEN

#define CY_SD_HOST_CSD_V2_READ_BL_LEN   (0x00000F00UL)

The max.

read data block length (contained in csd[2]). This field is fixed to 9h, which indicates READ_BL_LEN=512 Byte.

◆ CY_SD_HOST_CSD_V2_READ_BL_PARTIAL

#define CY_SD_HOST_CSD_V2_READ_BL_PARTIAL   (0x00000080UL)

The partial blocks for read allowed (contained in csd[2]).

This field is fixed to 0, which indicates partial block read is inhibited and only unit of block access is allowed.

◆ CY_SD_HOST_CSD_V2_WRITE_BLK_MISALIGN

#define CY_SD_HOST_CSD_V2_WRITE_BLK_MISALIGN   (0x00000040UL)

The write block misalignment (contained in csd[2]).

This field is fixed to 0, which indicates write access crossing physical block boundaries is always disabled in High Capacity SD Memory Card.

◆ CY_SD_HOST_CSD_V2_READ_BLK_MISALIGN

#define CY_SD_HOST_CSD_V2_READ_BLK_MISALIGN   (0x00000020UL)

The read block misalignment (contained in csd[2]).

This field is fixed to 0, which indicates read access crossing physical block boundaries is always disabled in High Capacity SD Memory Card.

◆ CY_SD_HOST_CSD_V2_DSR_IMP

#define CY_SD_HOST_CSD_V2_DSR_IMP   (0x00000010UL)

The DSR implemented (contained in csd[2]).

Defines if the configurable driver stage is integrated on the card.

◆ CY_SD_HOST_CSD_V2_C_SIZE_MASK

#define CY_SD_HOST_CSD_V2_C_SIZE_MASK   (0x3FFFFF00UL)

The device size (contained in csd[1]).

This parameter is used to calculate the user data area capacity in the SD memory card (not include the protected area). The user data area capacity is calculated from C_SIZE as follows: memory capacity = (C_SIZE+1) * 512K byte.

◆ CY_SD_HOST_CSD_V2_ERASE_BLK_EN

#define CY_SD_HOST_CSD_V2_ERASE_BLK_EN   (0x00000040UL)

The erase single block enable (contained in csd[1]).

This field is fixed to 1, which means the host can erase one or multiple units of 512 bytes.

◆ CY_SD_HOST_CSD_V2_SECTOR_SIZE_MSB

#define CY_SD_HOST_CSD_V2_SECTOR_SIZE_MSB   (0x0000003FUL)

The MSB of erase sector size (6 MSB bits contained in csd[1]).

SECTOR_SIZE is fixed to 7Fh, which indicates 64 KBytes. This value does not relate to erase operation. Version 2.00 cards indicates memory boundary by AU size and this field should not be used.

◆ CY_SD_HOST_CSD_V2_WP_GRP_SIZE

#define CY_SD_HOST_CSD_V2_WP_GRP_SIZE   (0x7F000000UL)

The write protect group size (contained in csd[0]).

This field is fixed to 00h. The High Capacity SD Memory Card does not support write protected groups.

◆ CY_SD_HOST_CSD_V2_WP_GRP_ENABLE

#define CY_SD_HOST_CSD_V2_WP_GRP_ENABLE   (0x00800000UL)

The write protect group enable (contained in csd[0]).

This field is fixed to 0. The High Capacity SD Memory Card does not support write protected groups.

◆ CY_SD_HOST_CSD_V2_R2W_FACTOR

#define CY_SD_HOST_CSD_V2_R2W_FACTOR   (0x001C0000UL)

The write speed factor (contained in csd[0]).

This field is fixed to 2h, which indicates 4 multiples.

◆ CY_SD_HOST_CSD_V2_WRITE_BL_LEN

#define CY_SD_HOST_CSD_V2_WRITE_BL_LEN   (0x0003C000UL)

The max.

write data block length (contained in csd[0]). This field is fixed to 9h, which indicates WRITE_BL_LEN=512 Byte.

◆ CY_SD_HOST_CSD_V2_WRITE_BL_PARTIAL

#define CY_SD_HOST_CSD_V2_WRITE_BL_PARTIAL   (0x00002000UL)

The partial blocks for write allowed (contained in csd[0]).

This field is fixed to 0, which indicates partial block read is inhibited and only unit of block access is allowed.

◆ CY_SD_HOST_CSD_V2_FILE_FORMAT_GRP

#define CY_SD_HOST_CSD_V2_FILE_FORMAT_GRP   (0x00000080UL)

The File format group (contained in csd[0]).

This field is set to 0. Host should not use this field.

◆ CY_SD_HOST_CSD_V2_COPY

#define CY_SD_HOST_CSD_V2_COPY   (0x00000040UL)

The copy flag (OTP) (contained in csd[0]).

Defines if the contents is original (=0) or has been copied (=1). The COPY bit for OTP and MTP devices, sold to end consumers, is set to 1, which identifies the card contents as a copy. The COPY bit is a one time programmable bit.

◆ CY_SD_HOST_CSD_V2_PERM_WRITE_PROTECT

#define CY_SD_HOST_CSD_V2_PERM_WRITE_PROTECT   (0x00000020UL)

The permanent write protection (contained in csd[0]).

Permanently protects the entire card content against overwriting or erasing (all write and erase commands for this card are permanently disabled). The default value is 0, i.e. not permanently write protected.

◆ CY_SD_HOST_CSD_V2_TMP_WRITE_PROTECT

#define CY_SD_HOST_CSD_V2_TMP_WRITE_PROTECT   (0x00000010UL)

The temporary write protection (contained in csd[0]).

Temporarily protects the entire card content from being overwritten or erased (all write and erase commands for this card are temporarily disabled). This bit can be set and reset. The default value is 0, i.e. not write protected.

◆ CY_SD_HOST_CSD_V2_FILE_FORMAT

#define CY_SD_HOST_CSD_V2_FILE_FORMAT   (0x0000000CUL)

The File format (contained in csd[0]).

This field is set to 0. Host should not use this field.