ILI9341 (GUIDRV_FLEXCOLOR_F66709): configured as 16-bits bus width, but it seems 18-bits

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • ILI9341 (GUIDRV_FLEXCOLOR_F66709): configured as 16-bits bus width, but it seems 18-bits

    I'm using the following initialization for a ILI9341-based LCD with 16-bits parallel interface:

    C Source Code

    1. GUI_DEVICE * pDevice;
    2. GUI_PORT_API PortAPI;
    3. CONFIG_FLEXCOLOR cfgFlexColor = { 0 };
    4. pDevice = GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, COLOR_CONVERSION, 0, 0);
    5. if (DISPLAY_ORIENTATION & GUI_SWAP_XY) {
    6. LCD_SetSizeEx(0, YSIZE_PHYS, XSIZE_PHYS);
    7. if (NUM_VSCREENS > 0)
    8. LCD_SetVSizeEx(0, YSIZE_PHYS * NUM_VSCREENS, XSIZE_PHYS);
    9. } else {
    10. LCD_SetSizeEx(0, XSIZE_PHYS, YSIZE_PHYS);
    11. if (NUM_VSCREENS > 0)
    12. LCD_SetVSizeEx(0, XSIZE_PHYS, YSIZE_PHYS * NUM_VSCREENS);
    13. }
    14. cfgFlexColor.FirstCOM = 0;
    15. cfgFlexColor.FirstSEG = 0;
    16. cfgFlexColor.NumDummyReads = 1;
    17. cfgFlexColor.Orientation = DISPLAY_ORIENTATION;
    18. cfgFlexColor.RegEntryMode = 0;
    19. GUIDRV_FlexColor_Config(pDevice, &cfgFlexColor);
    20. PortAPI.pfWrite16_A0 = LCD_X_8080_16_Write00_16;
    21. PortAPI.pfWrite16_A1 = LCD_X_8080_16_Write01_16;
    22. PortAPI.pfWriteM16_A1 = LCD_X_8080_16_WriteM01_16;
    23. PortAPI.pfReadM16_A1 = LCD_X_8080_16_ReadM01_16;
    24. GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66709, GUIDRV_FLEXCOLOR_M16C0B16);
    Display All


    I think I have configured a 16-bits bus width and 16-bits bits per pixel, but I'm not sure the driver is really using the controller in 16-bits mode.

    I called GUI_DrawBitmap() with a 1x1 pixel image with alpha-channel. The driver correctly tries to read back the pixel value from the controller, before writing the correct color.
    I monitored the _RD signal of controller with oscilloscope and I saw three strobes: one dummy read and two real read operations... only for 1 pixel.

    Why the driver reads 2 real 16-bits words for only 1 pixel in 16-bits interface mode? It seems it is working in 18-bits mode (MDT[1:0]=”00”).