Skip to content

touchRead T2 conflict with GPIO 27 but works fine in December release #6443

Closed
@htmltiger

Description

@htmltiger

Board

ESP32 Dev Module

Device Description

Standard 38pin

Hardware Configuration

Jumper between 27 and 39 to read

Version

latest master

IDE Name

Arduino IDE

Operating System

Windows 11

Flash frequency

80Mhz

PSRAM enabled

no

Upload speed

921600

Description

When pin 27 is set output and high it works normal but when T2 is read it floats

The same sketch works fine with December release

Output from old version 22/12/2021 ESP32 Arduino 2.0.2 based on ESP-IDF 4.4-beta1 works fine

22:12:14.849 -> pin 27 is high
22:12:15.833 -> Jumper pin 27 to 39 = 4095
22:12:16.864 -> Jumper pin 27 to 39 = 4095
22:12:17.837 -> Jumper pin 27 to 39 = 4095
22:12:18.868 -> Jumper pin 27 to 39 = 4095
22:12:19.846 -> Jumper pin 27 to 39 = 4095
22:12:19.846 -> T2 = 47
22:12:20.830 -> Jumper pin 27 to 39 = 4095
22:12:21.861 -> Jumper pin 27 to 39 = 4095
22:12:22.837 -> Jumper pin 27 to 39 = 4095
22:12:23.868 -> Jumper pin 27 to 39 = 4095
22:12:24.852 -> Jumper pin 27 to 39 = 4095
22:12:24.852 -> T2 = 79
22:12:25.838 -> Jumper pin 27 to 39 = 4095
22:12:26.869 -> Jumper pin 27 to 39 = 4095
22:12:27.853 -> Jumper pin 27 to 39 = 4095
22:12:28.837 -> Jumper pin 27 to 39 = 4095
22:12:29.868 -> Jumper pin 27 to 39 = 4095

Sketch

void setup() {
	Serial.begin(115200);
	delay(1000);
	pinMode(27, OUTPUT);
	digitalWrite(27, HIGH);
	Serial.println("pin 27 is high");
}

void loop() {

	static unsigned long every1second = millis();
	if (millis() - every1second >= 1000) { every1second = millis();
		Serial.print("Jumper pin 27 to 39 = ");
		Serial.println(analogRead(39));
	}

	static unsigned long every5seconds = millis();
	if (millis() - every5seconds >= 5000) { every5seconds = millis();
		Serial.print("T2 = ");
		Serial.println(touchRead(T2));
	}
}

Debug Message

22:18:26.952 -> pin 27 is high
22:18:27.981 -> Jumper pin 27 to 39 = 4095
22:18:28.977 -> Jumper pin 27 to 39 = 4095
22:18:29.962 -> Jumper pin 27 to 39 = 4095
22:18:30.982 -> Jumper pin 27 to 39 = 4095
22:18:31.966 -> T2 = 77
22:18:32.235 -> Jumper pin 27 to 39 = 0
22:18:33.219 -> Jumper pin 27 to 39 = 0
22:18:34.256 -> Jumper pin 27 to 39 = 0
22:18:35.230 -> Jumper pin 27 to 39 = 0
22:18:36.251 -> Jumper pin 27 to 39 = 0
22:18:36.954 -> T2 = 77
22:18:37.235 -> Jumper pin 27 to 39 = 0
22:18:38.258 -> Jumper pin 27 to 39 = 0
22:18:39.242 -> Jumper pin 27 to 39 = 0
22:18:40.235 -> Jumper pin 27 to 39 = 0
22:18:41.219 -> Jumper pin 27 to 39 = 0

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.

Activity

changed the title [-]touchRead T2 conflict with GPIO 27 output high[/-] [+]touchRead T2 conflict with GPIO 27 but works fine in December release[/+] on Mar 19, 2022
VojtechBartoska

VojtechBartoska commented on Mar 31, 2022

@VojtechBartoska
Contributor

Hello, are you able to test your issue on development version 2.0.3-RC1 to check if this is still valid? You can take a look on Docs where is explained how to choose development release version in Arduino IDE.

htmltiger

htmltiger commented on Apr 1, 2022

@htmltiger
Author

The bug is still present in latest master

12:24:31.300 -> entry 0x400805f0
12:24:32.471 -> pin 27 is high
12:24:33.459 -> Jumper pin 27 to 39 = 4095
12:24:34.495 -> Jumper pin 27 to 39 = 4095
12:24:35.481 -> Jumper pin 27 to 39 = 4095
12:24:36.469 -> Jumper pin 27 to 39 = 4095
12:24:37.502 -> Jumper pin 27 to 39 = 4095
12:24:37.502 -> T2 = 77
12:24:38.486 -> Jumper pin 27 to 39 = 44
12:24:39.470 -> Jumper pin 27 to 39 = 34
12:24:40.503 -> Jumper pin 27 to 39 = 70
12:24:41.489 -> Jumper pin 27 to 39 = 51
12:24:42.472 -> Jumper pin 27 to 39 = 32
12:24:42.472 -> T2 = 77
12:24:43.460 -> Jumper pin 27 to 39 = 80
12:24:44.496 -> Jumper pin 27 to 39 = 48
12:24:45.480 -> Jumper pin 27 to 39 = 36
12:24:46.466 -> Jumper pin 27 to 39 = 64
12:24:47.500 -> Jumper pin 27 to 39 = 37
12:24:47.500 -> T2 = 77

VojtechBartoska

VojtechBartoska commented on Apr 1, 2022

@VojtechBartoska
Contributor

@htmltiger Thanks for your test, adding it to our Roadmap.

Adding you here @P-R-O-C-H-Y, it's a lower priority comparing to your other issues you are working on so to be picked up later :)

moved this from Todo to Under investigation in Arduino ESP32 Core Project Roadmapon Apr 6, 2022
P-R-O-C-H-Y

P-R-O-C-H-Y commented on Apr 21, 2022

@P-R-O-C-H-Y
Member

Hi @htmltiger, I have linked a PR that solves this issue.
If you can give it a try before it gets merged, we will appreciate that :)

7 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Relationships

None yet

    Development

    Participants

    @htmltiger@VojtechBartoska@P-R-O-C-H-Y

    Issue actions

      touchRead T2 conflict with GPIO 27 but works fine in December release · Issue #6443 · espressif/arduino-esp32