CN / EN
CN / EN

Ask a New Question

Design Support

If you need one-on-one support for confidential technical issues with your project, please click on "Contact Us" below.

GT9271 INTERRUPTION

MACF

2025-02-08 22:33

Hi there. I require assistance to ensure the proper operation of GT9721.

After properly RESETting the GT9271, and issuing the 0XBB 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 withou any reason.

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


Thank you!

0 Favorites

0 Likes

1 Answers

Goodix Administrator

Community Administrator
2025-02-25 16:45

Hi, it's very sorry that this community doesn't provide Touch product support, you can send an email to sales@goodix.com for consultation or contact your vendor. Thanks!

0 Comments

0 Likes

0 Favorites

Your comment

You can answer questions after logging in, please or register

Your Voice Matters
Contact Sales

Scan to follow

Open WeChat, use "Scan" to follow.