[M5Tab5] How to de-init the GT911 touch panel?
-
I'm creating a firmware manager project (which loads bin firmwares from the SD card and runs them on the device), for the Tab5 with ESP-IDF v5.4.1 and LVGL. I have finished the firmware flashing functions (through ESP32's built-in OTA functions) but now I met a problem with the Tab5's GT911 touch panel.
Since the Launcher shall reboot the system after loading a firmware (to boot into the firmware), I simply called esp_restart() to reboot the ESP32.
But after the ESP32 reboots, the touch panel isn't working (the screen shows the UI though). The touch panel works if I manually rebooted the device with the power button. I think that's a problem with the GT911 touch driver not being correctly de-initialized, but I didn't find any functions to de-init the touch panel.
Are there any ways to de-init the GT911 touch driver, or any ways to make sure the firmware, after a software reboot, can have access to the touch panel?
Since this is a firmware manager project, I can't modify the user's custom firmware, so any methods that involves changing the user's firmware won't work for me.
My project's repo is at: https://github.com/ImLunchtime/Tab5_Launcher -
Problem already fixed with only two lines of code:
esp_sleep_enable_timer_wakeup(50000); // 50ms esp_deep_sleep_start();A very short deep sleep will power off the GT911 chip and power it on again, so that fixes the problem.
Thanks to the chatbot!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login