Closed
Description
Board
ESP32-S3
Device Description
ESP32-S3-WROOM-1-N16R8
Hardware Configuration
TFT & SD card sharing SPI bus (SPI modes 3 and 0)
Version
v2.0.14
IDE Name
PlatformIO
Operating System
n/a
Flash frequency
40MHz
PSRAM enabled
yes
Upload speed
115200
Description
When calling SD.begin()
from one task while drawing to TFT display from another task, visual glitches occur on display due to sdcard_init not instancing AcquireSPI.
sdcard_mount
, on the other hand, does acquire SPI.
Temporary workaround to still use SD card, albeit without high-level interface:
SPI.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE0));
uint8_t pdrv = sdcard_init(SDCARD_CS, &SPI, 4000000);
SPI.endTransaction();
sdcard_mount(pdrv, "/sd", 5, false);
Same behavior is observed with sdcard_uninit
. Suggested fix is to add AcquireSPI lock(card
) into sdcard_mount
and sdcard_uninit
.
Sketch
n/a
Debug Message
n/a
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.