Skip to content

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

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

Closed
1 task done
htmltiger opened this issue Mar 17, 2022 · 7 comments · Fixed by #6609
Closed
1 task done

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

htmltiger opened this issue Mar 17, 2022 · 7 comments · Fixed by #6609
Assignees
Labels
Area: Peripherals API Relates to peripheral's APIs.
Milestone

Comments

@htmltiger
Copy link

htmltiger commented Mar 17, 2022

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.
@htmltiger htmltiger added the Status: Awaiting triage Issue is waiting for triage label Mar 17, 2022
@htmltiger htmltiger changed the title touchRead T2 conflict with GPIO 27 output high touchRead T2 conflict with GPIO 27 but works fine in December release Mar 19, 2022
@VojtechBartoska VojtechBartoska added Resolution: Awaiting response Waiting for response of author and removed Status: Awaiting triage Issue is waiting for triage labels Mar 31, 2022
@VojtechBartoska
Copy link
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
Copy link
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
Copy link
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 :)

@P-R-O-C-H-Y
Copy link
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 :)

@VojtechBartoska VojtechBartoska added this to the 2.0.3 milestone Apr 22, 2022
@VojtechBartoska VojtechBartoska moved this from Under investigation to In Review in Arduino ESP32 Core Project Roadmap Apr 22, 2022
@htmltiger
Copy link
Author

I have tried with latest master and no changes, the bug is still present.

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

Its not merged yet. If you want to try, you need to make the changes manually according to the linked PR.

@htmltiger
Copy link
Author

The bug is fixed with manual changes,
Thanks.

Repository owner moved this from In Review to Done in Arduino ESP32 Core Project Roadmap Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Peripherals API Relates to peripheral's APIs.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants