🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    [Tab5] How to de-init the touch panel?

    PRODUCTS
    2
    6
    48
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ImLunchtimeI
      ImLunchtime
      last edited by

      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

      Y 1 Reply Last reply Reply Quote 1
      • ImLunchtimeI
        ImLunchtime
        last edited by

        Problem fixed with just two lines of code:

        esp_sleep_enable_timer_wakeup(50000); // 50ms
        esp_deep_sleep_start();
        

        I used this to replace esp_restart() and it worked. Putting the device to deep-sleep makes use of the PMS150G chip and basically turned the device off and then on again, so actually there is a way to let the device force a full reboot on itself.

        ImLunchtimeI 1 Reply Last reply Reply Quote 0
        • Y
          yuyun2000 @ImLunchtime
          last edited by

          @ImLunchtime chatbot是否解决了你的问题? 他的回复有什么帮助?

          ImLunchtimeI 1 Reply Last reply Reply Quote 0
          • ImLunchtimeI
            ImLunchtime @ImLunchtime
            last edited by

            Yes, the GT911 chip only needs to be turned off and then on again.

            1 Reply Last reply Reply Quote 0
            • ImLunchtimeI
              ImLunchtime @yuyun2000
              last edited by

              @yuyun2000 chatbot还是有点用的 这是它的回复里最后一个方法(也是唯一一个能用的)

              Y 1 Reply Last reply Reply Quote 0
              • Y
                yuyun2000 @ImLunchtime
                last edited by

                @ImLunchtime 有建议欢迎多提~

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post