Use a SDMMC and TFT (MOD-LCD2.8RTP) in an ESP32-EVB

Started by rubenMP, March 18, 2022, 01:40:46 PM

Previous topic - Next topic

rubenMP

Hi,
Im trying to use at the same time the MOD-LCD2.8RTP using UEXT and an SD card using SDMMC in an ESP32-EVB using Arduino IDE.
I can use a microSD card with the SDMMC examples - but not using the SD library examples.
I can use the MOD-LCD2.8RTP using e.g. Adafruit GFX example provided by Olimex.
The problem is when I try to use both. The SDMMC will work, but the screen not. No error provided.
I understand that they use by default the same pins, I believe 2, 14, 15. I think it could be possible to assign different pins (multiplexor?) so separate the communication, but I have no idea on how to do this (in arduino IDE that Im familiar with).
I would appreciate any help. thank you

LubOlimex

Yes, SD/MMC card uses GPIO2, GPIO14, GPIO15 - these three pins are also available at the UEXT. So if you use the card you can't use those three pins at the UEXT. At the UEXT these pins are usually used for SPI, but due to ESP32's unique multiplexer can be used for other functions.

The only thing you can do is to give up or modify the UEXT cable and use other pins instead of any of the once mentioned. There is no problem to define other pins for the SPI operation required for the display. If the three remaining pins are insufficient you might need to do sacrifice some other extra that uses a GPIO but you don't need (like CAN or InfraRed) and use pins at the EXT header.
Technical support and documentation manager at Olimex

rubenMP

Thank you for your awnser. At the end I managed by stoping and restarting the SDMMC as needed, and keeping the screen normally on. cheers