I'm totally stumped. I'm trying to read a microSD card in the Adafruit 2.8" TFT Resistive Touchscreen/TFT/microSD combo.
Since the shield is made for Arduino, I'm using the Shield Shield to attach to my Photon. Therefore, I have to use SPI1 (CS for microSD is Arduino 4 = Photon D6).
When I first got the thing (months ago), I tested it using an Arduino and it worked great...SD.h and a little Adafruit_GFX.h and voila...reading bmp's, displaying on the screen. Albeit slowly, but it worked great.
But now here I am, trying to get anything to load from the SD and nada. I've tried a version of SdFat, but can't get the card to read. I've tried slowing the clock down to SPI_CLOCK_DIV16, and ramped it up to SPI_FULL_SPEED.
Getting these errors:
Can't access SD card. Do not reformat.
No card, wrong chip select pin, or SPI problem?
SD errorCode: 0X1,0XFF
From SdInfo.h, these errors are:
/** timeout error for command CMD0 (initialize card in SPI mode) */
uint8_t const SD_CARD_ERROR_CMD0 = 0X1;
...and perhaps (though realizing this is not 0XFF, but that does not exist):
/** card returned an error token instead of read data */
uint8_t const SD_CARD_ERROR_READ = 0XF;
I've seen on this forum that @whg mentioned SdFat has problems with DMA on SPI1, but that's for Electron...is this also an issue on Photon?
I guess the long and the short of the question is:
How can I load bmp's from a microSD card, attached to SPI1 on a Photon, and display them on the ILI9341 screen. I'm at wits end.
@peekay123 I know you've done some work on the SD libraries...do you have a silver bullet laying around?
Thanks so much guys-
Ps - Forgot to mention, I'm working in DEV