Hello everybody,
I'm having some troubles to make a custom board with a 2" display (ST7789V display controller) work properly.
I'm using a custom board with an STM32F401RET6 with STemWin 5.4401.
I manage to configure the system and get to a point where I can almost see on the screen what I was expecting.
To test the configuration I'm using the "_DrawPolygons" example
On the STemWin configuration side:
Display All
On the controller side, among all the configuration registers that I set at the beginning, it is possible to select the pixel color interface format
Using the 16BPP (565) I get the correct polygons color but the text is blurry (random pixels are display instead of the text).
Using the 18BPP (666) I get the correct text visualization but the polygons are badly visualized (cut in half and with grey colors).
A note from the ST7789V datasheet is:
The Command 3Ah (CMD_COLMOD) should be set at 55h when writing 16-bit/pixel data into frame memory, but 3Ah should be
re-set to 66h when reading pixel data from frame memory.
I'm not sure on how to use this note, I'm only setting that registry at the beginning but it looks like the 8080 8 bit parallel functions that I use are correct as in one case the text is shown correctly.
How can I make it work correctly or what should I check on my configuration?
Thanks a lot.
Mark
I'm having some troubles to make a custom board with a 2" display (ST7789V display controller) work properly.
I'm using a custom board with an STM32F401RET6 with STemWin 5.4401.
I manage to configure the system and get to a point where I can almost see on the screen what I was expecting.
To test the configuration I'm using the "_DrawPolygons" example
On the STemWin configuration side:
Source Code
- void LCD_X_Config(void)
- {
- GUI_DEVICE * pDevice;
- CONFIG_FLEXCOLOR Config = {0};
- GUI_PORT_API PortAPI = {0};
- //
- // Set display driver and color conversion
- //
- pDevice = GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, GUICC_M565, 0, 0);
- //
- // Display driver configuration, required for Lin-driver
- //
- LCD_SetSizeEx (0, XSIZE_PHYS , YSIZE_PHYS);
- LCD_SetVSizeEx(0, VXSIZE_PHYS, VYSIZE_PHYS);
- //
- // Configuration
- //
- /* Orientation possible values
- GUI_MIRROR_X: Mirroring X-axis
- GUI_MIRROR_Y: Mirroring Y-axis
- GUI_SWAP_XY: Swapping X and Y axis
- */
- #if DISPLAY_CONFIG_PORTRAIT
- Config.Orientation = GUI_MIRROR_X;
- #elif DISPLAY_CONFIG_LANDSCAPE
- Config.Orientation = GUI_SWAP_XY|GUI_MIRROR_X;
- #endif
- #if (NUM_BUFFERS > 1)
- GUI_MULTIBUF_ConfigEx(0, NUM_BUFFERS);
- #endif
- GUIDRV_FlexColor_Config(pDevice, &Config);
- //
- // Set controller and operation mode
- //
- PortAPI.pfWrite8_A0 = LcdWriteReg;
- PortAPI.pfWrite8_A1 = LcdWriteData;
- PortAPI.pfWriteM8_A1 = LcdWriteDataMultiple;
- PortAPI.pfReadM8_A1 = LcdReadDataMultiple;
- GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66709, GUIDRV_FLEXCOLOR_M16C0B8);
- }
On the controller side, among all the configuration registers that I set at the beginning, it is possible to select the pixel color interface format
Using the 16BPP (565) I get the correct polygons color but the text is blurry (random pixels are display instead of the text).
Using the 18BPP (666) I get the correct text visualization but the polygons are badly visualized (cut in half and with grey colors).
A note from the ST7789V datasheet is:
The Command 3Ah (CMD_COLMOD) should be set at 55h when writing 16-bit/pixel data into frame memory, but 3Ah should be
re-set to 66h when reading pixel data from frame memory.
I'm not sure on how to use this note, I'm only setting that registry at the beginning but it looks like the 8080 8 bit parallel functions that I use are correct as in one case the text is shown correctly.
How can I make it work correctly or what should I check on my configuration?
Thanks a lot.
Mark