Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Problem when using BUILTIN_SDCARD with Teensy 3.5

  1. #1
    Junior Member
    Join Date
    Jan 2023
    Posts
    6

    Problem when using BUILTIN_SDCARD with Teensy 3.5

    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

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    27,656
    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.

  3. #3
    Junior Member
    Join Date
    Jan 2023
    Posts
    6
    Thanks for the quick answer :-)
    I changed to a new 32GB Card, it works flawless.

    Have a good Day
    ~Jonas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •