2025-02-08 12:18 PM
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.
Please help me to proper configure the GT9721 to my lcd, ER-TFTM101-1.
Thank you!
2025-03-18 6:28 AM
Hi,
Did you manage to get GT9271 work with 1024x600?
I'm in same boat as you, any suggestion would be very helpful.
2025-03-23 2:46 PM
Well....................... have no good news to you!
Ofaro, wish you a nice day!
There is no solution for this GT9271 GOODIX chip, in my development I use a simple touch to get virtual buttons coordinates, and that´s all, no gestures, no other complex things and no nothing..... This chip It is not supposed to work like that.
They (BUYDISPLAY) tried to sell me another very expensive module, attached with the ARDUINO (hrrrrrrr….hate Arduino…..hate it…..) just to check if it work or not, but just taking a look at the Arduino (hrrrr…) code they use, it is clear to me that on every interruption triggering signal, the code checks if it is a “valid” touch or not, and this is nothing more than I need to make sure that the pulse train is there.
I even think to buy just the touch mirror (much cheaper), and prove that the GT9271 work this way, but there is no reason to do that because the Arduino (hrrrr…) code proves that.
I move on…. and changed all my development to use an infrared remote control, instead of LCD touch, in my case it is possible.
What I suggest to you is:
1 – If you have no other solution to replace the buttons, or you really need to use some simple buttons on the LCD, try to move to GT911 instead of GT9271;
2 – You can try to use CCP module, this is the main exit I could see to not make the processor work so hard to check if the touch is a “valid” or not “valid” touch at 28kHz interruption frequency. So, later, when all my code and development finishes, I will try to use DMA and if the triggering signal period is greater than 250us I will fire the I2C to get the valid coordinate of the touch. I don´t know if I make myself clear here, but I cannot see any other exit to this terrible behavior of this chip, I think it is not intended to be use under these simple rules. Just to you see, I formatted my notebook today, it is a SAMSUNG Ultrabook 4, powerful computer with I9 processor, and in the middle of the process the GOODIX drives was in the middle of the installation, did you saw?, I can make everything with my touch screen on my notebook, gestures, 10 points touch and so on, but I have an I9 processor behind the scenes, not a black pill……
Always remember this! Chinese guys sell everything they don´t know what it is nor how they work….
Hope I could help you!
Best regards;