I'm using the following initialization for a ILI9341-based LCD with 16-bits parallel interface:
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”).
C Source Code
- GUI_DEVICE * pDevice;
- GUI_PORT_API PortAPI;
- CONFIG_FLEXCOLOR cfgFlexColor = { 0 };
- pDevice = GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, COLOR_CONVERSION, 0, 0);
- if (DISPLAY_ORIENTATION & GUI_SWAP_XY) {
- LCD_SetSizeEx(0, YSIZE_PHYS, XSIZE_PHYS);
- if (NUM_VSCREENS > 0)
- LCD_SetVSizeEx(0, YSIZE_PHYS * NUM_VSCREENS, XSIZE_PHYS);
- } else {
- LCD_SetSizeEx(0, XSIZE_PHYS, YSIZE_PHYS);
- if (NUM_VSCREENS > 0)
- LCD_SetVSizeEx(0, XSIZE_PHYS, YSIZE_PHYS * NUM_VSCREENS);
- }
- cfgFlexColor.FirstCOM = 0;
- cfgFlexColor.FirstSEG = 0;
- cfgFlexColor.NumDummyReads = 1;
- cfgFlexColor.Orientation = DISPLAY_ORIENTATION;
- cfgFlexColor.RegEntryMode = 0;
- GUIDRV_FlexColor_Config(pDevice, &cfgFlexColor);
- PortAPI.pfWrite16_A0 = LCD_X_8080_16_Write00_16;
- PortAPI.pfWrite16_A1 = LCD_X_8080_16_Write01_16;
- PortAPI.pfWriteM16_A1 = LCD_X_8080_16_WriteM01_16;
- PortAPI.pfReadM16_A1 = LCD_X_8080_16_ReadM01_16;
- GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66709, GUIDRV_FLEXCOLOR_M16C0B16);
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”).