Tegra SD card interface settings
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:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SDIO]
"SodimmCardDetect" = dword:X ; X = the SODIMM 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.
By default the SodimmCardDetect is set to SODIMM Pin 43 for default SDIO and -1 for all the other instances. CardDetectPol is active low (0) by default. You can use any other SODIMM Pin which is not used by any other interface as a card detect pin.
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. Bellow you see a selection of possible SDIO instance configurations. Use the default and recommended 2nd interface to be compatible with the Colibri standard pinout.
Each of the following configuration has a default bus width, if you want to force a bus with of 4 or 8 bits, use the following registry key (supported since Image V2.0 beta 1):
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SDIO]
"BusWidth" = dword:X ; Number of data lines forced to be used. If not define default setting for each configuration is used.
Colibri T20
Instance | CLK | CMD | Dflt. width | DAT0 | DAT1 | DAT2 | DAT3 | DAT4 | DAT5 | DAT6 | DAT7 |
---|---|---|---|---|---|---|---|---|---|---|---|
4 (default) | 47 | 190 | 4 | 192 | 49 | 51 | 53 | 166 | 168 | 170 | 172 |
3 | 30 | 67 | 4 | 63 | 55 | 28 | 59 | 90 | 88 | 86 | 92 |
2 (recommended 2nd interface) | 96 | 98 | 4 | 101 | 103 | 79 | 97 | 67 | 59 | 85 | 65 |
1 | 23 | 25 | 4 | 27 | 37 | 33 | 35 | - | - | - | - |
Colibri T30
S.No. | CLK | CMD | Dflt. width | DAT0 | DAT1 | DAT2 | DAT3 | DAT4 | DAT5 | DAT6 | DAT7 |
---|---|---|---|---|---|---|---|---|---|---|---|
2 (default) | 47* | 190* | 4 | 192* | 49* | 51* | 53* | - | - | - | - |
1 (recommended 2nd interface) | 96* | 98* | 4 | 101* | 103* | 79* | 97* | - | - | - | - |
3 | 30 | 67* | 4 | 63 | 55 | 28 | 59 | - | - | - | - |
(*) These pins are multiplexed. Make sure the second instance on the SODIMM pin remains tristated
Apalis T30
S.No. | CLK | CMD | Dflt. width | DAT0 | DAT1 | DAT2 | DAT3 | DAT4 | DAT5 | DAT6 | DAT7 |
---|---|---|---|---|---|---|---|---|---|---|---|
1 (default 4 bit SD bus) | 184 | 180 | 4 | 186 | 188 | 176 | 178 | - | - | - | - |
2 | 1 | 3 | 4 | 5 | 7 | 11 | 15 | 175 | 173 | 135 | 159 |
3 (default 8 bit MMC bus) | 154 | 150 | 8 | 160 | 162 | 144 | 146 | 148 | 152 | 156 | 158 |
SD Card SODIMM Pin Assignment
You can define the pin selection for the SD interfaces two different ways. Either use the Instance number from the table above (recommended) or select all the pins manually.
Select a configuration by instance number
Chose one of the instance numbers from the instance table above. The following example shows how to use a specific SDIO instance:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SDIO]
"SdioInstance" = "dword:4" ; Default is 4, See instance table above for alternative setups.
Define pins manually
We recommend to select the pin setup automatically as described above. Still if you do not want to use one of the SDIO instances predefined you can select the pins manually. We don't recommend selecting pins on your own as changing pins could lead to conflicting setups.
You can choose the SODIMM pin assignment.
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SDIO]
SodimmClk (dword)
SodimmCmd (dword)
SodimmDat0 (dword)
SodimmDat (dword)
SodimmDat2 (dword)
SodimmDat3 (dword)
SodimmDat4 (dword)
SodimmDat5 (dword)
SodimmDat6 (dword)
SodimmDat7 (dword)
Run multiple instances
It is possible to run multiple SDIO instance in parallel. Therefore just add an other key to the registry like this:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SDIOi]
where as i is an incremented number (0 > i). Copy all the entries like they are in the main instance (Dll, Prefix, IClass, Order) and add the the specific pin configuration to the new key (i.e. SdioInstance) plus SDIO pin detect configuration. Up to four instances are supported.
Clock Speed and Misc Settings
This feature is available in Images V1.1 beta 4 and later.
SD card clock frequency can be limited to a maximum value - this can be useful for debugging purposes. 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
"TapDelay" = dword:value ; TapDelay defines the time between the clock edge and when the
; controller samples the data signals. Default 0x4
"PowerUpDelay" = dword:Z ; Z = Delay in ms between powering up the device and start communication.
; Default value 200ms. Supported from image version 1.4 beta 1 on.
Using WriteProtect GPIO
Currently, the SDCard driver does not supports WriteProtect feature.
Testing alternative instances on the Colibri Evaluation Board V2.1
This is an example how to test an alternative SDIO setting. The following example tests the SD Card slot of the Evaluation Board with the SDIO instance 2 of the Colibri T20 and second configuration from table shown in Colibri T30 section above.
The following table shows the cabling. The inside rail in the table is the line of X9 or X10, outside is X12 or X7. of Please also take a look on the picture of the setup. Remove all the jumpers of the used pins.
Cabling Table:
Port | Inside rail | Outside rail |
---|---|---|
CLK | Upper 38 | Lower 16 |
CMD | Upper 39 | Upper 45 |
DAT0 | Lower 39 | Upper 46 |
DAT1 | Lower 40 | Lower 17 |
DAT2 | Lower 34 | Lower 18 |
DAT3 | Lower 38 | Lower 19 |