Get TFT_eSPI working on Core2 | LVGL low performance

  • Hello, I was recently able to get 24FPS average on an LVGL music demo here in this video:

    I notice that the M5Core2 library has built-in TFT_eSPI, but it is an outdated version which does not feature DMA.

    When I try to set up newer TFT_eSPI library for M5Stack Core2, it doesn't work at all.
    Please help me, I have been trying to fix this for almost a year now.

  • Hello@ Windorey

    The library for fast rendering is LovyanGFX.
    It has the function of DMA.
    LovyanGFX is about 3 times faster than TFT-eSPI.

    The authors of LovyanGFX have created M5Unified.
    M5Unified is he faster than M5Stack.

  • I'd be happy to help you with this issue!

    Firstly, it's great that you were able to achieve an average of 24FPS on the LVGL music demo. That's a significant improvement and a good indication that your M5Stack Core2 hardware is capable of handling the display requirements.

    Regarding the TFT_eSPI library, it's true that the built-in library in the M5Core2 library is outdated and doesn't support DMA. However, the newer versions of the library do support DMA and can provide significant performance improvements.

    To use the newer TFT_eSPI library with your M5Stack Core2, you need to follow the installation and configuration instructions provided by the library's developer. Here's a general outline of the steps you need to take:

    Download the latest version of the TFT_eSPI library from the library's GitHub repository:

    Install the library in your Arduino IDE using the "Library Manager" option in the "Sketch" menu.

    Open the "User_Setup.h" file in the TFT_eSPI library's "User_Setups" directory and modify the settings to match your M5Stack Core2 hardware. Specifically, you need to configure the display type, pins used for communication, and other settings as required by your hardware. Refer to the documentation and examples provided by the library to make these changes correctly.

    Once you have configured the library, you can use the library's APIs to draw graphics and text on the display. Be sure to use the DMA-enabled APIs for maximum performance.

    If you encounter any issues during this process, feel free to ask for further help. Good luck!