I know there are several discussions about esp32 + display + touch + sdcard. But they are filled with different tips and solutions and there doesn’t seem to be a nice and clean solution.
And imho one possible solution isn’t mentioned at all: The ili and xp2046 already share the same spi in the default esp32 lvgl µP setup. Display and touch run nicely on the same spi in my test setup. The sd card also works on the same bus as long is I don’t try to initialize the display or the touch first. So physically everything should be fine.
My question: Does it make sense to write an sd card driver that uses the same spi techniques the current ili and touch drivers use?
Imho the “lvgl µP drivers to use” are the driver/esp32/ili9XXX.py and driver/esp32/xpt2046.py and i think these are the ones i am using. Both use a similar (pretty complex) way of accessing the SPI.
Would it make sense if I write a similar driver for the sdcard? One problem i see is the fact that the sd card driver want’s to write a few hundred ff bytes to the sd card before cs is asserted. This imho somewhat contradicts the fact that cs is totally controlled by the SPI/DMA logic in ili9XXX.py and xp2046.py
So does this make sense? Any reason not to do this? Has anyone done this already?