This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320DM8168: Problem interfacing micro SD card

Part Number: TMS320DM8168

We are having problems interfacing with a micro SD card through the SD/SDIO interface. The problem is that we cannot read from the micro SD card on some of our custom designed boards. Some boards operate correctly while others don't.

We are using the EZSDK U-Boot and Linux as supplied by TI on our custom designed boards. 

We are booting from NOR. The U-Boot is executed and tries to mount the rest of the file system that is located in the SD card. So we are using the U-Boot SD/SDIO drivers to access the SD card.

The flow of the SD card commands is the following:

CMD0 -> CMD8 -> ACMD41 (2 times) -> CMD2 -> CMD3 -> CMD9 -> CMD7 -> ACMD51

This is as it came from the TI U-Boot software with no alterations at all.

The ACMD51 is the point where the SD card stops responding. Up until then the flow is as expected. The CPU send clocks to the SD card and exchanges data through the CMD line. The card responds as expected and everything goes well.

Then the CMD55 is transmitted without any problems and after that the CMD51. At this point we see the CMD data on the line by using an oscilloscope and the CLKs but the expected on the DAT0 data driven by the SD card never arrive. In fact by reading the SD_PSTATE register the CPU waits for data from the SD card but we are not seeing any data on DAT0. We only see the CLKs that the CPU continuously sends while waiting for the SD card response. The DAT0 line stays high.

All these happen while operating at 400KHz in the initialization phase prior to switching to the 4-bit data bus and higher speeds.

We tried other initialization sequences, as described by various SD card vendors and everything seems to work until we issue the CMD7 and expect data on DAT0. It seems that after CMD7 the SD card stops responding.

So far we have tried the following

Using various different micro SD cards. We tried 4 different types, old 1GB SD cards, 2GB SD cards and newer SDHC up to 4 GB SD cards. All of them were operational on the boards that work OK but not on the boards that don't work.

Probing the SD/SDIO signals with an oscilloscope. The signals are OK.

Driving the DAT0 line from the CPU and it worked OK.

Measuring the pull up and in series DAT/CLK/CMD resistors on both cards. The Pull Up resistors are 51K and the in series 22 Ohm. These are the exact same on both the correct and incorrect operating  boards.

Altering the SD card initialization sequence as recommended by various SD card vendors (Toshiba, Sandisk). 

Testing for possible short or open circuits on the micro SD connector while the micro SD card is inserted.

Reducing the 400KHz clock to 200KHz.

Booting Linux Kernel (TI EZSDK supplied, no alteration on the SD/SDIO drivers) and using the Kernel SD/SDIO drivers to access the SD cards. It failed on the incorrectly operating boards but succeeded OK on the correctly operating ones.

Since we are running out of ideas what is the cause of these problems on some of our boards while others are correctly operating, and we don't seem to find any hardware related differences between them, any help will be greatly appreciated.

Thank you for your time.