STM32 Driver for GOODIX GT911 touch controller
Hey, I am using the RK043FN66HS-CTG LCD touchscreen (480 x 272 resolution) and have used the GT911 drivers found at:
GitHub - DiveInEmbedded/GT911-Touch-driver: Simple and ready to use touch driver for Goodix GT911
I have a custom STM32H743IIT6 PCB.It is currently recording coordinates incorrectly in the y- axis. Bottom right hand corner should be 480,272 (X,Y) roughly in landscape configuration. I am getting ~440,180.
I have gone through the GT911 Register Datasheet but cannot seem to figure out why the readings are still off.
Any suggestions why I am getting these issues. I understand the config version register has to be increment by one with each set of GT911 settings.
My GT911 Config is here:
static uint8_t GT911_Config[] =
{
0x89, // Config version
0xE0, 0x01, // X = 480
0x10, 0x01, // Y = 272
0x05, // 5 touch points
0x40, // ModuleSwitch1 (landscape, no flip)
0x20, 0x01, 0x08, 0x28, 0x05, 0x50,
0x3C, 0x0F, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x89, 0x2A, 0x0B, 0x2D, 0x2B, 0x0F, 0x0A,
0x00, 0x00, 0x01, 0xA9, 0x03, 0x2D, 0x00, 0x01,
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
0x00, 0x21, 0x59, 0x94, 0xC5, 0x02, 0x07, 0x00,
0x00, 0x04, 0x93, 0x24, 0x00, 0x7D, 0x2C, 0x00,
0x6B, 0x36, 0x00, 0x5D, 0x42, 0x00, 0x53, 0x50,
0x00, 0x53,
// Padding zeros
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Sensor tuning
0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,
0x12,0x14,0x16,0xFF,0xFF,0xFF,
// More padding
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Final tuning
0x02,0x04,0x06,0x08,0x0A,0x0F,0x10,0x12,
0x16,0x18,0x1C,0x1D,0x1E,0x1F,0x20,0x21,
0x22,0x24,
// Padding
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// Checksum (filled by code)
0x00,
// Config fresh flag
0x01
};

