Skip to main content
SProg
Associate III
January 13, 2020
Question

Using GT911 Touch Controller on STM32F746 Discovery

  • January 13, 2020
  • 13 replies
  • 6902 views

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.

This topic has been closed for replies.

13 replies

Martin KJELDSEN
Principal III
January 13, 2020

Are you looking for board design or code?

/Martin

SProg
SProgAuthor
Associate III
January 13, 2020

Hello Martin,

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

Martin KJELDSEN
Principal III
January 13, 2020

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
SProgAuthor
Associate III
January 13, 2020

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

Martin KJELDSEN
Principal III
January 20, 2020

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

jackal13
Visitor II
October 4, 2020

Hi Martin can you find it?

Martin KJELDSEN
Principal III
January 20, 2020
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
SProgAuthor
Associate III
January 20, 2020

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)

Martin KJELDSEN
Principal III
January 20, 2020

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
SProgAuthor
Associate III
January 20, 2020

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.

Martin KJELDSEN
Principal III
January 21, 2020

That's great :)

Sahil Ahmad
Associate
March 7, 2020

Hi @Martin KJELDSEN​ , I am also looking for same solution. Did you succeeded? If yes please share solution. I have another question, I am using cubeide 1.3 and F429 disco board, but not able to drive display, but in cubeide1.1, I was able to drive lcd, please help

jackal13
Visitor II
October 4, 2020

I try the modify stm32f746 disco board for 7 inch tft.So first i remove the 4.3 inch screen and i connect the 7 inch screen which has got same pins.But touch controller is gt911.When i build the project touchgfx with stm32f746 disco board and change the resolution from 480x272 to 800x400 it already build it with ft5336.So my screen view ok but touch doesnt work.I think i have to add gt911 library.

1)But how?should i delete ft536 and add gt911 or should i change inside the ft5336?

2)when i check the oscilloscope signals that last 4 pins that stm32f746 screen connection (sda-scl-int-rst)should i see any square wave signal at SCL? i measure just 3.3 v directly.is it true?