Skip to content
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

ESP32-S2: Initialize touch in proper order #4021

Merged
merged 1 commit into from
Jan 19, 2021

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Jan 18, 2021

Rework order of touch peripheral initialization code. 048ca2a changed it around slightly. This apparently made the calibration be wrong on pins with any length of trace or wire connected to them, causing the TouchIn.raw_value to be its max 65535, all the time.. Thanks to @microdev1 for help in debugging: the microS2 did not show this problem, which was a clue, because it's a very small board with short traces. When @microdev1 connected a wire to one pin, the problem did appear on that pin.

Tested with TouchIn and also TouchAlarm. Both work now.

Note that TouchAlarm does not work on the MagTag D10 pin, probably because it has a protection Zener and resistor permanently attached.

@dhalbert
Copy link
Collaborator Author

The single build failure is a GitHub Action glitch.

@jepler jepler merged commit 9143268 into adafruit:main Jan 19, 2021
@tannewt
Copy link
Member

tannewt commented Jan 20, 2021

I suspect the specific issue here is that the internal touch circuitry wasn't actually connected to the outside world by the mux. This would cause the calibration to happen on the internal wires only. The short trace board is probably similar enough to work but not long wires.

@dhalbert dhalbert deleted the esp32-s2-touch-init-order branch January 25, 2021 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants