Search by Tags

Colibri/Apalis i.MX6 SD card interface

Article updated at 23 Oct 2019
Compare with Revision

Disable SDIO

The SD card interface can be disabled in Registry: Disable the SDCard driver.

Changing Card Detect Pin and Polarity

The SD card detect pin and its polarity can be changed by adding the following values to the registry ( is the index of the SD controller you want to configure):

"CardDetectPin" = dword:X   ; X = the SODIMM/MXM3 pin number of the CardDetect GPIO. 0xFFFFFFFF means no CardDetect pin ->fix inserted card.
"CardDetectPol" = dword:Y   ; Y = active polarity, 0: GPIO is low if card is available, 
                            ;                      1: pin is high if card is available.

Default SDIO Pin Settings

As you can see in the datasheets of each module from the Tegra family, there are some different pins that can be used for the SDIO interfaces. Colibri pinout provides one standard SD interface, Apalis pinout provides two. You can set the pinout of an SD instance using the GPIO multiplexing as described here. For example you can enable a second SD instance on Colibri IMX6 using those entries:


Clock Speed and Misc Settings

SD card clock frequency can be limited to a maximum value - this can be useful for debugging purposes to exclude hardware issues that may lead to bad signal quality at high frequency. The actual used frequency will be lower than MaximumClockFrequency.

ClockAlwaysOn has to be set to 0x1 if you want to prevent the clock from being switched off if there is no communication going on. This is often used for SDIO WLAN adapters and similar devices.

"MaximumClockFrequency" = dword:01298be0  ; Maximum SD card clock (Hz). Default 52MHz. 
"ClockAlwaysOn"         = dword:value     ; default value 0x0

SDIO Bus Width Settings

Each of the SD configurations has a default bus width if you want to force a bus with of 4 or 8 bits, use the following registry key

"BusWidth" = dword: X; Number of data lines forced to be used. If not define the default setting for each configuration is used.

Using WriteProtect GPIO

Currently, the SDCard driver does not support the WriteProtect feature.