Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No output on the Cheap Yellow Display #3493

Open
efsane14010 opened this issue Sep 28, 2024 · 2 comments
Open

No output on the Cheap Yellow Display #3493

efsane14010 opened this issue Sep 28, 2024 · 2 comments

Comments

@efsane14010
Copy link

Only raise issues for problems with the library and/or provided examples. Post questions, comments and useful tips etc in the "Discussions" section.

To minimise effort to resolve issues the following should be provided as a minimum:

  1. İ upload the code and it just doesnt work
  2. Arduino ide
  3. Latest version
  4. Board package version (e.g. 2.0.3) available from the Boards Manager... menu(idk)
  5. Esp32 Cheap Yellow Display. Im using the Esp32 Devkit
  6. TFT driver (e.g. ILI9341), a link to the vendors product web page is useful too. (idk)

Plus further information as appropriate to the problem:

  1. No need to screen shot since it just doesnt put any output also no errors

I used this code: (Im just trying to learn how to actually use this screen and not use the webflashers)
https://github.com/Bodmer/TFT_eSPI/blob/master/examples/320%20x%20240/TFT_Clock/TFT_Clock.ino

@elgerg
Copy link

elgerg commented Sep 28, 2024

Is the device crashing/rebooting?

Could this be related?
#3329

@florinbaciuu
Copy link

Can u provide us your UserSetup.h file?

I have an Cyd 2432S028R and i tested link and I don't find any problem with the library.
WhatsApp Image 2024-10-01 at 10 38 10

I will leave you my UserSetup.h here , maybe you can figure out what the problem would be.

// #define ILI9341_DRIVER       // Generic driver for common displays
#define ILI9341_2_DRIVER // Alternative ILI9341 driver, see https://github.com/Bodmer/TFT_eSPI/issues/1172
// #define ILI9342_DRIVER

// #define TFT_SDA_READ      // This option is for ESP32 ONLY, tested with ST7789 and GC9A01 display only

//  #define TFT_RGB_ORDER TFT_RGB  // Colour order Red-Green-Blue
//  #define TFT_RGB_ORDER TFT_BGR  // Colour order Blue-Green-Red

#define TFT_WIDTH 320
#define TFT_HEIGHT 240

// #define TFT_INVERSION_ON
// #define TFT_INVERSION_OFF

#define TFT_BL 21             // LED back-light control pin
#define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW)

#define TFT_MOSI 13 // In some display driver board, it might be written as "SDA" and so on.
#define TFT_MISO 12
#define TFT_SCLK 14
#define TFT_CS 15  // Chip select control pin
#define TFT_DC 2   // Data Command control pin
#define TFT_RST -1 // Reset pin (could connect to Arduino RESET pin)
#define TFT_BL 21  // LED back-light

// #define TOUCH_CS 33     // Chip select pin (T_CS) of touch screen

#define LOAD_GLCD  // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
#define SMOOTH_FONT

#define SPI_FREQUENCY 55000000
//#define SPI_FREQUENCY 40000000
// #define SPI_FREQUENCY  65000000
//#define SPI_FREQUENCY  80000000
#define SPI_READ_FREQUENCY 20000000
#define SPI_TOUCH_FREQUENCY 2500000
#define USE_HSPI_PORT
#define SUPPORT_TRANSACTIONS

I will also attach platformio.ini

; PlatformIO Project Configuration File for Sunton_2432S028_ESP32
;===========================================================================;
;! Don't change
[platformio]
workspace_dir = ./
core_dir = ${PROJECT_DIR}/core
platforms_dir = ${platformio.core_dir}/platforms
packages_dir = ${platformio.core_dir}/pkg
##-------------------------
src_dir = ${PROJECT_DIR}/src
libdeps_dir = ${PROJECT_DIR}/libdeps
lib_dir = ${PROJECT_DIR}/lib
data_dir = ${PROJECT_DIR}/data
include_dir = ${PROJECT_DIR}/include
boards_dir = ${PROJECT_DIR}/board
build_dir = ${PROJECT_DIR}/build
build_cache_dir = ${platformio.build_dir}/build_cache
test_dir = ${PROJECT_DIR}/test
monitor_dir = ${PROJECT_DIR}/monitor
default_envs = sunton
;===========================================================================;
[env]
lib_ldf_mode = deep ;options : off, chain, deep, chain+, deep+
lib_archive = yes
lib_compat_mode = off
lib_extra_dirs =
    libraries
    components
;===========================================================================;
##      OPTIONS:  test - debug - release  ##
[BUILDx]
build_type = debug
;;build_type = release
;===========================================================================;
;### ESP32-2432S024
[env:sunton]
extends = env
build_type = ${BUILDx.build_type}

## pioarduino (p)eople (i)nitiated (o)ptimized (arduino) ##
#platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.03/platform-espressif32.zip
#platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.05/platform-espressif32.zip
platform_packages =

framework = arduino
board = esp32-2432S028R
board_build.mcu = esp32
board_build.f_cpu = 240000000L ;change MCU frequency
board_build.boot = dio         ;options: qio , dio
board_build.boot_freq= 80000000L
board_build.flash_mode = dio
board_build.f_flash = 80000000L
;board_build.arduino.memory_type = qio_opi
board_build.partitions = partition.csv
board_build.filesystem = littlefs ;options: ffat , spiffs, littlefs
;===========================================================================;
board_build.variants_dir = ${PROJECT_DIR}/variant
board_build.variant = esp32_2432s028r
;===========================================================================;
upload_speed = 460800
upload_protocol = esptool
monitor_speed = 115200
monitor_filters =
    colorize
    esp32_exception_decoder
    time
;===========================================================================;
; Custom linker script
;board_build.ldscript = /path/to/ldscript.ld
;===========================================================================;
build_flags =
    -DESP32
    -DARDUINO_ARCH_ESP32
    -DARDUINO_ESP32_DEV
    -DESP_PLATFORM
    -DCONFIG_IDF_TARGET_ESP32
    -DESP32_2432S028R
    -DARDUINO_RUNNING_CORE=1
    -DARDUINO_EVENT_RUNNING_CORE=1
    -w
    -fexceptions
    -Wno-dev
    -Wno-error
    -MMD
    -c
    -fpermissive
    -DBOARD_NAME="${this.board}"
     # LVGL settings
    -D LV_CONF_PATH="${PROJECT_DIR}/lib/lv_conf.h"
    -DconfigTASKLIST_INCLUDE_COREID=1
    -DCORE_DEBUG_LEVEL=5
	-DLOG_LOCAL_LEVEL=5
	-DARDUHAL_LOG_LEVEL=5
	-DCONFIG_LOG_COLORS=1
	-DCONFIG_ARDUHAL_LOG_COLORS=1
        
extra_scripts =
		post:extra_script.py

;===========================================================================;
;===========================================================================;
;===========================================================================;

and the file that define the board. you can put this file in board folder and set the board directory from platformio
esp32_2432S028R.json :

{
  "build": {
    "arduino": {
      "ldscript": "esp32_out.ld"
    },
    "core": "esp32",
    "extra_flags": [
      "'-D ARDUINO_ESP32_DEV'",
      "'-D ESP32_2432S028R'",
      "'-D DISPLAY_WIDTH=240'",
      "'-D DISPLAY_HEIGHT=320'",
      "'-D LVGL_BUFFER_PIXELS=(DISPLAY_WIDTH*DISPLAY_HEIGHT/4)'",
      "'-D LVGL_BUFFER_MALLOC_FLAGS=(MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT)'",
      "'-D GPIO_BCKL=21'",
      "'-D DISPLAY_ILI9341_SPI'",
      "'-D ILI9341_SPI_HOST=SPI2_HOST'",
      "'-D ILI9341_SPI_DMA_CHANNEL=SPI_DMA_CH_AUTO'",
      "'-D ILI9341_SPI_BUS_MOSI_IO_NUM=13'",
      "'-D ILI9341_SPI_BUS_MISO_IO_NUM=12'",
      "'-D ILI9341_SPI_BUS_SCLK_IO_NUM=14'",
      "'-D ILI9341_SPI_BUS_QUADWP_IO_NUM=GPIO_NUM_NC'",
      "'-D ILI9341_SPI_BUS_QUADHD_IO_NUM=GPIO_NUM_NC'",
      "'-D ILI9341_SPI_BUS_MAX_TRANSFER_SZ=(LVGL_BUFFER_PIXELS*sizeof(lv_color16_t))'",
      "'-D ILI9341_SPI_BUS_FLAGS=0'",
      "'-D ILI9341_SPI_BUS_INTR_FLAGS=0'",
      "'-D ILI9341_SPI_CONFIG_CS_GPIO_NUM=15'",
      "'-D ILI9341_SPI_CONFIG_DC_GPIO_NUM=2'",
      "'-D ILI9341_SPI_CONFIG_SPI_MODE=SPI_MODE0'",
      "'-D ILI9341_SPI_CONFIG_PCLK_HZ=24000000'",
      "'-D ILI9341_SPI_CONFIG_TRANS_QUEUE_DEPTH=10'",
      "'-D ILI9341_SPI_CONFIG_LCD_CMD_BITS=8'",
      "'-D ILI9341_SPI_CONFIG_LCD_PARAM_BITS=8'",
      "'-D ILI9341_SPI_CONFIG_FLAGS_DC_AS_CMD_PHASE=false'",
      "'-D ILI9341_SPI_CONFIG_FLAGS_DC_LOW_ON_DATA=false'",
      "'-D ILI9341_SPI_CONFIG_FLAGS_OCTAL_MODE=false'",
      "'-D ILI9341_SPI_CONFIG_FLAGS_LSB_FIRST=false'",
      "'-D ILI9341_DEV_CONFIG_RESET_GPIO_NUM=GPIO_NUM_NC'",
      "'-D ILI9341_DEV_CONFIG_COLOR_SPACE=ESP_LCD_COLOR_SPACE_BGR'",
      "'-D ILI9341_DEV_CONFIG_BITS_PER_PIXEL=16'",
      "'-D ILI9341_DEV_CONFIG_FLAGS_RESET_ACTIVE_HIGH=false'",
      "'-D ILI9341_DEV_CONFIG_VENDOR_CONFIG=NULL'",
      "'-D DISPLAY_SWAP_XY=false'",
      "'-D DISPLAY_MIRROR_X=true'",
      "'-D DISPLAY_MIRROR_Y=false'",
      "'-D BOARD_HAS_TOUCH'",
      "'-D CONFIG_ESP_LCD_TOUCH_MAX_POINTS=1'",
      "'-D CONFIG_ESP_LCD_TOUCH_MAX_BUTTONS=0'",
      "'-D TOUCH_XPT2046_SPI'",
      "'-D XPT2046_Z_THRESHOLD=600'",
      "'-D XPT2046_SPI_HOST=SPI1_HOST'",
      "'-D XPT2046_SPI_DMA_CHANNEL=SPI_DMA_CH_AUTO'",      
      "'-D XPT2046_SPI_BUS_MOSI_IO_NUM=32'",
      "'-D XPT2046_SPI_BUS_MISO_IO_NUM=39'",
      "'-D XPT2046_SPI_BUS_SCLK_IO_NUM=25'",
      "'-D XPT2046_SPI_BUS_QUADWP_IO_NUM=GPIO_NUM_NC'",
      "'-D XPT2046_SPI_BUS_QUADHD_IO_NUM=GPIO_NUM_NC'",
      "'-D XPT2046_SPI_CONFIG_CS_GPIO_NUM=33'",
      "'-D XPT2046_SPI_CONFIG_DC_GPIO_NUM=GPIO_NUM_NC'",
      "'-D XPT2046_SPI_CONFIG_SPI_MODE=SPI_MODE0'",
      "'-D XPT2046_SPI_CONFIG_PCLK_HZ=2000000'",
      "'-D XPT2046_SPI_CONFIG_TRANS_QUEUE_DEPTH=3'",
      "'-D XPT2046_SPI_CONFIG_LCD_CMD_BITS=8'",
      "'-D XPT2046_SPI_CONFIG_LCD_PARAM_BITS=8'",
      "'-D XPT2046_SPI_CONFIG_FLAGS_DC_AS_CMD_PHASE=false'",
      "'-D XPT2046_SPI_CONFIG_FLAGS_DC_LOW_ON_DATA=false'",
      "'-D XPT2046_SPI_CONFIG_FLAGS_OCTAL_MODE=false'",
      "'-D XPT2046_SPI_CONFIG_FLAGS_LSB_FIRST=false'",
      "'-D XPT2046_TOUCH_CONFIG_X_MAX=DISPLAY_WIDTH'",
      "'-D XPT2046_TOUCH_CONFIG_Y_MAX=DISPLAY_HEIGHT'",
      "'-D XPT2046_TOUCH_CONFIG_RST_GPIO_NUM=GPIO_NUM_NC'",
      "'-D XPT2046_TOUCH_CONFIG_INT_GPIO_NUM=36'",
      "'-D XPT2046_TOUCH_CONFIG_LEVELS_RESET=0'",
      "'-D XPT2046_TOUCH_CONFIG_LEVELS_INTERRUPT=0'",
      "'-D TOUCH_SWAP_XY=false'",
      "'-D TOUCH_MIRROR_X=true'",
      "'-D TOUCH_MIRROR_Y=false'",
      "'-D BOARD_HAS_TF'",
      "'-D TF_SPI_HOST=SPI3_HOST'",
      "'-D TF_CS=5'",
      "'-D TF_SPI_MOSI=23'",
      "'-D TF_SPI_SCLK=18'",
      "'-D TF_SPI_MISO=19'",
      "'-D BOARD_HAS_RGB_LED'",
      "'-D RGB_LED_R=4'",
      "'-D RGB_LED_G=16'",
      "'-D RGB_LED_B=17'",
      "'-D BOARD_HAS_CDS'",
      "'-D CDS=34'",
      "'-D BOARD_HAS_SPEAK'",
      "'-D SPEAK=26'"
    ],
    "f_cpu": "240000000L",
    "f_flash": "40000000L",
    "flash_mode": "dio",
    "mcu": "esp32",
    "variant": "esp32"
  },
  "connectivity": [
    "wifi",
    "bluetooth",
    "ethernet",
    "can"
  ],
  "debug": {
    "openocd_board": "esp-wroom-32.cfg"
  },
  "frameworks": [
    "arduino",
    "espidf"
  ],
  "name": "esp32-2432S028R",
  "upload": {
    "flash_size": "4MB",
    "maximum_ram_size": 327680,
    "maximum_size": 4194304,
    "require_upload_port": true,
    "speed": 460800
  },
  "url": "https://www.aliexpress.com/item/1005004502250619.html",
  "vendor": "Sunton"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants