Is SD Card default mode SPI bus or Full SD for Colibri T20?

Colibri T20 256MB V1.2A
Custom board
WinCE 7 BSP 2.1 2018-02-20

Earlier this year, we started experiencing a serious problem with micro SD cards.
Randomly, at start-up, the operating system was unable to detect and mount them.

Now, since our card is designed to keep the SD inside the device’s shell and is not removable, there is no PIN for SD card detection, nor one that can be used for this purpose.

Furthermore, it is not possible to interrupt the power supply and only restart the hardware section of the SD card connector.

We are looking at the initialization of the SD card in more detail and have a question:
How can we tell which mode the SD Card is being used in on our devices? That is: SPI bus or Full SD?
If it helps, from what I can see in the registry, I don’t see any configurations other than the default (see attachment).
SD Card entries.reg (2.4 KB)

This question arises for the following reason:
"At the hardware level, our board is designed to support both modes.

For both modes, several SD manufacturers recommend initializing the SD with at least 64 clock cycles (see a screenshot from the enclosed Viking data sheet, where it is recommended to send more than 74 shots).
Part1_Physical_Layer_Simplified_Specification_Ver8.00.pdf (2.8 MB)

We measured 56 clock cycles on the device in my possession, so this seems low compared to what Viking says.

In fact, each byte transmitted involves 8 clock cycles, so we would need to go from the current 7 bytes sent to at least 10 bytes.

I have read that typically the value transmitted is hFF (dummy byte).

I can’t tell you what is sent to SD to date because first I need to understand the management mode (see first question above: SPI or full SD).

We have measured the clock frequency with which communication to SD takes place to date: 100 kHz (which corresponds to the recommended value in the case of an SPI interface)."

Could this lack of signals be the cause of the SD not being detected/mounted at start-up?
We are also trying to tweak the two TapDelay and PowerUpDelay registers mentioned here to see if it solves anything.

Thanks for your help.

Could someone from toradex take a look on this and reply something please?
Or at least let us know that you are taking care of it.

This issue is going on from quite a while and we have now got answered from our hardware designer that our board and the SD card seems fine.

Is there something faulty on the newest 2.3 BSP version of T20 we got in the recent upcoming modules?
Perhaps something that could lead to this issue when a T20 module gets flashed to install an older version of the BSP (like the mentioned 2.1 we are using)?

Please let me know asap. Thank you.

Hi @EnricoPompeiani ,

The SD Driver is always using the SD Protocol, not the SPI one. The initial communication with the card is done at 100 kHz and only by using CMD and CLK lines. After negotiation with the cards one or more data lines will be activated.

We do not have control on the number of clocks sent at powerup, this is done by the SD Controller.

There are 2 possible resons i see for the communication problems at bootup:

If the issue happens only when rebooting:

  1. System is rebooted without powercycling the SD Card: this is a known issue at it looks like there is not really anything we can do about it… depending on the card it can happen that it will never be able to
    be initialized without proper power cycle.

If the issue happens also on power-on:
2. There is something wrong with the pull-up resistors on CMD/DAT/CLK lines. Could youu share your schematics?

This issue has been fixed hardware-side.
I don’t know the exact details, only they have added a resistance on the schematics to cope with the lacking of the minimum set of initialization clock cycles mentioned in the topic.
I will flag this closed.