2026-02-17 4:04 AM - last edited on 2026-02-19 1:57 AM by Andrew Neil
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
};
Solved! Go to Solution.
2026-02-19 1:10 AM - edited 2026-02-19 1:12 AM
This issue was solved.
I used a second RK043FN66HS-CTG and the waveshare code provided by https://github.com/DiveInEmbedded/GT911-Touch-driver/tree/main on the drivers page.
I would assume using the original driver wrote to registers it should not have modified.
Using a new RK043FN66HS-CTG means the touchscreen just works with expected coordinates using the waveshare drivers.
Only modification to the waveshare driver was to modify the width and height to 480 and 272. The origin (0,0) matched that of TouchGFX.
2026-02-18 10:09 AM - edited 2026-02-18 10:10 AM
Anyone?
I noticed when not reversing x and y, and not swapping axis. I reach roughly 480,270 in the left corner so the origin 0,0 is in the bottom right corner.
but it is not compatible with TouchGFX and its origin placement.
obviously when I reverse the axis in hardware or software it seems off and clips the x axis.
also noticed the centre point is off, hence me asking for registers of this device.
2026-02-19 1:10 AM - edited 2026-02-19 1:12 AM
This issue was solved.
I used a second RK043FN66HS-CTG and the waveshare code provided by https://github.com/DiveInEmbedded/GT911-Touch-driver/tree/main on the drivers page.
I would assume using the original driver wrote to registers it should not have modified.
Using a new RK043FN66HS-CTG means the touchscreen just works with expected coordinates using the waveshare drivers.
Only modification to the waveshare driver was to modify the width and height to 480 and 272. The origin (0,0) matched that of TouchGFX.