-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Unable to use uart0 RX pin in esp32-c6 #9959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don't see you using |
Thanks for your reply !! Though it should be covered in E32 Library, i'll cross verify and get back to you. |
Just checked in Library, they are using below code internally. |
hello @adiiot-1316, can I mark this as answered? |
@VojtechBartoska yes please. Some issue with uart pin. Work fine on other board. |
@VojtechBartoska : I am facing this issue with all ESP32-C6-WROOM-1U. However it works fine on ESP32-C6-Mini. |
@VojtechBartoska @me-no-dev @SuGlider : Can you please help me urgently here as it is affecting the production please. Really appreciate your support in advance. Serial1 pins 4,5 (LPUART) are working fine. But when using Serial 0 (16,17) , its not working. |
Have you tried calling Serial0.end before you start the LORA? It may still be in use by the console. |
Thanks @lbernstone for your reply. Its not working. I added Serial0.end before lora begin. Attached below is the code. I am unable to use uart0 . Though lp_uart (4,5) are working fine. But that lp_uart is connected to my GSM Module. Hence i need another uart, which i can connect with LoRa //Receiver Code #define AUX 15 //#define IO_MUX_GPIO17_MCU_SEL 0; void loop() {
// Print the data received void nodeConfig() { |
The difference on pin 17 is very likely the console being attached. Arduino is set up to "do the right thing", so it by default puts the console on both the usb jtag and uart0. If you can set core debug level to verbose, and then post that log, maybe we can see an error there from the gpio mux. |
I want to use Arduino as component but not much familiar with espress-if ide. `07:46:33.528 -> �ESP-ROM:esp32c6-20220919 07:46:33.528 -> Build:Sep 19 2022 07:46:33.528 -> rst:0x1 (POWERON),boot:0x1c (SPI_FAST_FLASH_BOOT) 07:46:33.528 -> SPIWP:0xee 07:46:33.528 -> mode:DIO, clock div:2 07:46:33.528 -> load:0x4086c410,len:0xcf8 07:46:33.539 -> load:0x4086e610,len:0x2e44 07:46:33.539 -> load:0x40875728,len:0x113c 07:46:33.539 -> entry 0x4086c410 07:46:33.593 -> [ 88][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RX (2) successfully set to 0x42004c22 07:46:33.593 -> [ 99][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_TX (3) successfully set to 0x42004be6 07:46:33.593 -> [ 111][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_CTS (4) successfully set to 0x42004baa 07:46:33.627 -> [ 122][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RTS (5) successfully set to 0x42004b6e 07:46:33.627 -> [ 133][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RX (2) successfully set to 0x42004c22 07:46:33.627 -> [ 145][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_TX (3) successfully set to 0x42004be6 07:46:33.661 -> [ 156][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_CTS (4) successfully set to 0x42004baa 07:46:33.661 -> [ 167][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RTS (5) successfully set to 0x42004b6e 07:46:33.661 -> [ 179][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type USB_DM (38) successfully set to 0x42000a1e 07:46:33.692 -> [ 190][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type USB_DP (39) successfully set to 0x42000a1e 07:46:33.729 -> [ 213][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 17 successfully set to type UART_RX (2) with bus 0x4080c110 07:46:33.729 -> [ 223][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 16 successfully set to type UART_TX (3) with bus 0x4080c110 07:46:33.730 -> [ 234][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 12 successfully set to type USB_DM (38) with bus 0x4080d774 07:46:33.730 -> [ 245][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 13 successfully set to type USB_DP (39) with bus 0x4080d774` |
This indicates that UART0 is using the default pins RX0 pin 17, TX0, pin 16 and also USB Hardware Serial and JTAG default pins 12 and 13 (most probably for Serial interface with CDC on Boot Enabled). |
Serial0 seems to be fine and correctly set from the logs. |
@adiiot-1316 There is no feedback from your side. The behaviour is the standard setup and not an Arduino issue. Do you still need help to configure IDF different and compile Arduino as a component of IDF? |
Board
ESP32-C6
Device Description
ESP32-C6-WROOM-1-N8 Board
Hardware Configuration
GPIO 4,5 are connected to GSM Module TX RX respectively
Version
latest master (checkout manually)
IDE Name
Arduino IDE
Operating System
Windows 10
Flash frequency
80Mhz
PSRAM enabled
yes
Upload speed
9200
Description
Hi ,
I am trying to connect my Lora module with ESP32-c6 over UART Rx Tx line. UART 4,5 are already used in connection with GSM Module. I am trying to use ESP32-c6 UART Pin N.o. 16,17 with Lora Module , but Rx is not receiving the packets as GPIO17 is default function active. How to enable the Rx function in Arduino IDE?
As checked in c6 documentation, there are 3 functions associated with GPIO 17.
1.)Rx
2.)GPIO17
3.)Chipselect.
By default f1 is enabled. We need to change the function to f0. tried below code but it didnot work out.
#define IO_MUX_GPIO17_MCU_SEL 0;
Same piece of code is working when i am using UART Pin# 4, 5.
I am quite stuck due to this issue in prototype phase and would really appreciate your support here.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: