SD Card Hangs With Shared SPI Pins
Posted: Thu Sep 13, 2018 9:29 am
I want to connect a SD card on VSPI and also connect a LCD on the same pin for MISO, MOSI, SCK. The 2 CS pins are connected on different ESP pins so that I can control which device the SPI is talking to.
The SD card example included with the ESP32 core hangs after LCD commands.
In writeFile, it hangs on
What can be causing this? Does VSPI need to be reinitialized after the LCD uses it?
Cheers
The SD card example included with the ESP32 core hangs after LCD commands.
Code: Select all
cardSize = SD.cardSize() / (1024 * 1024);//works
exampleLCD();//works
writeFile(SD, "/hello.txt", "Hello ");//hangs
Code: Select all
File file = fs.open(path, FILE_WRITE);
Cheers