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

Status
Not open for further replies.

Indy

Member
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.
<snip>
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?

Thanks,
 
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
 
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.
 
Status
Not open for further replies.
Back
Top