Hello,
I'm setting up a GUI application sample with STemWin on a custom board with an STM32F401 microcontroller which controls a display that mounts its controller (ST7789v) and I've managed to print on a screen the classic "Hello world" example.
The board doesn't have any external RAM for frame buffering so only the available memory is the internal RAM (about 64KB, it will only be used for the libraries, not enough space for a complete frame) and the internal display device memory.
Since the display controller is communicating with Intel 8080 I have setup the LCD_X_Config as:
Display All
With the implementation of the top level functions:
Display All
And the lower level functions which basically control the pins of the interface (DCX, CS, WRX, Data).
First frame is shown correctly on the display and it takes a very short time to draw the entire page.
The problem arises when I want to change something or when I simply want to change the color of the background like:
This leads to a very slow refresh of the page with a visible redrawing of the display from the top to the bottom (it takes a couple of seconds).
Is it possible to improve this behavior (am I missing something?) and which is the best solution to develop a GUI with different pages for targets with no frame buffer like this?
Thank you!
Mark
I'm setting up a GUI application sample with STemWin on a custom board with an STM32F401 microcontroller which controls a display that mounts its controller (ST7789v) and I've managed to print on a screen the classic "Hello world" example.
The board doesn't have any external RAM for frame buffering so only the available memory is the internal RAM (about 64KB, it will only be used for the libraries, not enough space for a complete frame) and the internal display device memory.
Since the display controller is communicating with Intel 8080 I have setup the LCD_X_Config as:
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);
- //
- // Orientation
- //
- #if (NUM_BUFFERS > 1)
- GUI_MULTIBUF_ConfigEx(0, NUM_BUFFERS);
- #endif
- GUIDRV_FlexColor_Config(pDevice, &Config);
- //
- // Set controller and operation mode
- //
- PortAPI.pfWrite16_A0 = LcdWriteReg;
- PortAPI.pfWrite16_A1 = LcdWriteData;
- PortAPI.pfWriteM16_A1 = LcdWriteDataMultiple;
- PortAPI.pfReadM16_A1 = LcdReadDataMultiple;
- GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66709, GUIDRV_FLEXCOLOR_M16C0B16);
- }
With the implementation of the top level functions:
Source Code
- /********************************************************************
- *
- * LcdWriteReg
- *
- * Function description:
- * Sets display register
- */
- static void LcdWriteReg(U16 Data)
- {
- LCD_X_8080_16_Write00_16(Data);
- }
- /********************************************************************
- *
- * LcdWriteData
- *
- * Function description:
- * Writes a value to a display register
- */
- static void LcdWriteData(U16 Data)
- {
- LCD_X_8080_16_Write01_16(Data);
- }
- /********************************************************************
- *
- * LcdWriteDataMultiple
- *
- * Function description:
- * Writes multiple values to a display register.
- */
- static void LcdWriteDataMultiple(U16 * pData, int NumItems)
- {
- while (NumItems--)
- {
- LCD_X_8080_16_WriteM01_16(pData, NumItems);
- pData++;
- }
- }
- /********************************************************************
- *
- * LcdReadDataMultiple
- *
- * Function description:
- * Reads multiple values from a display register.
- */
- static void LcdReadDataMultiple(U16 * pData, int NumItems)
- {
- while (NumItems--)
- {
- LCD_X_8080_16_ReadM01_16(pData, NumItems);
- pData++;
- }
- }
First frame is shown correctly on the display and it takes a very short time to draw the entire page.
The problem arises when I want to change something or when I simply want to change the color of the background like:
This leads to a very slow refresh of the page with a visible redrawing of the display from the top to the bottom (it takes a couple of seconds).
Is it possible to improve this behavior (am I missing something?) and which is the best solution to develop a GUI with different pages for targets with no frame buffer like this?
Thank you!
Mark