Search by Tags

Colibri/Apalis i.MX6 SD card interface

 
Subscribe for this article updates

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):

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\USDHC<X>]
"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 which 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:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\USDHC2\Pinout_Default]
"colibripin_99"="altfn=0"
"colibripin_130"="altfn=0"
"colibripin_106"="altfn=0"
"colibripin_98"="altfn=0"
"colibripin_69"="altfn=0"
"colibripin_93"="altfn=0"

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 being switched off if there is no communication going on. This is often used for SDIO WLAN adapters and similar devices.

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SDIO]
"MaximumClockFrequency" = dword:01298be0  ; Maximum SD card clock (Hz). Default 52MHz. 
"ClockAlwaysOn"         = dword:value     ; default value 0x0

Using WriteProtect GPIO

Currently, the SDCard driver does not support WriteProtect feature.