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-S3 TouchIn on onboard I2C pin causes hang #8049

Open
dhalbert opened this issue May 30, 2023 · 4 comments
Open

ESP32-S3 TouchIn on onboard I2C pin causes hang #8049

dhalbert opened this issue May 30, 2023 · 4 comments

Comments

@dhalbert
Copy link
Collaborator

https://forums.adafruit.com/viewtopic.php?t=201772

CircuitPython 8.0.5
Adafruit ESP32-S3 Reverse TFT Feather
Trying to use board.D3 (aka board.SDA) as a TouchIn causes a hang.

import touchio

print("")
print("touchio_test.py")

while True:
    touch_pin = touchio.TouchIn(board.D3)
    print(touch_pin.value)
    time.sleep(0.1)
@dhalbert dhalbert added this to the 8.x.x milestone May 30, 2023
@bill88t
Copy link

bill88t commented May 30, 2023

Out of curiosity tried to reproduce on regular esp32, however got a weird crash, not a hang.

Adafruit CircuitPython 8.1.0 on 2023-05-22; M5Stack Timer Camera X with ESP32
>>> import board, digitalio, touchio
>>> a = touchio.TouchIn(board.G13)
>>> a.value
False
>>> a.deinit()
>>> a = touchio.TouchIn(board.G4)
>>> a.value
False

This is one of the 3 i2c busses of the board.
On the other one, same deal fine.
On the 3rd one, and specifically pin board.BM8563_SCL, which is pin_GPIO14, this happened:

>>> a = touchio.TouchIn(board.BM8563_SCL)
>>> a.value
False
>>> a.deinit()
ets Jul 29 2019 12:21:46

rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:12748
load:0x40080400,len:3024
entry 0x400805dc
Serial console setup

Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
Internal watchdog timer expired.
Press reset to exit safe mode.

@s-light
Copy link

s-light commented May 30, 2023

i just tested it with the REPL:

Adafruit CircuitPython 8.0.5 on 2023-03-31; Adafruit Feather ESP32-S3 Reverse TFT with ESP32S3
>>> import board
>>> import touchio
>>> touch_pin = touchio.TouchIn(board.D3)

at this point the ESP32-S3 (in my case a Adafruit ESP32-S3 Reverse TFT Feather )
REPL is unresponsive till i reset it.
the CIRCUITPY disc is still working!

@jepler
Copy link
Member

jepler commented Jun 21, 2023

This may have to do with the powerful pull up on an I2C bus...

@s-light
Copy link

s-light commented Jun 21, 2023

i read somewhere that at initializing the lib tries to measure a base value for non-touch state.
maybe this times out in some way because of the pullup? (some sort of out of range / overflow thing?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants