2018-07-04 06:50 AM
2018-07-04 12:56 PM
2018-07-05 01:12 AM
thanks, but even with
HAL_LTDC_ProgramLineEvent(&hltdc, 0);
screen stays black.
2018-07-05 04:58 AM
It seems like there was (or still is?) something wrong with the LTDC / DSIHOST configuration. If I use following functions from the BSP driver it looks like attached screenshot:
void MX_LCD_Init(void) {
uint8_t lcd_status = BSP_LCD_Init(); while (lcd_status != LCD_OK); BSP_LCD_LayerDefaultInit(LTDC_ACTIVE_LAYER_BACKGROUND, LCD_FB_START_ADDRESS); /* Select the LCD Background Layer */ BSP_LCD_SelectLayer(LTDC_ACTIVE_LAYER_BACKGROUND); /* Clear the Background Layer */ BSP_LCD_Clear(LCD_COLOR_WHITE); BSP_LCD_SetTransparency(LTDC_ACTIVE_LAYER_BACKGROUND, 255);}
void GRAPHICS_MainTask(void) {
/* USER CODE BEGIN GRAPHICS_MainTask */ /* User can implement his graphic application here */ /* Hello Word example */// GUI_Clear(); GUI_SetColor(GUI_WHITE); GUI_SetFont(&GUI_Font32_1); GUI_DispStringAt(''Hello world!'', (LCD_GetXSize() - 150) / 2, (LCD_GetYSize() - 20) / 2);/* USER CODE END GRAPHICS_MainTask */ while(1){ GUI_Delay(100);}}But something is still wrong...
2018-07-05 08:58 AM
Drawing circles is working as expected. Maybe something is wrong with the fonts...
Edit: But GUI_SetBkColor() is not working too and if I call GUI_Clear() nothing is working after it, screen stays black...
2018-07-05 11:08 AM
Try
// GUI_SetFont(&GUI_Font32_1);
2018-07-06 01:17 AM
Okay, I nearly got it.. If I set color values without alpha value like GUI_SetColor(0xFF0000) (color gets blue) everything work like expected, If I set color like GUI_SetColor(0xFFFF0000) I get something like in the screenshot above. So alpha is not working and instead of ARGB it's BGR. In STemWin configuration pixel format is set to ARGB_8888, so I think something with the Layer configuration of the BSP driver is wrong...