AnsweredAssumed Answered

sdmmc SD_Write()/SD_Read() failed with ATP card

Question asked by JohnU on Jul 3, 2017
Latest reply on Aug 7, 2017 by JohnU

Hi,

 

I test FSL sdmmc on OM13092 LPCXpresso54608 using sdcard_polling example (SDK 2.2.0).

I have found it fails on SD_Read() / SD_Write() a single 512-byte sector with the microSD card: ATP 512MB Industrial Grade (AF512UDI AML 16020015 161316M83ENM E1606BA).

I've also tried with decreased busClock_Hz to 3MHz and both 4 and 1-bit bus width.

 

On SD_Write(startBlock=2, blockSize=512, blockCount=1):

SD_WaitWriteComplete() is succressful (R1 response[0]=0x900).

Unfortunately kSDMMC_WriteSingleBlock (CMD24, argument=1024) fails due to SD_Transfer() failure:

- SDIF_WaitCommandDone(): status = 0x84 after SDIF_GetInterruptStatus() (DCRC bit is set). R1 response[0] = 0x20000900 (BLOCK_LEN_ERROR).

 

On SD_Read(startBlock=2, blockSize=512, blockCount=1):

SD_WaitWriteComplete() is succressful (R1 response[0]=0x900).

Unfortunately kSDMMC_ReadSingleBlock (CMD17, argument=1024) fails due to SD_Transfer() failure:

- SDIF_WaitCommandDone(): status = 0x84 after SDIF_GetInterruptStatus() (DCRC bit is set). R1 response[0] = 0x900 ("success")

- first SDIF_GetInternalDMAStatus() call returns IDSTS=0x122

- SDIF_TransferDataBlocking(): SDIF_GetInternalDMAStatus() returns dmaStatus=0x122 (kSDIF_DMACardErrorSummary, ie. CES bit)

 

Card data:

RawCid Details:{4261479477, 269648260, 1176524100, 155275329}

RawCsd Details:{373293205, 3988258703, 1532592598, 6160434}

RawScr Details:{36012032, 0}

ocr 0x80ff8000

 

Is it known problem?

 

best regards

J.

Outcomes