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.
Code: Select all
cardSize = SD.cardSize() / (1024 * 1024);//works
exampleLCD();//works
writeFile(SD, "/hello.txt", "Hello ");//hangs
In writeFile, it hangs on
Code: Select all
File file = fs.open(path, FILE_WRITE);
What can be causing this? Does VSPI need to be reinitialized after the LCD uses it?
Cheers