Help with XTSD0xG Memory ICs

TomV

Active member
Hi,

I have been using this module from Adafruit in SPI mode and it works fine. I'm now looking to implement it on a custom board using it in place of the SD card on the Teensy via SDIO. I have removed the IC from the module and wired it up on a T3.6 to the microSD socket, though cant seem to get any repsonse from the IC, just an initialisation failed error in the serial monitor. When wired directly to the SPI pins it is still working, so I know the chip is working after removing it from the module. Just using the SD example code, with BUILTIN_SDCARD selected. This works on another teensy with a card in the slot so I know the example is good.

https://www.adafruit.com/product/4899

Currently wired as follows:

Teensy Micro SD Socket ---> XTSD01G
1 --> 1 (SD2)
2 --> 2 (SD3)
3 --> 5 (CMD)
4 --> 8 (Vdd)
5 --> 3 (CLK)
6 --> 4 (Vss)
7 --> 6 (SD0)
8 --> 7 (SD1)

Is this wired correctly? Is there anything obvious I'm missing in order to make one of these IC's work in SDIO mode and appear as a standard SD card?

Thanks.

https://cdn-shop.adafruit.com/product-files/4899/2005251034_XTX-XTSD04GLGEAG_C558839%282%29.pdf
 
Maybe you're running into a known bug where SdFat in SDIO mode doesn't work with certain extremely old and low capacity SD cards? It does work fine with those same cards in SPI mode.

The very old Arduino SD library worked fine with those cards in SDIO mode. But it didn't support larger than 32GB cards, long filename, and its performance wasn't good. So starting with Teensyduino 1.54, we dropped the old library and SD.h on Teensy became a thin wrapper which really just uses SdFat.

You might try using Teensduino 1.53. But it won't be easy. The oldest you can use with Arduino IDE 2.x is 1.56. So you'll need an old copy of Arduino IDE. But that's not the only obstacle. During the Arduino IDE 2 beta testing, a problem was discovered where Arduino IDE 2 writes to a preferences file shared with Arduino IDE 1.8, but the stuff written messes up Teensyduino 1.56 and earlier. Starting with Teensyduino 1.57, installs on old versions of Arduino IDE 1.8 are done in a way that ignores changes Arduino IDE 2.x made if you used Teensy. So to try older than Teensyduino 1.57, you'll either need a PC which hasn't ever run Arduino IDE 2.x with Teensy, or you'll need to find and delete all that prefs and settings stuff Arduino IDE stores.

To actually get the Teensduino 1.53 installer, go to the normal download page. Right click (or control-click if using Mac single button mouse) and use the popup menu to copy the link to clipboard. Then paste in your browser's address bar, but before you click Go or press enter, look for the 3 digits inside the URL which are the Teensyduino version number. Change to "153". The files are still on the PJRC server, but the website doesn't have links to them, so you need to do this step to actually download the old software.
 
Hi Paul.

Thanks for the reply. I eventually got to the bottom of the problem, there were a couple of issues. Firstly my poor soldering of 0.1mm cable onto the 0.5mm pitch pins, once this was resolved I could discover the IC and identify its type/capacity etc, but failed to initialise it. However like you say there was an issue with SdFat for old and low speed cards. I found a post on the forum regarding this, linked below with some changes to SdioTeensy.cpp. This seems to be a working solution for me, and I can now read/write to the IC as if it was any other SD card connected to the SDIO lines.

https://forum.pjrc.com/threads/69460-Builtin-Sd-Card-Teensy-4-1-SD-begin()-errors?p=331762&viewfull=1#post331762
 
Back
Top