cancel
Showing results for 
Search instead for 
Did you mean: 

Update screen during blanking period(LTDC)

FLuba.1
Senior

Problem: when i call the function "MX_TouchGFX_Process();" the screen becomes unstable. After using this function, the image becomes and remains stable. (1)What can be the issue?

How can i update the screen during blanking period, when the LTDC is not fetching? AN4861 cites the following on page 37(see pictures below): 

FLuba1_0-1750330264213.png

To update the screen during blanking period, I'have tried the following code, but doesn't work, the RRIF flag doesn't set(RRIEN is enabled), sometimes it only sets one time, when calling the function for a second time, (2)does someone have a better code or correction of my code? I can't find example codes about this. My code:

 

void vGenfuncScreenUpdate1( LTDC_HandleTypeDef *hltdc  )
  {
	  HAL_LTDC_Reload(hltdc, LTDC_RELOAD_VERTICAL_BLANKING);
//	  __HAL_LTDC_ENABLE_IT(hltdc, LTDC_IT_RR);

	  while( __HAL_LTDC_GET_FLAG(hltdc, LTDC_FLAG_RR) == 0U )
	  {
	       //wait here
//	  	printf(" waiting, %lu \r\n", __HAL_LTDC_GET_FLAG(hltdc, LTDC_FLAG_RR) );
	  }
	  	printf(" waiting Done \r\n" );

	  	MX_TouchGFX_Process();//update screen
	  	__HAL_LTDC_CLEAR_FLAG(hltdc, LTDC_FLAG_RR);

//	  	printf(" Clearing performed \r\n" );
  }

Other question about "Decrease the images color depth (bpp)", cited in the same AN(application note),

I currently use RGB888, but when switching to RGB565(via STM32CubeMX) some images defined in TouchGFX software aren't visible. (3)How does it come? Remark, RGB setting on TouchGFX designer are still RGB888. With this change i don't have any instability anymore when calling the function "MX_TouchGFX_Process();".

(4)When using RGB565 instead of RGB888(by changing configuration of mcu via .IOC or stm32cubemx in LTDC layer settings), must the configuration in TouchGFX also be changed? See picture of configuration menu in TouchGFX designer here below.

FLuba1_1-1750331132404.png

 

I use the software STM32CubeIDE 1.11.2, TouchGFX 4.21.1 Environment, STM32L4P5ZGT6P, my LCD screen is a 24 bit RGB 480*272 .I hope someone could help me. 

 

0 REPLIES 0