Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Unable to use uart0 RX pin in esp32-c6 #9959

Copy link
Copy link
Open
@adiiot-1316

Description

@adiiot-1316
Issue body actions

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

//Receiver Code
#include "Arduino.h"
#define E32_TTL_1W
#include "LoRa_E32.h"
/* For esp32
#define AUX 15
#define M0 2
#define M1 3
*/
#define AUX 23
#define M0 14
#define M1 15
//#define IO_MUX_GPIO17_MCU_SEL 0;

LoRa_E32 e32ttl1w(&Serial0, AUX, M0, M1);
ResponseContainer rc;
void setup() {
	Serial.begin(9600);
  Serial.println("In setup mode");
	delay(500);
// Startup all pins and UART
	e32ttl1w.begin();
	nodeConfig();
}

void loop() {
	if (e32ttl1w.available() > 0) {
		Serial.println("———-");
		rc = e32ttl1w.receiveMessageUntil();    
		if (rc.status.code != 1) {
			rc.status.getResponseDescription();      
		} else {
			// Print the data received
			Serial.println(rc.data);
		}
	}
	delay(100);
}

void nodeConfig() {
	ResponseStructContainer c;
	c = e32ttl1w.getConfiguration();
	Configuration configuration = *(Configuration*) c.data;
	configuration.ADDH = 0x0;
	configuration.ADDL = 0x3;
	configuration.CHAN = 0x4;
	configuration.SPED.airDataRate = AIR_DATA_RATE_010_24;
	configuration.SPED.uartBaudRate = UART_BPS_9600;
	configuration.SPED.uartParity = MODE_00_8N1;
	configuration.OPTION.fec = FEC_1_ON;
	configuration.OPTION.fixedTransmission = FT_FIXED_TRANSMISSION;
	configuration.OPTION.ioDriveMode = IO_D_MODE_PUSH_PULLS_PULL_UPS;
	configuration.OPTION.transmissionPower = POWER_21;
	configuration.OPTION.wirelessWakeupTime = WAKE_UP_1250;
	// Set configuration changed and set to not hold the configuration
	c.close();
	Serial.println("Updtaed config is ");
  
	ResponseStatus rs = e32ttl1w.setConfiguration(configuration, WRITE_CFG_PWR_DWN_SAVE);
	Serial.print("Config: ");
	Serial.println(rs.getResponseDescription());
}

Debug Message

No Error message

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.