Skip to main content
Visitor II
February 8, 2025
Question

GT9271 TOUCH INT

  • February 8, 2025
  • 4 replies
  • 2286 views

Hi there. I require assistance to ensure the proper operation of GT9271.
After properly RESETting the GT9271, and issuing the 0XBA I2C address, the device keeps pulling the INT pin without any touch on the LCD display (1024x600). I really feel a lack of information, and the datasheet does not give a good description of the registers.
This is my code!

#include <main.h>
#include <DLY.h>
#include <stdint.h>

uint8_t FLAG_TP, CXY_BFR[4];
uint16_t TPX, TPY;

uint8_t TP_CNF_INIT[]= //188b
	{
	0X00, //REGISTER_HIGH
	0X00, //REGISTER LOW

	0X81, //0X8047 -> 0b10000001
	0X00, //0X8048 -> 0b00000000 X-> OUTPUT MAX LOW BYTE
	0X04, //0X8049 -> 0b00000100 X-> OUTPUT MAX HIGH BYTE (0X0400 = 1024)
	0X58, //0X804A -> 0b01011000 Y-> OUTPUT MAX LOW BYTE
	0X02, //0X804B -> 0b00000010 Y-> OUTPUT MAX HIGH BYTE (0X0258 = 600)
	0X01, //0X804C -> 0b00001010 TOUCH NUMBER -> 1 POINT ONLY
	0X00, //0X804D -> 0B00000000 INT FALLING EDGE
	0X20, //0X804E ->
	0X01, //0X804F ->
	0X08, //0X8050 ->
	0X28, //0X8051 ->
	0X05, //0X8052 ->
	0X50, //0X8053 ->
	0X3C, //0X8054 ->
	0X0F, //0X8055 ->
	0X05, //0X8056 ->
	0X00, //0X8057 ->
	0X00, //0X8058 ->
	0X00, //0X8059 ->
	0X00, //0X805A ->
	0X00, //0X805B ->
	0X00, //0X805C ->
	0X00, //0X805D ->
	0X00, //0X805E ->
	0X00, //0X805F ->
	0X00, //0X8060 ->
	0X00, //0X8061 ->
	0X89, //0X8062 ->
	0X2A, //0X8063 ->
	0X0B, //0X8064 ->
	0X2D, //0X8065 ->
	0X2B, //0X8066 ->
	0X0F, //0X8067 ->
	0X0A, //0X8068 ->
	0X00, //0X8069 ->
	0X00, //0X806A ->
	0X01, //0X806B ->
	0XA9, //0X806C ->
	0X03, //0X806D ->
	0X2D, //0X806E ->
	0X00, //0X806F ->
	0X01, //0X8070 ->
	0X00, //0X8071 ->
	0X00, //0X8072 ->
	0X00, //0X8073 ->
	0X03, //0X8074 ->
	0X00, //0X8075 ->
	0X00, //0X8076 ->
	0X00, //0X8077 ->
	0X00, //0X8078 ->
	0X00, //0X8079 ->
	0X21, //0X807A ->
	0X59, //0X807B ->
	0X94, //0X807C ->
	0XC5, //0X807D ->
	0X02, //0X807E ->
	0X07, //0X807F ->
	0X00, //0X8080 ->
	0X00, //0X8081 ->
	0X04, //0X8082 ->
	0X93, //0X8083 ->
	0X24, //0X8084 ->
	0X00, //0X8085 ->
	0X7D, //0X8086 ->
	0X2C, //0X8087 ->
	0X00, //0X8088 ->
	0X6B, //0X8089 ->
	0X36, //0X808A ->
	0X00, //0X808B ->
	0X5D, //0X808C ->
	0X42, //0X808D ->
	0X00, //0X808E ->
	0X53, //0X808F ->
	0X50, //0X8090 ->
	0X00, //0X8091 ->
	0X53, //0X8092 ->
	0X00, //0X8093 ->
	0X00, //0X8094 ->
	0X00, //0X8095 ->
	0X00, //0X8096 ->
	0X00, //0X8097 ->
	0X00, //0X8098 ->
	0X00, //0X8099 ->
	0X00, //0X809A ->
	0X00, //0X809B ->
	0X00, //0X809C ->
	0X00, //0X809D ->
	0X00, //0X809E ->
	0X00, //0X809F ->
	0X00, //0X80A0 ->
	0X00, //0X80A1 ->
	0X00, //0X80A2 ->
	0X00, //0X80A3 ->
	0X00, //0X80A4 ->
	0X00, //0X80A5 ->
	0X00, //0X80A6 ->
	0X00, //0X80A7 ->
	0X00, //0X80A8 ->
	0X00, //0X80A9 ->
	0X00, //0X80AA ->
	0X00, //0X80AB ->
	0X00, //0X80AC ->
	0X00, //0X80AD ->
	0X00, //0X80AE ->
	0X00, //0X80AF ->
	0X00, //0X80B0 ->
	0X00, //0X80B1 ->
	0X00, //0X80B2 ->
	0X00, //0X80B3 ->
	0X00, //0X80B4 ->
	0X00, //0X80B5 ->
	0X00, //0X80B6 ->
	0X02, //0X80B7 ->
	0X04, //0X80B8 ->
	0X06, //0X80B9 ->
	0X08, //0X80BA ->
	0X0A, //0X80BB ->
	0X0C, //0X80BC ->
	0X0E, //0X80BD ->
	0X10, //0X80BE ->
	0X12, //0X80BF ->
	0X14, //0X80C0 ->
	0X16, //0X80C1 ->
	0XFF, //0X80C2 ->
	0XFF, //0X80C3 ->
	0XFF, //0X80C4 ->
	0X00, //0X80C5 ->
	0X00, //0X80C6 ->
	0X00, //0X80C7 ->
	0X00, //0X80C8 ->
	0X00, //0X80C9 ->
	0X00, //0X80CA ->
	0X00, //0X80CB ->
	0X00, //0X80CC ->
	0X00, //0X80CD ->
	0X00, //0X80CE ->
	0X00, //0X80CF ->
	0X00, //0X80D0 ->
	0X00, //0X80D1 ->
	0X00, //0X80D2 ->
	0X00, //0X80D3 ->
	0X00, //0X80D4 ->
	0X00, //0X80D5 ->
	0X02, //0X80D6 ->
	0X04, //0X80D7 ->
	0X06, //0X80D8 ->
	0X08, //0X80D9 ->
	0X0A, //0X80DA ->
	0X0F, //0X80DB ->
	0X10, //0X80DC ->
	0X12, //0X80DD ->
	0X16, //0X80DE ->
	0X18, //0X80DF ->
	0X1C, //0X80E0 ->
	0X1D, //0X80E1 ->
	0X1E, //0X80E2 ->
	0X1F, //0X80E3 ->
	0X20, //0X80E4 ->
	0X21, //0X80E5 ->
	0X22, //0X80E6 ->
	0X24, //0X80E7 ->
	0XFF, //0X80E8 ->
	0XFF, //0X80E9 ->
	0XFF, //0X80EA ->
	0XFF, //0X80EB ->
	0XFF, //0X80EC ->
	0XFF, //0X80ED ->
	0XFF, //0X80EE ->
	0X00, //0X80EF ->
	0X00, //0X80F0 ->
	0X00, //0X80F1 ->
	0X00, //0X80F2 ->
	0X00, //0X80F3 ->
	0X00, //0X80F4 ->
	0X00, //0X80F5 ->
	0X00, //0X80F6 ->
	0X00, //0X80F7 ->
	0X00, //0X80F8 ->
	0X00, //0X80F9 ->
	0X00, //0X80FA ->
	0X00, //0X80FB ->
	0X00, //0X80FC ->
	0X00, //0X80FD ->
	0X00, //0X80FE ->
	0XD6, //0X80FF ->
	0X01 //0X8100 ->
	};
void TP_RESET()					//RESET GT9721 AND DEVICE ADDRESS = 0XBA
	{
	GPIOB -> BSRR = 1<<(14+16);	//TP_RST RESET -> PB14
	DEL_MS(25);
	GPIOB -> BSRR = 1<<14;		//TP_RST SET -> PB14
	DEL_MS(50);					//ADDRESS SET 0XBA
	DEL_MS(50);					//ADDRESS SET 0XBA
	}
void TP_INIT()					//GT9721 INITIALIZATION
	{
	TP_CNF_INIT[0]=0X80; //FIRST REGISTER ADDRESS
	TP_CNF_INIT[1]=0X47; //SECOND REGISTER ADDRESS
	HAL_I2C_Master_Transmit(&hi2c1, GT9271_ADDR_W, TP_CNF_INIT, sizeof(TP_CNF_INIT), 100);
	}
void TP_GET_XY() //GET TP X + Y COORDNATES
	{
	TP_CNF_INIT[0]=0X81; //FIRST REGISTER ADDRESS
	TP_CNF_INIT[1]=0X50; //SECOND REGISTER ADDRESS
	HAL_I2C_Master_Transmit(&hi2c1, GT9271_ADDR_W, TP_CNF_INIT, 2, 100);
	HAL_I2C_Master_Receive(&hi2c1, GT9271_ADDR_R, CXY_BFR, 4, 100);

	TPX=(CXY_BFR[1]<<8) + CXY_BFR[0];
	TPY=(CXY_BFR[3]<<8) + CXY_BFR[2];

	HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13); //TEST ONLY

	FLAG_TP=0X00;
	}

As you can see, it keeps trigring INT pin withouT any reason.

Sem título.png

Please help me to proper configure the GT9721 to my lcd, ER-TFTM101-1.

Thank you!

    This topic has been closed for replies.

    4 replies

    Technical Moderator
    February 8, 2025

    Are you aware that you are asking for support for a Goodix GT9271 touch controller in the community of STMicroelectronics?

    Doesn't Goodix have a forum where you can ask?

    Good luck!
    /Peter

    m-a-c-fAuthor
    Visitor II
    February 8, 2025

    Yes! I am aware!

    Goodix does not support me; instead, they tell me to ask for help with the LCD vendor. If someone could help me, I would really appreciate.

    Regards,

    Technical Moderator
    February 9, 2025

    Ahm… STMicroelectronics is also not an LCD manufacturer.

    Graduate II
    February 9, 2025

    Perhaps attach the panel data sheet you're working from.

    Confirm you're looking at the right pin, and configuring it correctly. Perhaps dump all the registers, check if there's a WHO AM I type register.

    Sure you're looking at the touch controller interrupt and not that of the display controller?

    Graduate II
    February 9, 2025

    This is the Rev 04 document, it's better than the mess that is Rev 00

    https://www.orientdisplay.com/wp-content/uploads/2022/08/GT9271.pdf

    Other forum's or Arduino library implementations might be enlightening.

    https://forum.pjrc.com/index.php?threads/goodix-gt9271-touch-screen-coordinates-inverted.75113/

    m-a-c-fAuthor
    Visitor II
    February 10, 2025

    Mr. Peter BENSCH Thank you for the tip, but I really HATE Arduino... It is my fault for sure. I refuse to look for an answer in these locations. It seems to me that they don't understand very well what they are doing.

    Mr. Tesla DeLorean Thank you! I assure you that the LCD is working pretty fine; absolutely no issues with it. The touch controller has nothing to do with the RA8876 LCD processor, and it is working fine.

    GOODIX did not answer, but BUYDISPLAY does. It seems to me that the BUYDISPLAY is a decent supplier, with high-quality products, and they sent me a new initialization sequence that I will test within this week. If it works, I will post here because this may help others to make the GT9271 work fine with the 1024×600 LCD.

    By the way, the LCD datasheet does not show much, just the basics, but it is pretty well explained. The LCD model is ER-TFTM101-1, a pretty nice and well-done piece of equipment.

    Let's see how it goes!

    Nice day for all!

     

     
     
    Visitor II
    September 16, 2025

    It looks like you're using the wrong address, GOODIX is using 0x5D. This is how many display manufacturers indicate.

    Скриншот 16-09-2025 10.25.34.jpg

    m-a-c-fAuthor
    Visitor II
    September 16, 2025

    Good day Vasily_ Thanks for your help.

     

    I don´t think so...... But it is arriving the next try period, whem I will try again deal with this chip. For sure I will give it a try. I say so because the GT9721 always gives a ACK after any I2c comm at address 0xBA, and in my datasheet, this is the address 8bit format. I made an I2c Snif, and confirm that this address is validy, anyway, I will give it a try and check, any news for sure I will update here.

     

    Thank you!