I want to use UART1 over GPIO9 and GPIO10 in a ESP32-MINI-1-N4 for a basic serial communication.
Everything goes well about UART1 configuration, compilation and device flashing.
When I run the idf monitor it says that UART1 is already used and the device resets continually.
What's going on?
Is the UART1 used by another peripheral? Which one? Maybe SD_DATA2 and SD_DATA3 as shown in the attached image?
Is it possible to re-configure GPIO9 and GPIO10 to use UART1 as expected?
How? I'm not able to find any documentation about this.
thanks in advance,
gaston
ESP32-MINI-1-N4 UART1 issue
-
- Posts: 3
- Joined: Thu Jan 18, 2024 7:08 pm
ESP32-MINI-1-N4 UART1 issue
- Attachments
-
- IO_MUX Pad Summary
- IO_MUX.png (84.89 KiB) Viewed 1774 times
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32-MINI-1-N4 UART1 issue
GPIO9 and 10 are by default connected to the internal flash, so reconfiguring these pins will lead to issues. However, you can use the GPIO matrix to re-route that UART to any (free, compatible) GPIO.
-
- Posts: 3
- Joined: Thu Jan 18, 2024 7:08 pm
Re: ESP32-MINI-1-N4 UART1 issue
All right. Could you provide some example? If I remap using uart_set_pin function
ESP_ERROR_CHECK(uart_set_pin(UART_NUM_1, GPIO_NUM_4, GPIO_NUM_2, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE));
I get the same error: UART driver already installed
ESP_ERROR_CHECK(uart_set_pin(UART_NUM_1, GPIO_NUM_4, GPIO_NUM_2, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE));
I get the same error: UART driver already installed
- Attachments
-
- console-output.png (60.46 KiB) Viewed 1615 times
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32-MINI-1-N4 UART1 issue
That is a different issue. Can you show your entire code?
-
- Posts: 3
- Joined: Thu Jan 18, 2024 7:08 pm
Re: ESP32-MINI-1-N4 UART1 issue
I've found the issue. I'm calling UART initialization two times...
thanks for your support!
gaston
thanks for your support!
gaston
Re: ESP32-MINI-1-N4 UART1 issue
Hello,ESP_Sprite wrote: ↑Fri Jan 19, 2024 2:04 amGPIO9 and 10 are by default connected to the internal flash, so reconfiguring these pins will lead to issues. However, you can use the GPIO matrix to re-route that UART to any (free, compatible) GPIO.
As stated by the datasheet of the ESP32-MINI-1 :
GPIO9 and 10 are listed as available GPIO. Can you confirm that your statement above do not apply to the ESP-MINI-1 and that GPIO9 and 10 can be used as standard GPIO on this model ?Pins GPIO6, GPIO7, GPIO8, GPIO11, GPIO16, and GPIO17 on the ESP32-U4WDH chip are connected to the SPI flash integrated on the module and are not led out.
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32-MINI-1-N4 UART1 issue
Ah, you're right; the Mini-1 uses a SOC with the flash integrated and connected to some different pins. My point that you can connect it to any random (compatible, otherwise unused) GPIO still stands, though.Tanguy wrote: ↑Wed Jan 24, 2024 11:14 amHello,
As stated by the datasheet of the ESP32-MINI-1 :GPIO9 and 10 are listed as available GPIO. Can you confirm that your statement above do not apply to the ESP-MINI-1 and that GPIO9 and 10 can be used as standard GPIO on this model ?Pins GPIO6, GPIO7, GPIO8, GPIO11, GPIO16, and GPIO17 on the ESP32-U4WDH chip are connected to the SPI flash integrated on the module and are not led out.
Who is online
Users browsing this forum: No registered users and 414 guests