Hi,
I am using T3.2 with a SD card reader and a ILI9341 display. After executing the sketch I am unable to initialize a second time the SD (if powered off).
The code is simple:
I used always Sandisk SD and it works perfectly.
Now I got some Transcend 8GB (class4) SD and this Sketch can be executed only 1 time. If I power off the teensy and power up it again the SD card doesn't init anymore. I have to connect the card to my computer if I want use it again on the teensy.
Workaround:
- If I initialize the SD card before the TFT, it works like expected.
- Don't power off the teensy: if I upload the same sketch again it works.
- Don't use the Transcend 8GB memory.
But I would like initialize the TFT first and power off the module some times
Is this SD-bug with other SPI devices still present?
I am using T3.2 with a SD card reader and a ILI9341 display. After executing the sketch I am unable to initialize a second time the SD (if powered off).
The code is simple:
Code:
#include <ILI9341_t3.h>
#include <SD.h>
#include <SPI.h>
ILI9341_t3 tft = ILI9341_t3(9, 22, 255, 11, 13, 12);
void setup() {
Serial.begin(115200);
while(!Serial);
tft.begin();
tft.setRotation(1);
tft.fillRectVGradient(0, 0, 320, 240, ILI9341_BLACK, ILI9341_NAVY);
delay(200);
Serial.println(SD.begin(10) ? "SD SUCCESS" : "SD FAILED");
}
void loop() {
}
I used always Sandisk SD and it works perfectly.
Now I got some Transcend 8GB (class4) SD and this Sketch can be executed only 1 time. If I power off the teensy and power up it again the SD card doesn't init anymore. I have to connect the card to my computer if I want use it again on the teensy.
Workaround:
- If I initialize the SD card before the TFT, it works like expected.
- Don't power off the teensy: if I upload the same sketch again it works.
- Don't use the Transcend 8GB memory.
But I would like initialize the TFT first and power off the module some times
Is this SD-bug with other SPI devices still present?