Using GPIO43 and GPIO44 on ESP32-S3

FrankJensen
Posts: 35
Joined: Sun Mar 10, 2024 9:34 pm

Using GPIO43 and GPIO44 on ESP32-S3

Postby FrankJensen » Sat Mar 23, 2024 11:50 pm

Hi there.

I am facing a problem. GPIO43 and GPIO44 is normally used for UART0. But I would like to use these pins to communicate using UART1. But it seems, that is difficult. The output is just high, and there is no data. The code is running, cause if I select a different pin for TxD, there is data. But on GPIO43 and GPIO44 there is nothing.

I have tried to

Code: Select all

uart_driver_delete(UART_NUM_0);
gpio_reset_pin(GPIO_NUM_43);
gpio_reset_pin(GPIO_NUM_44);
but that changes nothing. What am I missing? As soon as I free the pins, they are free to use as I understand it, also for UART1?

FrankJensen
Posts: 35
Joined: Sun Mar 10, 2024 9:34 pm

Re: Using GPIO43 and GPIO44 on ESP32-S3

Postby FrankJensen » Sun Mar 24, 2024 12:21 am

This simple code only have output on GPIO41+42.

Code: Select all

uart_driver_delete(UART_NUM_0);
gpio_reset_pin(GPIO_NUM_43);
gpio_reset_pin(GPIO_NUM_44);

gpio_config_t io_conf;
io_conf.intr_type = GPIO_INTR_DISABLE;
io_conf.mode = GPIO_MODE_OUTPUT;
io_conf.pin_bit_mask = (1ULL<<GPIO_NUM_41) | (1ULL<<GPIO_NUM_42) | (1ULL<<GPIO_NUM_43) | (1ULL<<GPIO_NUM_44);
io_conf.pull_down_en = GPIO_PULLDOWN_DISABLE;
io_conf.pull_up_en = GPIO_PULLUP_DISABLE;
gpio_config(&io_conf);

for(;;) {
	gpio_set_level(GPIO_NUM_41, 1);
	gpio_set_level(GPIO_NUM_42, 1);
	gpio_set_level(GPIO_NUM_43, 1);
	gpio_set_level(GPIO_NUM_44, 1);
	vTaskDelay(10/portTICK_PERIOD_MS);
	gpio_set_level(GPIO_NUM_41, 0);
	gpio_set_level(GPIO_NUM_42, 0);
	gpio_set_level(GPIO_NUM_43, 0);
	gpio_set_level(GPIO_NUM_44, 0);
	vTaskDelay(10/portTICK_PERIOD_MS);
}

username
Posts: 479
Joined: Thu May 03, 2018 1:18 pm

Re: Using GPIO43 and GPIO44 on ESP32-S3

Postby username » Sun Mar 24, 2024 4:04 am

Did you go into menuconfig and change it ?

FrankJensen
Posts: 35
Joined: Sun Mar 10, 2024 9:34 pm

Re: Using GPIO43 and GPIO44 on ESP32-S3

Postby FrankJensen » Sun Mar 24, 2024 8:02 am

I tried. But there only seem to be options to set the LOG level. If I change this, I have no logging via USB port, and the UART0 do not seem to release the pins. Have I missed something in the menuconfig? And should my code not overrule menuconfig anyway?

User avatar
ok-home
Posts: 48
Joined: Sun May 02, 2021 7:23 pm
Location: Russia Novosibirsk
Contact:

Re: Using GPIO43 and GPIO44 on ESP32-S3

Postby ok-home » Sun Mar 24, 2024 9:33 am

Hi
if you are using esp32s3 devkit then gpio43 and gpio44 are connected to usb-uart converter
accordingly you will conflict with RXD/TXD signals of usb-uart converter
https://dl.espressif.com/dl/schematics/ ... 221130.pdf.

FrankJensen
Posts: 35
Joined: Sun Mar 10, 2024 9:34 pm

Re: Using GPIO43 and GPIO44 on ESP32-S3

Postby FrankJensen » Sun Mar 24, 2024 10:00 am

No, its my own hardware. I want to use it to drive a RS485 chip. I have used same program to drive this RS485, but that hardware used different GPIOs. And I did not expect this to be a problem, since the documentation states, that these pins can be used as GPIOs. I just can not seem to remove the UART0 clamping this port.... Unless there are some other restrictions on GPIO43/44, that is not clearly stated......

I have also tried this, but it seems to do nothing...

Code: Select all

esp_rom_gpio_pad_select_gpio(GPIO_NUM_43);
esp_rom_gpio_pad_select_gpio(GPIO_NUM_44);

User avatar
ok-home
Posts: 48
Joined: Sun May 02, 2021 7:23 pm
Location: Russia Novosibirsk
Contact:

Re: Using GPIO43 and GPIO44 on ESP32-S3

Postby ok-home » Sun Mar 24, 2024 12:28 pm

menuconfig

Code: Select all

CONFIG_ESP_CONSOLE_NONE=y
or

Code: Select all

CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y

Code: Select all

    gpio_reset_pin(43);
    gpio_reset_pin(42);
    gpio_set_direction(43,GPIO_MODE_OUTPUT);
    gpio_set_direction(42,GPIO_MODE_OUTPUT);
    while(1)
    {
        gpio_set_level(43,1);
        gpio_set_level(42,1);
        gpio_set_level(43,0);
        gpio_set_level(42,0);
        gpio_set_level(43,1);
        gpio_set_level(42,1);
        gpio_set_level(43,0);
        gpio_set_level(42,0);
        vTaskDelay(1);
    }
Attachments
4243.JPG
gpio42 gpio43
4243.JPG (23.46 KiB) Viewed 703 times

FrankJensen
Posts: 35
Joined: Sun Mar 10, 2024 9:34 pm

Re: Using GPIO43 and GPIO44 on ESP32-S3

Postby FrankJensen » Sun Mar 24, 2024 7:58 pm

Thank you, ok-home :-)

I have been staring at the menuconfig, and now I just found the possibility to set log UART to NONE. (Default UART0)

I have output :-)

br. Frank.

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 217 guests