cancel
Showing results for 
Search instead for 
Did you mean: 

Using GT911 Touch Controller on STM32F746 Discovery

SProg
Associate III

Hello,

Does anyone managed to connect GT911 Touch Controller on STM32F746 Discovery or similar board;

The demo project for STM32F746  [with TouchGFX] is using the FT5536.

13 REPLIES 13
Martin KJELDSEN
Chief III

Are you looking for board design or code?

/Martin

SProg
Associate III

Hello Martin,

We already made a custom board based on the Discovery schematics. I am talking about the firmware implementation

Martin KJELDSEN
Chief III

Let me look around. I'm pretty sure we've written a TouchGFX driver for it at some point - if this is what you mean by firmware.

/Martin

SProg
Associate III

Yeah Martin, that's what i mean by 'firmware' term :)

Martin KJELDSEN
Chief III

I haven't managed to find it yet. I can help you with some tips for implementing it if you want - Do you have any low level driver code for the GT911? The TouchGFX interface is super easy.

/Martin

Martin KJELDSEN
Chief III
static Finger finger;
bool touchgfx::ST1232TouchController::sampleTouch(int32_t& x, int32_t& y)
{
    if (touchDetected())
    {
        //Get sample for finger 1 and extract data
        if (getSample(&finger))
        {
            x = finger.x;
            y = finger.y;
 
            return true;
        }
    }
    return false;
}

The methods to implement here are the following. Only X and Y are supported by TouchGFX and it evaluates on these, over time, internally and offers "gestures" that way. No multi-touch gesture abstraction layer is provided by TouchGFX.

* touchDetected()

* getSample()

SProg
Associate III

The same display (same Touch controller) has been successfully used on a linux-based embedded device, so either i'm gonna try to use same .c/.h files or i'm gonna use the driver from Waveshare (https://www.waveshare.com/wiki/File:7inch-Capacitive-Touch-LCD-G-Demo.7z)

Okay, let me know how you do and if you need help. It should be pretty straight forward.

Something to consider is that sampleTouch() is a part of your overall render time for a frame, so if you're busy waiting somewhere in your driver code that can be an issue. Sometimes we'll make it interrupt based using a different Touch task and then the GUI Task ( sampleTouch() ) will read those values directly.

/Martin

SProg
Associate III

Oh, another forum member has upload some functions for GT911 Touch driver.

https://community.st.com/s/question/0D50X0000B5H5ufSQC/display-rk043fn66hsctg-from-rocktech

I'm gonna import them on my project, at least is a start.