-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
I am using a screen with an ST7796S controller, resolution 480 * 320 and the SPI interface. I am coding within the Arduino IDE version 2.3.6.
I have been using the library successfully on processor ESP-WROOM-32. Everything (touch/sd/display) works as expected (thankyou) - so far, so good. However the WROOM-32 does not have any PSRAM and that makes dealing with sprites in particular very difficult.
For the above reason I changed the processor to ESP32S3-DevkitC-1 which has 8M of PSRAM. I am using the default hardware SPI pins on this device which are as follows:
MOSI - 11
MISO - 13
SCK - 12
CS pins as follows:
display - 42
sdcard - 39
touch - 38
display DC connected to 42
display RST connected to 40
However, this does not work as expected. The screen functions correctly and sprites are now working. However, the sdcard fails to initialise and cannot be accessed. The touch controller does not work. In order to attempt a diagnosis of this problem I firstly connected an external sdcard module to the same pins. This did not work, I returned to the sdcard on the screen itself. I have tried different cs pins with no success.
Using the SD_test example code, I find that the sdcard functions correctly without issues when using
SD.begin(39)
however using
SD.begin(39, tft.getSPIinstance())
does not. In the latter case the screen functions normally.
Having set the Core Debug Level to "error" in the Arduino IDE ESP32 configuration I receive the following in the output after reboot of ESP32:
Im[ 1416][E][sd_diskio.cpp:809] sdcard_mount(): f_mount failed: (3) The physical drive cannot work [ 1925][E][sd_diskio.cpp:128] sdSelectCard(): Select Failed Card Mount Failed
It's possible that there is something I have / have not done which is causing this failure but I cannot resolve it. I have included a copy of the most basic code possible to illustrate this issue - see lines 76-77.
Thank you!