Skip to content

fix(touch): hold the GT911 reset line low instead of leaving it floating - #172

Open
cryptomilk wants to merge 1 commit into
OpenDisplay:mainfrom
cryptomilk:asn-wip
Open

cryptomilk wants to merge 1 commit into
OpenDisplay:mainfrom
cryptomilk:asn-wip

Conversation

@cryptomilk

Copy link
Copy Markdown
Contributor

On the reTerminal E1003, GPIO48 (TOUCH_RES) is the GT911's active-low hardware reset line. Dropping touch_controllers from the device config left it completely untouched, so it floated at whatever level it was last driven. That level is HIGH, meaning the chip stays out of reset and powered, both awake and across deep sleep, since a bare digitalWrite() doesn't survive sleep without a GPIO hold.

initTouchInput() now drives the reset pin low for a touch_ic_type == OD_TOUCH_IC_NONE entry instead of skipping it. The new touchPrepareForDeepSleep() latches the reset/enable pin(s) with gpio_hold_en()/gpio_deep_sleep_hold_en() before esp_deep_sleep_start() so the level survives sleep. This also closes the same gap for an actively used touchscreen. It is now held in reset for the sleep window too.

On the reTerminal E1003, GPIO48 (TOUCH_RES) is the GT911's active-low
hardware reset line. Dropping touch_controllers from the device config
left it completely untouched, so it floated at whatever level it was
last driven. That level is HIGH, meaning the chip stays out of reset
and powered, both awake and across deep sleep, since a bare
digitalWrite() doesn't survive sleep without a GPIO hold.

initTouchInput() now drives the reset pin low for a touch_ic_type ==
OD_TOUCH_IC_NONE entry instead of skipping it. The new
touchPrepareForDeepSleep() latches the reset/enable pin(s) with
gpio_hold_en()/gpio_deep_sleep_hold_en() before esp_deep_sleep_start()
so the level survives sleep. This also closes the same gap for an
actively used touchscreen. It is now held in reset for the sleep
window too.
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.

1 participant