Skip to main content
MYous.8
Associate
November 18, 2020
Question

Is Stm32f769IIT feasible with ST7701 and NT35510MH LCD IC driver?

  • November 18, 2020
  • 22 replies
  • 8827 views

I'm using DSI in video mode +LTDC in Stm32f769IITX to interface with LCD driver "ST7701"

and i am facing problems to display an image even i followed the manufacturer initialization sequence. so, i contacted with the the "ST7701" supplier which said that "STM mcu is not compatible with lcd driver "ST7701" ,"NT35510MH" as well.

This topic has been closed for replies.

22 replies

JMD
Associate II
July 31, 2021

Hello everyone,

By using LCD_DSI_VideoMode_SingleBuffer of STM32F769I_DISCOVERY with a MIPI adapter and with a homemade adapter and by changing INIT LCD by the one provided by ari_v2 I am able to use my 480*480 LCD screen with ST7701 controller. I don't have any issue when I blink image link in the demo. I will try soon with TouchGFX.

So ST7701 seems to be compatible with STM32F769I

Best regards,

0693W00000D1BxrQAF.jpg 

0693W00000D1BxmQAF.jpg

ari_v2
Senior
July 31, 2021

Hi Julian,

Waiting to hear how it goes with TouchGFX. The artefacts I see are most noticed upon changing between screens with graphics.

Besides changing size of screen what other parameters did you need to change in lcd init?

Thanks,

Ar

JMD
Associate II
August 1, 2021

Hi,

The artefacts I see are most noticed upon changing between screens with graphics.

For the moment I can't see any artefacts when I switch a picture in the middle of the screen in a loop like in the example so I hope I will obtain the same with TouchGfx.

I don't change anything else except initLcd and replace 480*800 by 480*480 it was unbelievable, I use all default setting, same frequency of the DSI discovery board example and video settings.

 /* The following values are same for portrait and landscape orientations */

 VSA = OTM8009A_480X800_VSYNC;    /* 12 */

 VBP = OTM8009A_480X800_VBP;     /* 12 */

 VFP = OTM8009A_480X800_VFP;     /* 12 */

 HSA = OTM8009A_480X800_HSYNC;    /* 63 */

 HBP = OTM8009A_480X800_HBP;     /* 120 */

 HFP = OTM8009A_480X800_HFP;     /* 120 */  

 hdsivideo_handle.VirtualChannelID = LCD_OTM8009A_ID;

 hdsivideo_handle.ColorCoding = LCD_DSI_PIXEL_DATA_FMT_RBG888;

 hdsivideo_handle.VSPolarity = DSI_VSYNC_ACTIVE_HIGH;

 hdsivideo_handle.HSPolarity = DSI_HSYNC_ACTIVE_HIGH;

 hdsivideo_handle.DEPolarity = DSI_DATA_ENABLE_ACTIVE_HIGH;  

 hdsivideo_handle.Mode = DSI_VID_MODE_BURST; /* Mode Video burst ie : one LgP per line */

 hdsivideo_handle.NullPacketSize = 0xFFF;

 hdsivideo_handle.NumberOfChunks = 0;

 hdsivideo_handle.PacketSize        = HACT; /* Value depending on display orientation choice portrait/landscape */ 

 hdsivideo_handle.HorizontalSyncActive   = (HSA * laneByteClk_kHz)/LcdClock;

 hdsivideo_handle.HorizontalBackPorch    = (HBP * laneByteClk_kHz)/LcdClock;

 hdsivideo_handle.HorizontalLine      = ((HACT + HSA + HBP + HFP) * laneByteClk_kHz)/LcdClock; /* Value depending on display orientation choice portrait/landscape */

 hdsivideo_handle.VerticalSyncActive    = VSA;

 hdsivideo_handle.VerticalBackPorch     = VBP;

 hdsivideo_handle.VerticalFrontPorch    = VFP;

 hdsivideo_handle.VerticalActive      = VACT; /* Value depending on display orientation choice portrait/landscape */

Please find attached a full project working on the discovery board for reference.

I will try TouchGfx in next days, I will keep you informed.

Best regards,

Julien.

ari_v2
Senior
August 11, 2021

Hi Julien,

Did you try it with TouchGFX? Do you get screen transitions with no artifacts?

Thanks you

Ari

JMD
Associate II
August 13, 2021

Hi,

Sorry for my late answer I was in holiday, but I have a good news I just finish my tests.

I create from scratch an empty project to use TouchGfx and I don't have any issue.

I make a clock and a swipe zone and I can see any artefact.

I am about 5 ms per frame is really fast.

In this implementation SDRAM is on 32 bits bus size/

Even if it is only single buffer implementation, I can't see anything wrong.

I am on video mode and frame is changed by LTDC interrupt.

I test lot of combination of widgets and I can't see any issue.

To avoid any artefact :

  • Check your sdram frequency and MCU frequency
  • Check your SDRAM bus size
  • Use double buffering
  • Disable caching by using MPU
  • Deactivate speculative cache access to first FMC bank to save FMC bandwidth (FMC_Bank1->BTCR[0] = 0x000030D2; st recommendation)

0693W00000D2SRuQAN.jpg0693W00000D2SRkQAN.jpgBest regards,

Julien.

ari_v2
Senior
August 17, 2021
Hi Julien, Thank you for information. I suspect I have hardware problems. If anything interesting arises I’ll inform. Regards Ari Hi, Sorry for my late answer I was in holiday, but I have a good news I just finish my tests. I create from scratch an empty project to use TouchGfx and I don't have any issue. I make a clock and a swipe zone and I can seen any artefact. I am about 5ms per frame is is really fast. In this implementation SDRAM is on 32 bits bus size/ Event if it is only single buffer implementation I can't see anything wrong. I am on video mode and frame is changed by LTDC interrupt. I test lot of combinaison of widget and I can't see any issue To avoid any artefact : - Check your sdram frequency and MCU frequency - Check your SDRAM bus size - Use double buffering - Disable caching by using MPU - Deativate speculative cache access to first FMC bank to save FMC bandwidth (FMC_Bank1->BTCR[0] = 0x000030D2; st recommendation) [Image: Screen 2] [Image: First screen] Best regards, Julien. [https://community.st.com/img/userprofile/default_profile_45_v2.png?fromEmail=1]<> JMD<> (Community Member) Hi, Sorry for my late answer I was in holiday, but I have a good news I just finish my tests. I create from scratch an empty project to use TouchGfx and I don't have any issue. I make a clock and a swipe zone and I can seen any artefact. I am about 5ms per frame is is really fast. In this implementation SDRAM is on 32 bits bus size/ Event if it is only single buffer implementation I can't see anything wrong. I am on video mode and frame is changed by LTDC interrupt. I test lot of combinaison of widget and I can't see any issue To avoid any artefact : * Check your sdram frequency and MCU frequency * Check your SDRAM bus size * Use double buffering * Disable caching by using MPU * Deativate speculative cache access to first FMC bank to save FMC bandwidth (FMC_Bank1->BTCR[0] = 0x000030D2; st recommendation) [Image placeholder for Screen 2] Screen 2 [Image placeholder for First screen] First screen Best regards, Julien. [View/Answer] or reply to this email Replying to [https://community.st.com/ncsphoto/nB_Ih0Cft57DmeO0Dir2cSDx1zndr5T61w5O7UWyoc9t3lU2Z2P0DiDB9zHVIh7A?fromEmail=1]<> MYous.8<> (Community Member) asked a question. Wednesday, November 18, 2020 2:20 PM<> Is Stm32f769IIT feasible with ST7701 and NT35510MH LCD IC driver? I'm using DSI in video mode +LTDC in Stm32f769IITX to interface with LCD driver "ST7701" and i am facing problems to display an image even i followed the manufacturer initialization sequence. so, i contacted with the the "ST7701" supplier which said that "STM mcu is not compatible with lcd driver "ST7701" ,"NT35510MH" as well. [https://community.st.com/img/userprofile/default_profile_45_v2.png?fromEmail=1]<> JMD<> (Community Member) Hi, Sorry for my late answer I was in holiday, but I have a good news I just finish my tests. I create from scratch an empty project to use TouchGfx and I don't have any issue. I make a clock and a swipe zone and I can seen any artefact. I am about 5ms per frame is is really fast. In this implementation SDRAM is on 32 bits bus size/ Event if it is only single buffer implementation I can't see anything wrong. I am on video mode and frame is changed by LTDC interrupt. I test lot of combinaison of widget and I can't see any issue To avoid any artefact : * Check your sdram frequency and MCU frequency * Check your SDRAM bus size * Use double buffering * Disable caching by using MPU * Deativate speculative cache access to first FMC bank to save FMC bandwidth (FMC_Bank1->BTCR[0] = 0x000030D2; st recommendation) [Image placeholder for Screen 2] Screen 2 [Image placeholder for First screen] First screen Best regards, Julien. Friday, August 13, 2021 9:43 PM<> You're receiving emails when someone "Comments after me." To change or turn off ST Community email, log in<> as ari_v@otiglobal.com.st. Are notifications about this post getting annoying? Reply to this email with the word " mute ". STMicroelectronics N.V. [ST Community]
JMD
Associate II
August 20, 2021

Hello,

@ari_v2​ I have an issue (artefact) and enabling double buffering is not enougth.

I reduce my pixel clock (and adapt my LTDC).

My pixel clock is now 13.71 Mhz with and external SDRAM without any issue.

So I confirm to everyone that ST7701 work well on STM32F779 and STM32F769.

 i contacted with the the "ST7701" supplier which said that "STM mcu is not compatible with lcd driver "ST7701" ,"NT35510MH" as well.

This affirmation is clearly wrong

Best regards.

Julien.

ari_v2
Senior
August 22, 2021
Hi, Thanks. good news. Could you please share the mxcube file and relevant files for lcd setup? I use the stm32f469. Do you think performance could differ in the lcd aspect? Thanks for update. Ari נשלח מסמ�?רטפון ה-Samsung Galaxy שלי. -------- הודעה מקורית -------- מ�?ת: ST Community ת�?ריך: 20/08/2021 19:01 (GMT+02:00) �?ל: Ari Vigdor נוש�?: JMD mentioned you in an answer to: Is Stm32f769IIT feasible with ST7701 and NT35510MH LCD IC driver? Hello, @ari_v2​ I have an issue (artefact) and enabling double buffering is not enougth. I reduce my pixel clock (and adapt my LTDC). My pixel clock is now 13.71 Mhz with and external SDRAM without any issue. So I confirm to everyone that ST7701 work well on STM32F779 and STM32F769. i contacted with the the "ST7701" supplier which said that "STM mcu is not compatible with lcd driver "ST7701" ,"NT35510MH" as well. Best regards. Julien. [https://community.st.com/img/userprofile/default_profile_45_v2.png?fromEmail=1]<> JMD<> (Community Member) Hello, @ari_v2<> (Community Member)​ I have an issue (artefact) and enabling double buffering is not enougth. I reduce my pixel clock (and adapt my LTDC). My pixel clock is now 13.71 Mhz with and external SDRAM without any issue. So I confirm to everyone that ST7701 work well on STM32F779 and STM32F769. i contacted with the the "ST7701" supplier which said that "STM mcu is not compatible with lcd driver "ST7701" ,"NT35510MH" as well. Best regards. Julien. View/Answer<> or reply to this email Replying to [https://community.st.com/ncsphoto/nB_Ih0Cft57DmeO0Dir2cSDx1zndr5T61w5O7UWyoc9t3lU2Z2P0DiDB9zHVIh7A?fromEmail=1]<> MYous.8<> (Community Member) asked a question. Wednesday, November 18, 2020 2:20 PM<> Is Stm32f769IIT feasible with ST7701 and NT35510MH LCD IC driver? I'm using DSI in video mode +LTDC in Stm32f769IITX to interface with LCD driver "ST7701" and i am facing problems to display an image even i followed the manufacturer initialization sequence. so, i contacted with the the "ST7701" supplier which said that "STM mcu is not compatible with lcd driver "ST7701" ,"NT35510MH" as well. [https://community.st.com/img/userprofile/default_profile_45_v2.png?fromEmail=1]<> JMD<> (Community Member) Hello, @ari_v2<> (Community Member)​ I have an issue (artefact) and enabling double buffering is not enougth. I reduce my pixel clock (and adapt my LTDC). My pixel clock is now 13.71 Mhz with and external SDRAM without any issue. So I confirm to everyone that ST7701 work well on STM32F779 and STM32F769. i contacted with the the "ST7701" supplier which said that "STM mcu is not compatible with lcd driver "ST7701" ,"NT35510MH" as well. Best regards. Julien. Friday, August 20, 2021 7:01 PM<> You're receiving emails when someone "Mentions me in a comment." To change or turn off ST Community email, log in<> as ari_v@otiglobal.com.st. STMicroelectronics N.V. [ST Community]
JMD
Associate II
August 23, 2021

Hello,

I don't use CUBE MX for LTDC I generate my project with LTDC to enable TouchGFX but timing are wrong in cubemx.

But you can see here revelant code.

You need to adapt your Pixel clock with your screen resolution to have the frame rate expected.

The LCD_ST7701_Init() function is your function with adapted value for my specific screen.

Please find attached full project with cubeMx, CubeIde Project and TouchGfxProject.

Best regards,

Julien.

void LCD_Init(){
	DSI_PLLInitTypeDef dsiPllInit;
	RCC_PeriphCLKInitTypeDef PeriphClkInitStruct;
	DSI_VidCfgTypeDef VidCfg = {0};
 
	//uint32_t LcdClock = 27429; /*!< LcdClk = 27429 kHz => To fast more than 120 FPS with 480*480 screen*/
	uint32_t LcdClock = 13714; /*!< LcdClk = 13714 kHz */
 
 
	uint32_t laneByteClk_kHz = 62500; /* 500 MHz / 8 = 62.5 MHz = 62500 kHz */
	uint32_t VSA = 1; /*!< Vertical start active time in units of lines */
	uint32_t VBP = 15; /*!< Vertical Back Porch time in units of lines */
	uint32_t VFP = 16; /*!< Vertical Front Porch time in units of lines */
	uint32_t VACT = GUI_HEIGHT ; /*!< Vertical Active time in units of lines = imageSize Y in pixels to display */
	uint32_t HSA = 2; /*!< Horizontal start active time in units of lcdClk */
	uint32_t HBP = 34; /*!< Horizontal Back Porch time in units of lcdClk */
	uint32_t HFP = 34; /*!< Horizontal Front Porch time in units of lcdClk */
	uint32_t HACT = GUI_WIDTH; /*!< Horizontal Active time in units of lcdClk = imageSize X in pixels to display */
 
	/* Toggle Hardware Reset of the DSI LCD using
	* its XRES signal (active low) */
	Lcd_Reset();
 
	/* Call first MSP Initialize only in case of first initialization
	* This will set IP blocks LTDC, DSI and DMA2D
	* - out of reset
	* - clocked
	* - NVIC IRQ related to IP blocks enabled
	*/
	LCD_MspInit();
 
	/*************************DSI Initialization***********************************/
 
	/* Base address of DSI Host/Wrapper registers to be set before calling De-Init */
	hdsi.Instance = DSI;
 
	HAL_DSI_DeInit(&(hdsi));
 
	dsiPllInit.PLLNDIV = 100;
	dsiPllInit.PLLIDF = DSI_PLL_IN_DIV5;
	dsiPllInit.PLLODF = DSI_PLL_OUT_DIV1;
 
	/* Set number of Lanes */
	hdsi.Init.NumberOfLanes = DSI_TWO_DATA_LANES;
 
	/* TXEscapeCkdiv = f(LaneByteClk)/15.62 = 4 */
	hdsi.Init.TXEscapeCkdiv = 4;
	//hdsi.Init.TXEscapeCkdiv = laneByteClk_kHz/15620;
 
	HAL_DSI_Init(&(hdsi), &(dsiPllInit));
 
	//To allow read
	//HAL_DSI_ConfigFlowControl(&hdsi, DSI_FLOW_CONTROL_BTA);
 
 
	VidCfg.VirtualChannelID = 0;
	VidCfg.ColorCoding = DSI_RGB888;
 
	//probably not used
	VidCfg.VSPolarity = DSI_HSYNC_ACTIVE_HIGH;
	VidCfg.HSPolarity = DSI_VSYNC_ACTIVE_HIGH;
	VidCfg.DEPolarity = DSI_DATA_ENABLE_ACTIVE_HIGH;
 
	VidCfg.LooselyPacked = DSI_LOOSELY_PACKED_DISABLE;
	VidCfg.Mode = DSI_VID_MODE_BURST; /* Mode Video burst ie : one LgP per line */
	VidCfg.NullPacketSize = 0; //0xFFF;
	VidCfg.NumberOfChunks = 0;
 
 
	VidCfg.PacketSize = HACT; /* Value depending on display orientation choice portrait/landscape */
	VidCfg.HorizontalSyncActive = (HSA * laneByteClk_kHz)/LcdClock;
	VidCfg.HorizontalBackPorch = (HBP * laneByteClk_kHz)/LcdClock;
	VidCfg.HorizontalLine = ((HACT + HSA + HBP + HFP) * laneByteClk_kHz)/LcdClock; /* Value depending on display orientation choice portrait/landscape */
	VidCfg.VerticalSyncActive = VSA;
	VidCfg.VerticalBackPorch = VBP;
	VidCfg.VerticalFrontPorch = VFP;
	VidCfg.VerticalActive = VACT; /* Value depending on display orientation choice portrait/landscape */
 
	/* Enable or disable sending LP command while streaming is active in video mode */
	VidCfg.LPCommandEnable = DSI_LP_COMMAND_ENABLE; /* Enable sending commands in mode LP (Low Power) */
 
	/* Largest packet size possible to transmit in LP mode in VSA, VBP, VFP regions */
	/* Only useful when sending LP packets is allowed while streaming is active in video mode */
	VidCfg.LPLargestPacketSize = 16;
 
	/* Largest packet size possible to transmit in LP mode in HFP region during VACT period */
	/* Only useful when sending LP packets is allowed while streaming is active in video mode */
	VidCfg.LPVACTLargestPacketSize = 0;
 
	/* Specify for each region of the video frame, if the transmission of command in LP mode is allowed in this region */
	/* while streaming is active in video mode */
	VidCfg.LPHorizontalFrontPorchEnable = DSI_LP_HFP_ENABLE; /* Allow sending LP commands during HFP period */
	VidCfg.LPHorizontalBackPorchEnable = DSI_LP_HBP_ENABLE; /* Allow sending LP commands during HBP period */
	VidCfg.LPVerticalActiveEnable = DSI_LP_VACT_ENABLE; /* Allow sending LP commands during VACT period */
	VidCfg.LPVerticalFrontPorchEnable = DSI_LP_VFP_ENABLE; /* Allow sending LP commands during VFP period */
	VidCfg.LPVerticalBackPorchEnable = DSI_LP_VBP_ENABLE; /* Allow sending LP commands during VBP period */
	VidCfg.LPVerticalSyncActiveEnable = DSI_LP_VSYNC_ENABLE; /* Allow sending LP commands during VSync = VSA period */
	VidCfg.FrameBTAAcknowledgeEnable = DSI_FBTAA_ENABLE;
 
	/* Configure DSI Video mode timings with settings set above */
	HAL_DSI_ConfigVideoMode(&hdsi, &VidCfg);
	HAL_DSI_SetGenericVCID(&hdsi, 0);
 
	/*************************End DSI Initialization*******************************/
 
 
	/************************LTDC Initialization***********************************/
 
	/* Timing Configuration */
	hltdc.Init.HorizontalSync = (HSA - 1);
	hltdc.Init.AccumulatedHBP = (HSA + HBP - 1);
	hltdc.Init.AccumulatedActiveW = (GUI_WIDTH + HSA + HBP - 1);
	hltdc.Init.TotalWidth = (GUI_WIDTH + HSA + HBP + HFP - 1);
 
	/* Initialize the LCD pixel width and pixel height */
	hltdc.LayerCfg->ImageWidth = GUI_WIDTH;
	hltdc.LayerCfg->ImageHeight = GUI_HEIGHT;
 
	/** LCD clock configuration
	* Note: The following values should not be changed as the PLLSAI is also used
	* to clock the USB FS
	* PLLSAI_VCO Input = HSE_VALUE/PLL_M = 1 Mhz
	* PLLSAI_VCO Output = PLLSAI_VCO Input * PLLSAIN = 384 Mhz
	* PLLLCDCLK = PLLSAI_VCO Output/PLLSAIR = 384 MHz / 7 = 54.85 MHz
	*
	*
	* LTDC clock frequency = PLLLCDCLK / LTDC_PLLSAI_DIVR_2 = 54.85 MHz / 2 = 27.429 MHz => Too fast MCU doesn't have time too draw between frame
	* LTDC clock frequency = PLLLCDCLK / LTDC_PLLSAI_DIVR_4 = 54.85 MHz / 4 = 13.71 MHz
	*/
	PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LTDC;
	PeriphClkInitStruct.PLLSAI.PLLSAIN = 384;
	PeriphClkInitStruct.PLLSAI.PLLSAIR = 7;
	PeriphClkInitStruct.PLLSAIDivR = RCC_PLLSAIDIVR_4;
	HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct);
 
	/* Background value */
	hltdc.Init.Backcolor.Blue = 0;
	hltdc.Init.Backcolor.Green = 0;
	hltdc.Init.Backcolor.Red = 0;
	hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
	hltdc.Instance = LTDC;
 
	/* Get LTDC Configuration from DSI Configuration */
	HAL_LTDC_StructInitFromVideoConfig(&hltdc, &VidCfg);
 
	/* Initialize the LTDC */
	HAL_LTDC_Init(&hltdc);
 
	/* Enable the DSI host and wrapper after the LTDC initialization
	 To avoid any synchronization issue, the DSI shall be started after enabling the LTDC */
	HAL_DSI_Start(&hdsi);
 
	LCD_ST7701_Init();
 
	//To test LTDC
	//HAL_DSI_PatternGeneratorStart(&hdsi, 0, 0);
}