Revert "Reduce SPI clock and add panel stabilization delays"
This reverts commit 2205e56c32.
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -2,6 +2,4 @@
|
||||
/managed_components
|
||||
.vscode/settings.json
|
||||
/ref_demo
|
||||
/.cache
|
||||
/05_LVGL_WITH_RAM/build
|
||||
/05_LVGL_WITH_RAM/managed_components
|
||||
/.cache
|
||||
@@ -2,7 +2,7 @@ dependencies:
|
||||
esp_lcd_sh8601:
|
||||
dependencies: []
|
||||
source:
|
||||
path: /Users/neil/Coding/iroBot/05_LVGL_WITH_RAM/components/esp_lcd_sh8601
|
||||
path: C:\Users\neila\Downloads\ESP32-S3-Touch-AMOLED-1.8-Demo\ESP-IDF-v5.3.2\05_LVGL_WITH_RAM\components\esp_lcd_sh8601
|
||||
type: local
|
||||
version: 1.0.0
|
||||
espressif/cmake_utilities:
|
||||
@@ -16,7 +16,7 @@ dependencies:
|
||||
type: service
|
||||
version: 0.5.3
|
||||
espressif/esp_io_expander:
|
||||
component_hash: 034903704f65e3994d7cce9d080b19d89525cf6d416574b932826adf680f3942
|
||||
component_hash: abf3ea0d71407d79d15500550aa3ba433848459b0fa94717cf9478822593ee5d
|
||||
dependencies:
|
||||
- name: idf
|
||||
require: private
|
||||
@@ -24,7 +24,7 @@ dependencies:
|
||||
source:
|
||||
registry_url: https://components.espressif.com
|
||||
type: service
|
||||
version: 1.2.0
|
||||
version: 1.1.0
|
||||
espressif/esp_io_expander_tca9554:
|
||||
component_hash: e9e49ddb1038c2b54b13c51b5e3e6dbdd10a878959c8ab0e0a7c8206316add61
|
||||
dependencies:
|
||||
@@ -42,13 +42,13 @@ dependencies:
|
||||
espressif/esp_lcd_touch:
|
||||
dependencies: []
|
||||
source:
|
||||
path: /Users/neil/Coding/iroBot/05_LVGL_WITH_RAM/components/espressif__esp_lcd_touch
|
||||
path: C:\Users\neila\Downloads\ESP32-S3-Touch-AMOLED-1.8-Demo\ESP-IDF-v5.3.2\05_LVGL_WITH_RAM\components\espressif__esp_lcd_touch
|
||||
type: local
|
||||
version: 1.1.1
|
||||
espressif/esp_lcd_touch_ft5x06:
|
||||
dependencies: []
|
||||
source:
|
||||
path: /Users/neil/Coding/iroBot/05_LVGL_WITH_RAM/components/espressif__esp_lcd_touch_ft5x06
|
||||
path: C:\Users\neila\Downloads\ESP32-S3-Touch-AMOLED-1.8-Demo\ESP-IDF-v5.3.2\05_LVGL_WITH_RAM\components\espressif__esp_lcd_touch_ft5x06
|
||||
type: local
|
||||
version: 1.0.6
|
||||
idf:
|
||||
|
||||
@@ -2274,12 +2274,6 @@ CONFIG_ESP_LCD_TOUCH_MAX_POINTS=5
|
||||
CONFIG_ESP_LCD_TOUCH_MAX_BUTTONS=1
|
||||
# end of ESP LCD TOUCH
|
||||
|
||||
#
|
||||
# ESP IO Expander
|
||||
#
|
||||
# CONFIG_IO_EXPANDER_ENABLE_GPIO_API_WRAPPER is not set
|
||||
# end of ESP IO Expander
|
||||
|
||||
#
|
||||
# LVGL configuration
|
||||
#
|
||||
|
||||
@@ -2,7 +2,7 @@ dependencies:
|
||||
esp_lcd_sh8601:
|
||||
dependencies: []
|
||||
source:
|
||||
path: /Users/neil/Coding/iroBot/components/esp_lcd_sh8601
|
||||
path: C:\Users\neila\Coding\iroBotAMOLED\components\esp_lcd_sh8601
|
||||
type: local
|
||||
version: 1.0.0
|
||||
espressif/esp_io_expander:
|
||||
|
||||
17
main/main.c
17
main/main.c
@@ -80,7 +80,7 @@ static const char *TAG = "LVGL_AMOLED";
|
||||
#define PIN_NUM_TOUCH_RST (-1)
|
||||
#define PIN_NUM_TOUCH_INT (GPIO_NUM_21)
|
||||
|
||||
#define ENABLE_BACKLIGHT 0
|
||||
#define USE_TOUCH 1
|
||||
|
||||
/* IO Expander Pins */
|
||||
#define IO_EXPANDER_PIN_NUM_0 (1 << 0)
|
||||
@@ -485,9 +485,8 @@ void app_main(void) {
|
||||
|
||||
esp_lcd_panel_io_spi_config_t io_config = SH8601_PANEL_IO_QSPI_CONFIG(
|
||||
PIN_NUM_LCD_CS, notify_lvgl_flush_ready, &disp_drv);
|
||||
// Reduce SPI clock to 5MHz to lower power consumption and avoid brownout
|
||||
io_config.pclk_hz =
|
||||
5 * 1000 * 1000; /* 5MHz for stability */
|
||||
40 * 1000 * 1000; /* Reduced to 40MHz for stability (matching demo) */
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_spi((esp_lcd_spi_bus_handle_t)LCD_HOST,
|
||||
&io_config, &lcd_io));
|
||||
@@ -508,23 +507,11 @@ void app_main(void) {
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_sh8601(lcd_io, &panel_config, &lcd_panel));
|
||||
ESP_LOGI(TAG, "Resetting panel");
|
||||
ESP_ERROR_CHECK(esp_lcd_panel_reset(lcd_panel));
|
||||
// Small delay to allow the panel to stabilize after reset
|
||||
vTaskDelay(pdMS_TO_TICKS(100));
|
||||
ESP_LOGI(TAG, "Initializing panel");
|
||||
ESP_ERROR_CHECK(esp_lcd_panel_init(lcd_panel));
|
||||
// Additional delay before turning the panel on
|
||||
vTaskDelay(pdMS_TO_TICKS(200));
|
||||
ESP_LOGI(TAG, "Turning panel ON");
|
||||
ESP_ERROR_CHECK(esp_lcd_panel_disp_on_off(lcd_panel, true));
|
||||
ESP_LOGI(TAG, "Panel init complete");
|
||||
#if ENABLE_BACKLIGHT
|
||||
// Turn off backlight initially via IO expander to reduce power draw
|
||||
esp_io_expander_set_level(io_expander, IO_EXPANDER_PIN_NUM_2, 0);
|
||||
// Short delay to ensure panel is stable
|
||||
vTaskDelay(pdMS_TO_TICKS(100));
|
||||
// Enable backlight after panel is on
|
||||
esp_io_expander_set_level(io_expander, IO_EXPANDER_PIN_NUM_2, 1);
|
||||
#endif
|
||||
|
||||
/* Touch Driver Setup (FT5x06) */
|
||||
#if USE_TOUCH
|
||||
|
||||
Reference in New Issue
Block a user