Skip to content

I can't fully turn off watchdog or prevent it from triggering. #11460

Open
@dinisfc

Description

@dinisfc

Board

ESP32-S3-Touch-LCD-4.3B

Device Description

Waveshare ESP32-S3-Touch-LCD-4.3B with a Sensirion SEN66 sensor connected with I2C

Hardware Configuration

Only the board with display and ESP32 and the SEN66 sensor connected to the I2C pins built-in from the board. Powered by the USB-C connected to the PC. No battery connected.

Version

v3.1.3

IDE Name

Arduino IDE 2.3.6

Operating System

Windows 11

Flash frequency

80 MHz

PSRAM enabled

yes

Upload speed

921600

Description

I'm running the I2C sensor on Core 0 and LVGL on Core 1. Both running on their respective FreeRTOS task. Despite using vTaskDelay on both of them, Core 1 will always trigger the watchdog. These tasks are initiated on the default setup() and on loop() is only the lv_timer_handler(). The lvgl task updates dozens of objects and this seems to be the cause of the timeout, but adding vTaskDelays in between sections of this task doesn't fix it. Core 0, even with much longer times on the vTaskDelay, doesn't ever trigger a timeout.

Sketch

void setup(){
    disableCore0WDT();
    disableCore1WDT();
    esp_log_level_set("*", ESP_LOG_NONE);
    // failed attempt at getting rid of the watchdog

    Serial.begin(115200);
    
    Wire.begin(8,9);
    esp_panel::board::Board *board = new esp_panel::board::Board();

    vTaskDelay(1000 / portTICK_PERIOD_MS);

    < display and lvgl init>

    vTaskDelay(1000 / portTICK_PERIOD_MS);
    xTaskCreatePinnedToCore(dataOps, "dataOperations", 32768, NULL, 1, &dataOperationsHandle, 0); //sensor task
    vTaskDelay(1000 / portTICK_PERIOD_MS);
    xTaskCreatePinnedToCore(lvglUi, "lvglUpdate", 32768, NULL, 1, &lvglUpdateHandle, 1); 
    vTaskDelay(10000 / portTICK_PERIOD_MS); //lvgl task

}

void dataOps(void* pvParameters){

  < init sensor >
  vTaskDelay(1000 / portTICK_PERIOD_MS); //Start up time

  while(1){
    < read from sensor >
    vTaskDelay(20 * 1000 / portTICK_PERIOD_MS);
  }
}

void lvglUi(void* pvParameters){
  < start lvgl objects >
  
  vTaskDelay(1000 / portTICK_PERIOD_MS); 

  while(1){
    
  
    lvgl_port_lock(-1); 
    < update lvgl objects >
    lvgl_port_unlock();

    vTaskDelay(10000/portTICK_PERIOD_MS);
  }
}

void loop(){
  lvgl_port_lock(-1);
  lv_timer_handler();
  lvgl_port_unlock();
  vTaskDelay(10/portTICK_PERIOD_MS);
}

Debug Message

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x8 (TG1WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403792fc
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2820,len:0x1188
load:0x403c8700,len:0x4
load:0x403c8704,len:0xbf0
load:0x403cb700,len:0x30e4
entry 0x403c88ac
[I][Panel][esp_panel_board.cpp:0066](init): Initializing board (Waveshare:ESP32-S3-Touch-LCD-4.3-B)
[I][Panel][esp_panel_board.cpp:0235](init): Board initialize success
[I][Panel][esp_panel_board.cpp:0253](begin): Beginning board (Waveshare:ESP32-S3-Touch-LCD-4.3-B)
[I][Expander][esp_io_expander_ch422g.c:0075](esp_io_expander_new_i2c_ch422g): version: 0.1.0
[I][Panel][esp_lcd_touch_gt911.c:0067](esp_lcd_touch_new_i2c_gt911): version: 1.1.1
[W][Panel][esp_lcd_touch_gt911.c:0144](esp_lcd_touch_new_i2c_gt911): Unable to initialize the I2C address
[I][Panel][esp_lcd_touch_gt911.c:0401](touch_gt911_read_cfg): TouchPad_ID:0x39,0x31,0x31
[I][Panel][esp_lcd_touch_gt911.c:0402](touch_gt911_read_cfg): TouchPad_Config_Version:67
[I][Panel][esp_panel_board.cpp:0463](begin): Board begin success
[I][LvPort][lvgl_v8_port.cpp:0761](lvgl_port_init): Initializing LVGL display driver

Other Steps to Reproduce

I've had this problem with another board before, using the same ESP32-S3, when trying to use both cores. Any attempt at turning off the watchdog failed on that board too. That board is ESP32-S3-Touch-LCD-4, also by Waveshare.

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions