Teensy 3.6 SD Card IO

Status
Not open for further replies.

Major7

Active member
Hi PJRC community:

I cannot find the builtin SD card assignment for

const int chipSelect = BUILTIN_SDCARD

Does anyone know what pin that is?

and why doesn't the TEENSY pinout bother to tell you that?


Rob Jones
 
It's in hardware/teensy/avr/libraries/SD/utility/Sd2Card.h. And that is included by libraries/SD/src/utility/SdFat.h.

The value is 254, but it isn't a real pin. I believe all of the uses in the SD library check for that value, and then call other functions instead of doing the standard SPI transfer.
 
Glad the good answer from @MichaelMeissner got that fixed.

The only thing I'd add is that the T_3.5 and 3.6 onboard SD card socket are connected to dedicated pins independant from any other pin or bus, so that value "chipSelect = BUILTIN_SDCARD" tells the software to use that hardwired interface for access.
 
Last edited:
Status
Not open for further replies.
Back
Top