ESP32-C3 GPIO19 as general output pin draws high current

lubo.p
Posts: 1
Joined: Tue Jan 23, 2024 7:36 am

ESP32-C3 GPIO19 as general output pin draws high current

Postby lubo.p » Tue Jan 23, 2024 9:51 am

Hello,

we have a problem with current consumption in LIGHT SLEEP MODE and using GPIO19.

We need to decrease current consumption as much as possible in LIGHT sleep mode, while GPIO19 is in log level of 0.
NOTHING IS CONNECTED to GPIO19 while measuring the current consumption of esp32.

1) with following configuration it gives 1,5 mA - which is too high for our application:

esp_rom_gpio_pad_select_gpio(GPIO19);
gpio_set_direction(GPIO19, GPIO_MODE_OUTPUT);
gpio_set_pull_mode(GPIO19, GPIO_FLOATING);
gpio_set_drive_capability(GPIO19, GPIO_DRIVE_CAP_3);
gpio_set_level(GPIO19, 0); // Set output to 0
gpio_pullup_dis(GPIO19); // This should disable USB-DP pullup as well.
gpio_sleep_sel_dis(GPIO19); // Preserve configuration in sleep mode


2) with this configuration it gives 250 uA but problem is that log level of GPIO19 is 1 (we need 0):

esp_rom_gpio_pad_select_gpio(GPIO19);
gpio_set_direction(GPIO19, GPIO_MODE_OUTPUT);
gpio_set_pull_mode(GPIO19, GPIO_FLOATING);
gpio_set_drive_capability(GPIO19, GPIO_DRIVE_CAP_3);
gpio_set_level(GPIO19, 0); // Set output to 0
gpio_pullup_dis(GPIO19);
/* gpio_sleep_sel_dis(GPIO19); */
gpio_sleep_set_direction(GPIO19, GPIO_MODE_INPUT);
gpio_sleep_set_pull_mode(GPIO19, GPIO_FLOATING);


As I understood well, GPIO19 is connected to USB-DP which has its own pull-up. This pull up should be disabled by call of function: gpio_pullup_dis(GPIO19).
So I have no clue why setting the GPIO19 pin to log 0 draws that high current (1,5 mA).
Fuses for USB and JTAG are programmed.
We haven't observed a problem like this on other pins.

Version of esp-idf: 5.1.1
Module: ESP32-c3

Any ideas?
Thank You.

Who is online

Users browsing this forum: No registered users and 83 guests