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

Thread: Should an Adafruit SD card breakout work with a Teensy 4.0?

  1. #1
    Junior Member
    Join Date
    Nov 2020

    Should an Adafruit SD card breakout work with a Teensy 4.0?

    Arduino 1.8.13
    Teensyduino 1.54-beta5
    SdFat (Bill Greiman) 2.0.2

    I'm trying to get the Adafruit SD card breakout board to work with a Teensy 4.0 with no luck. I'm using the following example with no changes:

    Examples > SdFat > SdInfo

    I've tried several cards and always get the following output:

    SD initialization failed.
    SD errorCode: SD_CARD_ERROR_ACMD41 = 0x17
    SD errorData = 0x0

    I've wired as follows:
    T4 <> AF254
    10 CS <> CS
    11 MOSI <> DI
    12 MISO <> DO
    13 CLK <> CLK
    Vin <> 5v
    Gnd <> Gnd

    Should this work? Any ideas what the problem could be?


  2. #2
    Senior Member
    Join Date
    Jul 2014
    Teensy4.x are 3.3V I/O so do do not want a board that is made to interface with a 5V board.
    5V in Teensy4 pins may kill these pins

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    It probably won't work. If it does, it will do so just barely. The 74HC buffer chip adds delay. For slower boards with lower SPI clocks, the delay is fine. For boards like Teensy 4.0 which use a faster SPI clock, it's too much.

    You might be able to get it working with a custom SD.sdfs.begin() to configure a slower clock speed.

    The connections you described look correct. But there's always the possibility of a mistake or misunderstanding, which usually can only be seen with photos. If a slower clock doesn't work, recommend posting photos of your wiring.

    One piece of good news... the 74HC4050 buffer chip is wired to 3.3V. So unless 5V got mistakenly connected to the 3.3V power pin, it should not be able to damage your Teensy by driving 5V onto the SPI pins.

Posting Permissions

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