Skip to main content
MPast.1
Senior
February 13, 2025
Question

glitch on Scrollable Container with list layout

  • February 13, 2025
  • 2 replies
  • 824 views

Hi everybody,

I have some screens where is present a scrollable container and listLayout like child to generale a scrollable list (in other words a vertical menu) (see the video).

Everytime I scroll Up e Down the container a glitch compare in the middle of screen like a horizontal black line.

The project has a lot of screen but I don't have any other problems with transictions or other objects.

Only with scroll container in every page their are present..

I'm using a custom board with an STM32H743VIT6 and a 16bit RGB display. connected on LTDC.

(all graphic assets are placed into an external QSPI memory )

I tried to disable DMA2D, Dcache, I change the clock of LTDC  but without success.

 

Does someone has some ideas? some suggestion?

Thanks in advance

2 replies

MPast.1
MPast.1Author
Senior
March 4, 2025

I solved this problem: is not a problem caused by TouchGFX,LTDC or STM32.

It was caused by a "***" LCD that require a lot of parameters to manage it: some of them was setted wrong by myself.

After the correction everything works perfectly.

ferro
Lead
March 4, 2025

Hi @MPast.1 

 

"After the correction everything works perfectly."

Could you possible share what (combination of) parameters were to blame ? I am observing a similar glitch on my display.

 

Thanks

MPast.1
MPast.1Author
Senior
March 5, 2025

My project is composed a display that has st7796 controller. This display (with integrated controlled) by default start working on SPI and not on RGB parallel lines.

So I need to

the original init:

	// Command Set Control - enable command 2 part I
	LCD_IO_WriteCmd(ST7796_CSCON);
	LCD_IO_WriteData(0xC3);
	// Command Set Control - enable command 2 part II
	LCD_IO_WriteCmd(ST7796_CSCON);
	LCD_IO_WriteData(0x96);

	// Interface Mode Control
	LCD_IO_WriteCmd(ST7796_IFMODE);
	LCD_IO_WriteData(0x82);

	// Display Inversion Control
	LCD_IO_WriteCmd(ST7796_INVCTR);
	LCD_IO_WriteData(0x01);


	// Display Function Control
	LCD_IO_WriteCmd(ST7796_DFUNCTR);
	LCD_IO_WriteData(0x20);
	LCD_IO_WriteData(0x02);
	LCD_IO_WriteData(0x3B);
	
	
	if (Orientation == PORTRAIT_0)			// display TOP = NTC probe Side
	{
		GT911.Orientation = PORTRAIT_0;
		LCD_IO_WriteCmd(ST7796_MADCTL);
		LCD_IO_WriteData(0x48);				//48
	}

	if (Orientation == PORTRAIT_180)			// display TOP = smartcard side
	{
		GT911.Orientation = PORTRAIT_180;
		LCD_IO_WriteCmd(ST7796_MADCTL);
		LCD_IO_WriteData(0x88);
	}

//	// Display Function Control
//	LCD_IO_WriteCmd(ST7796_BPC);
//	LCD_IO_WriteData(0x0D);		// vertical front porch period
//	LCD_IO_WriteData(0x04);		// vertical back porch period
//	LCD_IO_WriteData(0x00);
//	LCD_IO_WriteData(0x1E);		// horizontal back porch period (30pixel)


//	//Power Control 1
//	LCD_IO_WriteCmd(ST7796_PWCTR1);
//	LCD_IO_WriteData(0xF0);
//	LCD_IO_WriteData(0x35);
//
//	// Power Control 2
//	LCD_IO_WriteCmd(ST7796_PWCTR2);
//	LCD_IO_WriteData(0x15);

	// Power Control 3
	LCD_IO_WriteCmd(ST7796_PWCTR3);
	LCD_IO_WriteData(0xA7);

//	LCD_IO_WriteCmd(0xC3);
//	LCD_IO_WriteData(0x09);

	// VCOM Control
	LCD_IO_WriteCmd(ST7796_VMCTR1);
	LCD_IO_WriteData(0x25);

	// Vcom Offset Register
	LCD_IO_WriteCmd(ST7796_VCM);
	LCD_IO_WriteData(0x00);


	// negative gamma control
	LCD_IO_WriteCmd(0xE8);
	LCD_IO_WriteData(0x40);
	LCD_IO_WriteData(0x82);
	LCD_IO_WriteData(0x07);
	LCD_IO_WriteData(0x18);
	LCD_IO_WriteData(0x27);
	LCD_IO_WriteData(0x0a);
	LCD_IO_WriteData(0xb6);
	LCD_IO_WriteData(0x33);

	// positive gamma control
	LCD_IO_WriteCmd(ST7796_GMCTRP1);	//0xE0
	LCD_IO_WriteData(0xD0);
	LCD_IO_WriteData(0x04);
	LCD_IO_WriteData(0x0D);
	LCD_IO_WriteData(0x11);
	LCD_IO_WriteData(0x13);
	LCD_IO_WriteData(0x2B);
	LCD_IO_WriteData(0x3F);
	LCD_IO_WriteData(0x54);
	LCD_IO_WriteData(0x4C);
	LCD_IO_WriteData(0x18);
	LCD_IO_WriteData(0x0D);
	LCD_IO_WriteData(0x0B);
	LCD_IO_WriteData(0x1F);
	LCD_IO_WriteData(0x23);

	// negative gamma control
	LCD_IO_WriteCmd(ST7796_GMCTRN1);	//0xE1
	LCD_IO_WriteData(0xD0);
	LCD_IO_WriteData(0x04);
	LCD_IO_WriteData(0x0C);
	LCD_IO_WriteData(0x11);
	LCD_IO_WriteData(0x13);
	LCD_IO_WriteData(0x2C);
	LCD_IO_WriteData(0x3F);
	LCD_IO_WriteData(0x44);
	LCD_IO_WriteData(0x51);
	LCD_IO_WriteData(0x2F);
	LCD_IO_WriteData(0x1F);
	LCD_IO_WriteData(0x1F);
	LCD_IO_WriteData(0x20);
	LCD_IO_WriteData(0x23);

	LCD_IO_WriteCmd(ST7796_CSCON);
	LCD_IO_WriteData(0x3C);

	LCD_IO_WriteCmd(ST7796_CSCON);
	LCD_IO_WriteData(0x69);

 

the final init:

 // Command Set Control - enable command 2 part I
	LCD_IO_WriteCmd(ST7796_CSCON);
	LCD_IO_WriteData(0xC3);

	// Command Set Control - enable command 2 part II
	LCD_IO_WriteCmd(ST7796_CSCON);
	LCD_IO_WriteData(0x96);

	if (Orientation == PORTRAIT_0)			
	{
	 GT911.Orientation = PORTRAIT_0;
		LCD_IO_WriteCmd(ST7796_MADCTL);
		LCD_IO_WriteData(0x5C);				
	}

	if (Orientation == PORTRAIT_180)		
	{
		GT911.Orientation = PORTRAIT_180;
		LCD_IO_WriteCmd(ST7796_MADCTL);
		LCD_IO_WriteData(0x48);
	}

	LCD_IO_WriteCmd(ST7796_FRMCTR1);
	LCD_IO_WriteData(0x82);

	// Interface Mode Control
	LCD_IO_WriteCmd(ST7796_IFMODE);
	LCD_IO_WriteData(0x82);

	// Display Inversion Control
	LCD_IO_WriteCmd(ST7796_INVCTR);
	LCD_IO_WriteData(0x00);


	// Display Function Control
	LCD_IO_WriteCmd(ST7796_DFUNCTR);
	LCD_IO_WriteData(0xA0);
	LCD_IO_WriteData(0x60); //0x02
	LCD_IO_WriteData(0x3B);
	
	// Power Control 3
	LCD_IO_WriteCmd(ST7796_PWCTR3);
	LCD_IO_WriteData(0xA7);

	// VCOM Control
	LCD_IO_WriteCmd(ST7796_VMCTR1);
	LCD_IO_WriteData(0x25);

	// Vcom Offset Register
	LCD_IO_WriteCmd(ST7796_VCM);
	LCD_IO_WriteData(0x00);


	// Display Output Ctrl Adjust
	LCD_IO_WriteCmd(0xE8);
	LCD_IO_WriteData(0x40);
	LCD_IO_WriteData(0x8A);
	LCD_IO_WriteData(0x00);
	LCD_IO_WriteData(0x00);
	LCD_IO_WriteData(0x29);
	LCD_IO_WriteData(0x19);
	LCD_IO_WriteData(0xA5);
	LCD_IO_WriteData(0x33);

	// positive gamma control
	LCD_IO_WriteCmd(ST7796_GMCTRP1);	//0xE0
	LCD_IO_WriteData(0xD0);
	LCD_IO_WriteData(0x04);
	LCD_IO_WriteData(0x0D);
	LCD_IO_WriteData(0x11);
	LCD_IO_WriteData(0x13);
	LCD_IO_WriteData(0x2B);
	LCD_IO_WriteData(0x3F);
	LCD_IO_WriteData(0x54);
	LCD_IO_WriteData(0x4C);
	LCD_IO_WriteData(0x18);
	LCD_IO_WriteData(0x0D);
	LCD_IO_WriteData(0x0B);
	LCD_IO_WriteData(0x1F);
	LCD_IO_WriteData(0x23);

	// negative gamma control
	LCD_IO_WriteCmd(ST7796_GMCTRN1);	//0xE1
	LCD_IO_WriteData(0xD0);
	LCD_IO_WriteData(0x04);
	LCD_IO_WriteData(0x0C);
	LCD_IO_WriteData(0x11);
	LCD_IO_WriteData(0x13);
	LCD_IO_WriteData(0x2C);
	LCD_IO_WriteData(0x3F);
	LCD_IO_WriteData(0x44);
	LCD_IO_WriteData(0x51);
	LCD_IO_WriteData(0x2F);
	LCD_IO_WriteData(0x1F);
	LCD_IO_WriteData(0x1F);
	LCD_IO_WriteData(0x20);
	LCD_IO_WriteData(0x23);





	LCD_IO_WriteCmd(ST7796_CSCON);
	LCD_IO_WriteData(0x3C);

	LCD_IO_WriteCmd(ST7796_CSCON);
	LCD_IO_WriteData(0x69);

 

the big problem was :

// Display Function Control
	LCD_IO_WriteCmd(ST7796_DFUNCTR);
	LCD_IO_WriteData(0x20);
	LCD_IO_WriteData(0x02);
	LCD_IO_WriteData(0x3B);

the data generated by LTDC was sent to internal ST7796 controller registers instead of sent to display directly. This problem caused glitches: the original mode was not fast enough

 

 

 

farukisiker
Associate III
March 6, 2025

Making container cachable can increase performance. And, do not forget clear cache area if you are using MPU.