MicroPython_ESP32_psRAM_LoBo
MicroPython_ESP32_psRAM_LoBo copied to clipboard
TFT display doesn't work if SPI is already initialised
If I initalise an SPI device:
spi = machine.SPI(spihost=1, miso=19, mosi=18, sck=5, cs=4, phase=1)
And then initialise a TFT display:
tft.init(tft.ILI9341, spihost=1, width=240, height=320, miso=19, mosi=18, clk=5, cs=15, dc=33, bgr=True, hastouch=tft.TOUCH_STMPE, tcs=32)
The TFT says it's initialised but the display doesn't respond and my oscilloscope shows no signal being sent out over the SPI when TFT commands are used. The first device no longer responds and the scope shows the clock signal is not being sent.
How to use SPI and TFT on the same SPI bus?