sid8580
Well-known member
I've read that the latest version of Bill Greiman's SdFat library (version 2 Beta) is now compatible with the Teensy 4.0:
https://forum.pjrc.com/threads/57669-SdFat-SDIO-for-Teensy-4-0
So...
I've wired up all of the T4.0 pins between 34 and 39 directly to their corresponding pads on a generic SD-to-microSD-adapter, to minimize the tiny and difficult soldering work at this early testing stage. The microSD card goes in the adapter and voila, poor man's microSD slot... or at least that's the idea I've been getting from various other sources online. I have some actual/physical microSD slots on hand which I will use later on - they don't appear to have any active components in them so I don't see why this wouldn't work.
The pins are connected 1-to-1 per this diagram:
https://components101.com/misc/microsd-card-pinout-datasheet
This matches and is even in the same order as the pins on the underside of the Teensy. But I've tried several of the example sketches within the SdFat-Beta library and although they compile fine, I get errors when I run them (SD fails to init).
I have read that there is a mux issue impacting those pins I'm using, and I see "Teensy 4.0 - use first SPI port" commented in the TeensySdioDemo example.
Is that the fastest configuration possible? Per Bill's post linked above he uses pin 26, MOSI1, and pin 27, SCK1, on the Teensy 4.0 Back Side - and pin 0 for CS1 and pin 1 for MISO1. I'm finding myself confused by the differences between hardware SPI, uSDHC and SDIO, and how to wire them.
Is there a way to utilize the row of pins that would more naturally connect to a microSD card slot underneath?
Thanks
https://forum.pjrc.com/threads/57669-SdFat-SDIO-for-Teensy-4-0
So...
I've wired up all of the T4.0 pins between 34 and 39 directly to their corresponding pads on a generic SD-to-microSD-adapter, to minimize the tiny and difficult soldering work at this early testing stage. The microSD card goes in the adapter and voila, poor man's microSD slot... or at least that's the idea I've been getting from various other sources online. I have some actual/physical microSD slots on hand which I will use later on - they don't appear to have any active components in them so I don't see why this wouldn't work.
The pins are connected 1-to-1 per this diagram:
https://components101.com/misc/microsd-card-pinout-datasheet
This matches and is even in the same order as the pins on the underside of the Teensy. But I've tried several of the example sketches within the SdFat-Beta library and although they compile fine, I get errors when I run them (SD fails to init).
I have read that there is a mux issue impacting those pins I'm using, and I see "Teensy 4.0 - use first SPI port" commented in the TeensySdioDemo example.
Is that the fastest configuration possible? Per Bill's post linked above he uses pin 26, MOSI1, and pin 27, SCK1, on the Teensy 4.0 Back Side - and pin 0 for CS1 and pin 1 for MISO1. I'm finding myself confused by the differences between hardware SPI, uSDHC and SDIO, and how to wire them.
Is there a way to utilize the row of pins that would more naturally connect to a microSD card slot underneath?
Thanks
Last edited: