Xinyuan-LilyGO / TTGO_TWatch_Library

MIT License
890 stars 284 forks source link

T-Watch-2020 V3 TFT_eSPI fails in initDMA() function #126

Open PGNetHun opened 3 years ago

PGNetHun commented 3 years ago

In version 1.4.2 the V3 config file is added, but the MISO pin is set to GPIO_NUM_MAX instead of 0. See: https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library/blob/42f9939e300527b0d42f2b5f8651f3508e3eebcf/src/board/twatch2020_v3.h#L6

That's why I receive in project My-TTGO-Watch an exception in the TFT_eSPI.cpp file:

E (3059) spi: spicommon_bus_initialize_io(207): miso not valid
ESP_ERROR_CHECK failed: esp_err_t 0x102 (ESP_ERR_INVALID_ARG) at 0x40094b40
file: ".pio/libdeps/ttgo-t-watch-v3/TTGO TWatch Library/src/libraries/TFT_eSPI/TFT_eSPI.cpp" line 1121
func: bool TFT_eSPI::initDMA()
expression: ret

ELF file SHA256: 0000000000000000

Backtrace: 0x40094628:0x3ffd2ff0 0x40094b43:0x3ffd3010 0x4010aebf:0x3ffd3030 0x400f56e5:0x3ffd30a0 0x400f50c5:0x3ffd30c0 0x400f61ba:0x3ffd30e0 0x400f9343:0x3ffd3110 0x40159ab6:0x3ffd3140 0x4009516e:0x3ffd3160
  #0  0x40094628:0x3ffd2ff0 in invoke_abort at /home/sharan/temp/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #1  0x40094b43:0x3ffd3010 in _esp_error_check_failed at /home/sharan/temp/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:721
  #2  0x4010aebf:0x3ffd3030 in TFT_eSPI::initDMA() at .pio/libdeps/ttgo-t-watch-v3/TTGO TWatch Library/src/libraries/TFT_eSPI/TFT_eSPI.cpp:8188
  #3  0x400f56e5:0x3ffd30a0 in framebuffer_setup(bool, bool) at src/hardware/framebuffer.cpp:44
  #4  0x400f50c5:0x3ffd30c0 in display_setup() at src/hardware/display.cpp:200
  #5  0x400f61ba:0x3ffd30e0 in hardware_setup() at src/hardware/hardware.cpp:39
  #6  0x400f9343:0x3ffd3110 in setup() at src/my-ttgo-watch.ino:58
  #7  0x40159ab6:0x3ffd3140 in loopTask(void*) at /home/pg/.platformio/packages/framework-arduinoespressif32@src-745eb9bf7c21582e61c010425ed055df/cores/esp32/main.cpp:18
  #8  0x4009516e:0x3ffd3160 in vPortTaskWrapper at /home/sharan/temp/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

One solution would be to fix the MISO pin to 0 in twatch2020_v3.h file: #define TWATCH_TFT_MISO 0

PS: My related comment in other My-TTGO-Watch project: https://github.com/sharandac/My-TTGO-Watch/issues/227#issuecomment-825945094