Hi everyone!
I’m trying to run TFT_eSPI library examples with ESP32-S3 in Arduino framework on PIO. The example code can be seen here: Colour_Wheel
When the library is initialized with tft.init(); the MCU bootloops like given below.
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x42026ee6
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0
Same library and examples work without issues on Arduino IDE. So I’m guessing that there is something set up wrong with my .platformio.ini file. Here is how it looks like.
[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200
monitor_rts = 0
monitor_dtr = 0
build_flags =
-D ARDUINO_USB_CDC_ON_BOOT=1
-D ARDUINO_USB_MSC_ON_BOOT=0
-D ARDUINO_USB_DFU_ON_BOOT=0
lib_deps = bodmer/TFT_eSPI@^2.5.43
If I configure the library like shown in these instructions the platformio.ini looks like this. But result is the same bootloop behavior.
[env:lolin_s3_mini]
platform = espressif32
board = lolin_s3_mini
framework = arduino
monitor_speed = 115200
monitor_rts = 0
monitor_dtr = 0
build_flags =
-D ARDUINO_USB_CDC_ON_BOOT=1
;###############################################################
; TFT_eSPI library setting here (no need to edit library files):
;###############################################################
-D USER_SETUP_LOADED=1 ; Set this settings as valid
-D GC9A01_DRIVER=1 ; Select ILI9163 driver
-D TFT_WIDTH=240 ; Set TFT size
-D TFT_HEIGHT=240
-D TFT_BACKLIGHT_ON=1 ; Set backlight on level
-D TFT_MISO=-1 ; Define SPI pins
-D TFT_MOSI=11
-D TFT_SCLK=12
-D TFT_CS=10
-D TFT_DC=16 ; Data/Comand pin
-D TFT_RST=6 ; Reset pin
-D TFT_BL=17 ; Backlight pin
-D TOUCH_CS=-1 ; Touch chip select pin
-D LOAD_GLCD=1 ; Load Fonts
-D SPI_FREQUENCY=80000000 ; Set SPI frequency
lib_deps = bodmer/TFT_eSPI@^2.5.43
When the library is not initialized I can work with this setups without any issues.
So far I’ve tried 2 different custom boards and a lolin s3 mini devkit but same issue persists. It feels like I’m missing something obvious. Can anyone point me in the some direction?
Thanks!