What "pin" does BUILTIN_SDCARD control?

Status
Not open for further replies.

evictus

Member
Maybe it's my unfamiliarity with how 4-bit SDIO works, but I'm curious as to how the SS pin for an SD card can be replaced with BUILTIN_SDCARD on the Teensy 3.5/6. Does SDIO also use a slave-select mechanism? The wikipedia page is unclear as to what the transfer protocol differences are between SPI, 1-wire SDIO and 4-wire SDIO.
 
It's just a software trick -- a big number that's not a pin that the SD lib examines, and determines it's not a SPI pin, and branches to activate the SDHC interface/software for the the builtin uSD
 
Maybe it's my unfamiliarity with how 4-bit SDIO works, but I'm curious as to how the SS pin for an SD card can be replaced with BUILTIN_SDCARD on the Teensy 3.5/6. Does SDIO also use a slave-select mechanism? The wikipedia page is unclear as to what the transfer protocol differences are between SPI, 1-wire SDIO and 4-wire SDIO.

They start out identically. But in order to switch the card into SPI mode you assert the CS pin while transmitting CMD0. SD mode (SDIO is actually a variant of SD cards) starts as 1 wire but you can ask if the card supports other features (4 bit, higher speed, etc.) and enable them if desired and supported. All of this is covered in the specifications. Part 1 being the most useful.

Table 3-1 shows the pins functions. Note that the pin used for CS in SPI mode is used for Card Detect/DAT3 in SD mode.
 
Status
Not open for further replies.
Back
Top