Problem when using BUILTIN_SDCARD with Teensy 3.5

jondibar

Member
I am trying to use a 2Gb micro-SD card to play wav files.
The SD card is formatted with FAT32 and a wav file is also loaded on it.

With the code below I try to open the SD card but it always goes into "initialization failed!".

Code:
  if (!SD.begin(BUILTIN_SDCARD)) {
    Serial.println("initialization failed!");
    while (1);
  }
  Serial.println("initialization done.");

I have tried several SD cards and different Teensys, but it has never worked until now.
On the Teensy itself, near all pins are occupied, can this be a problem?

Thanks for your help :)

~Jonas
 
Can you try newer cards, like 8GB or larger?

Modern versions of SdFat have a known bug where very old SD cards don't work with SDIO (the built in socket or BUILTIN_SDCARD). Usually these ancient cards are 64MB to 512MB size, so it seems unlikely with a 2GB card. Since we switched to SdFat underneath SD.h (in version 1.54), sadly we lost support for very old cards using the built in SD socket. But newer cards 64GB to 1TB (and probably up to 2TB) work, and performance is much better.
 
Back
Top