Skip to content

TouchAlarm on Qt Py ESP32-S2 not working in SLEEP mode #7994

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
mikeysklar opened this issue May 18, 2023 · 4 comments · Fixed by #8003
Closed

TouchAlarm on Qt Py ESP32-S2 not working in SLEEP mode #7994

mikeysklar opened this issue May 18, 2023 · 4 comments · Fixed by #8003
Assignees
Milestone

Comments

@mikeysklar
Copy link

mikeysklar commented May 18, 2023

CircuitPython version

Adafruit CircuitPython 8.1.0-rc.0 on 2023-05-17; Adafruit QT Py ESP32S2 with ESP32S2

Code/REPL

import alarm
import board

print(alarm.wake_alarm)

touch_alarm = alarm.touch.TouchAlarm(board.A2)

alarm.exit_and_deep_sleep_until_alarms(touch_alarm)

Behavior

The code runs, but does not wakeup upon pin touch.

Description

Forum thread based on Adafruit example code.

Additional information

I also reproduced on a Qt Py ESP32-S2 with current bootloader 0.13.0 and current beta CircuitPython 8.1.0-rc.0

@mikeysklar mikeysklar added the bug label May 18, 2023
@rxhfcy
Copy link

rxhfcy commented May 18, 2023

Consider adding the esp32-s2 label?

@dhalbert dhalbert added this to the 8.x.x milestone May 18, 2023
@dhalbert dhalbert self-assigned this May 18, 2023
@dhalbert
Copy link
Collaborator

This appears to have stopped working between 7.1.0 and 7.2.0. I'll bisect.

@dhalbert
Copy link
Collaborator

dhalbert commented May 18, 2023

Apparently due to 13db655:

Pin reset is now changed to the IDF default which pulls the pin up rather than CircuitPython's old behavior of floating the pin.

So we need to special-case any TouchAlarm pins.

@dhalbert
Copy link
Collaborator

2bc8d73, which is past 13db655, also causes TouchAlarm not to work. If I prevent the touch awaking pin from being reset, then 13db655 and forward works, up to but not including 2bc8d73 does not. 2bc8d73 is part of #6772.

So still working on this.

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

Successfully merging a pull request may close this issue.

3 participants