Touch compatibility of IMXRT SDK


I use NXP Imx RT1170 EVK board and NXP’s own ide, MCU Xpresso. I have downloaded their latest version for now (03 Feb 2024). I had a project about GUI, there are some texts and images and buttons.
I wanted to import lvgl v9 after released. I can see the same screen on my lcd but I could not get successful touch. I think I have a problem about indev, I share some code pieces and screens here.

What MCU/Processor/Board and compiler are you using?

IMXRT1176EVK MCUXPRESSO, arm-none-eabi-gcc command is used.

What LVGL version are you using?


What do you want to achieve?

Success about touch.

What have you tried so far?

I have tried adding struct elements to indev, no success.

Code to reproduce

Previous version v8.3.11
void lv_port_indev_init(void)
static lv_indev_drv_t indev_drv;

 * Touchpad
 * -----------------*/

/*Initialize your touchpad */

/*Register a touchpad input device*/
indev_drv.type    = LV_INDEV_TYPE_POINTER;
indev_drv.read_cb = DEMO_ReadTouch;


new version v9.0.0 written by me
void lv_port_indev_init(void)
lv_indev_t * indev = lv_indev_create();




Video is here : touchproblem

video is here : touchproblem.mp4 - VEED

I thought I have a problem about indev but I was wrong. My problem was about lv_display_t .

I have written below code

    memset(s_frameBuffer, 0, sizeof(s_frameBuffer));

    lv_display_t * disp = lv_display_create(DEMO_BUFFER_WIDTH, DEMO_BUFFER_HEIGHT);
    lv_display_set_flush_cb(disp, (void *)DEMO_FlushDisplay);
    lv_display_set_buffers(disp, s_frameBuffer[0], s_frameBuffer[1], DEMO_BUFFER_WIDTH*DEMO_BUFFER_HEIGHT*DEMO_BUFFER_BYTE_PER_PIXEL, LV_DISPLAY_RENDER_MODE_PARTIAL);

Then I have changed just render_mode as below and now touch capability is okay.

    lv_display_set_buffers(disp, s_frameBuffer[0], s_frameBuffer[1], DEMO_BUFFER_WIDTH*DEMO_BUFFER_HEIGHT*DEMO_BUFFER_BYTE_PER_PIXEL, LV_DISPLAY_RENDER_MODE_DIRECT);

Now I can see my gui designs on the lcd and when I touch objects I see an expected effects.