Hi Espressifholics!
I'm trying to use a board like in this link: https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-4.3
It has 2 USB connectors. One of them is connected the ESP32-S3 USB ports directly and I use it for JTAG flashing and debugging. I'm using ESP-IDF with VSCode. Everything works perfectly fine until I try to use LVGL demo https://www.waveshare.com/wiki/ESP32-S3 ... gl_Porting
Right after the LCD panel is configured the USB gets disconnected from my PC and I can no longer use it for flashing or debugging. To flash it again I have to disconnect the USB cable, press and hold the BOOT button and connect the cable back. Or I can use the second USB but that can be used only for flashing - no debugging there.
Anyway, I narrowed down the problem and it looks like the USB connection dies when the I2C0 for touch panel is configured and activated. I tried to find the reason for that but no luck. The GPIOs are not shared. I'm not sure how the IO MUX works but it looks like there is no conflict between I2C0 and USB/JTAG.
Does anyone know what the problem is? Has anyone experienced that and maybe managed to solve it somehow?
Thanks in advance!
Adam
USB JTAG dies when I2C is enabled.
Re: USB JTAG dies when I2C is enabled.
Hi ,
same problem here with Waveshare ESP32-S3-Touch-LCD-7.
Any solution for this ?
Martin
same problem here with Waveshare ESP32-S3-Touch-LCD-7.
Any solution for this ?
Martin
Re: USB JTAG dies when I2C is enabled.
i must change write_buf = 0x2C; to write_buf = 0x0C; and write_buf = 0x2E; to write_buf = 0x0E;
void waveshare_esp32_s3_touch_reset()
{
uint8_t write_buf = 0x01;
i2c_master_write_to_device(I2C_MASTER_NUM, 0x24, &write_buf, 1, I2C_MASTER_TIMEOUT_MS / portTICK_PERIOD_MS);
// Reset the touch screen. It is recommended to reset the touch screen before using it.
write_buf = 0x2C;
i2c_master_write_to_device(I2C_MASTER_NUM, 0x38, &write_buf, 1, I2C_MASTER_TIMEOUT_MS / portTICK_PERIOD_MS);
esp_rom_delay_us(100 * 1000);
gpio_set_level(GPIO_INPUT_IO_4, 0);
esp_rom_delay_us(100 * 1000);
write_buf = 0x2E;
i2c_master_write_to_device(I2C_MASTER_NUM, 0x38, &write_buf, 1, I2C_MASTER_TIMEOUT_MS / portTICK_PERIOD_MS);
esp_rom_delay_us(200 * 1000);
}
void waveshare_esp32_s3_touch_reset()
{
uint8_t write_buf = 0x01;
i2c_master_write_to_device(I2C_MASTER_NUM, 0x24, &write_buf, 1, I2C_MASTER_TIMEOUT_MS / portTICK_PERIOD_MS);
// Reset the touch screen. It is recommended to reset the touch screen before using it.
write_buf = 0x2C;
i2c_master_write_to_device(I2C_MASTER_NUM, 0x38, &write_buf, 1, I2C_MASTER_TIMEOUT_MS / portTICK_PERIOD_MS);
esp_rom_delay_us(100 * 1000);
gpio_set_level(GPIO_INPUT_IO_4, 0);
esp_rom_delay_us(100 * 1000);
write_buf = 0x2E;
i2c_master_write_to_device(I2C_MASTER_NUM, 0x38, &write_buf, 1, I2C_MASTER_TIMEOUT_MS / portTICK_PERIOD_MS);
esp_rom_delay_us(200 * 1000);
}
Who is online
Users browsing this forum: Barkrowler, ChatGPT-User, Google [Bot], meta-externalagent, PerplexityBot and 3 guests