SDfat not recognizing SPI on teensy 4.0

comedic

New member
Hello. I am using the teensy 4.0 trying to run the SdFat SDinfo example but it's not detecting my SD card. I have it wired in SPI but it say's assuming SDIO interface. Is there anything I can do? Thanks!
 
Can't see code - might need edit to CS chip select pin to the pin # in use and not passing in BUILTIN_SDCARD
 
Is there anything I can do?

You could try editing the code to specifically tell it to use SPI.

Looking at that specific SDinfo example, my best guess is you would delete all these lines in red and keep the line in green

Code:
[COLOR="#FF0000"]// Try to select the best SD card configuration.
#if HAS_SDIO_CLASS
#define SD_CONFIG SdioConfig(FIFO_SDIO)
#elif ENABLE_DEDICATED_SPI
#define SD_CONFIG SdSpiConfig(SD_CS_PIN, DEDICATED_SPI, SD_SCK_MHZ(16))
#else  // HAS_SDIO_CLASS[/COLOR]
[COLOR="#008000"][B]#define SD_CONFIG SdSpiConfig(SD_CS_PIN, SHARED_SPI, SD_SCK_MHZ(16))[/B][/COLOR]
[COLOR="#FF0000"]#endif  // HAS_SDIO_CLASS[/COLOR]
 
Back
Top