Page 1 of 1

Using GPIO43 and GPIO44 on ESP32-S3

Posted: Sat Mar 23, 2024 11:50 pm
by FrankJensen
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?

Re: Using GPIO43 and GPIO44 on ESP32-S3

Posted: Sun Mar 24, 2024 12:21 am
by FrankJensen
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);
}

Re: Using GPIO43 and GPIO44 on ESP32-S3

Posted: Sun Mar 24, 2024 4:04 am
by username
Did you go into menuconfig and change it ?

Re: Using GPIO43 and GPIO44 on ESP32-S3

Posted: Sun Mar 24, 2024 8:02 am
by FrankJensen
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?

Re: Using GPIO43 and GPIO44 on ESP32-S3

Posted: Sun Mar 24, 2024 9:33 am
by ok-home
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.

Re: Using GPIO43 and GPIO44 on ESP32-S3

Posted: Sun Mar 24, 2024 10:00 am
by FrankJensen
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);

Re: Using GPIO43 and GPIO44 on ESP32-S3

Posted: Sun Mar 24, 2024 12:28 pm
by ok-home
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);
    }

Re: Using GPIO43 and GPIO44 on ESP32-S3

Posted: Sun Mar 24, 2024 7:58 pm
by FrankJensen
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.