cancel
Showing results for 
Search instead for 
Did you mean: 

SPI, LTDC and TouchGFX init of Adafruit 4" Round LCD HD40015C40-Y

SkeleSt
Associate II

Hi Everyone I have a some difficulties with bringing up the HD40015C40-Y display with TouchGFX or even at all:

1. I used the init code provided by adafruit, I set up my SPI with 9bit words and sent it to the display as per the datasheet for the NV3052CRGB datasheet.

2. TouchGFX is already setup and LTDC is setup to the timings described in the  https://www.adafruit.com/product/5793 init code. 


3. I have very strange rainbow lines behaviour
Currently I am running a 35Mhz clock. The 35Mhz clock was derived from the linux device tree overlay for the HD40015C40-Y display. 

SkeleSt_0-1720762206550.png

 

4. Things I do know: SPI transmission definitely works. There are physical signals for the LTDC pins coming from the STM chip as I checked with an oscilloscope.

 

Interestingly if you read the Circuit Python code from Adafruit, they only have 16Mhz frequency.

I have no idea if this is a software problem, hardware problem or a combination of both. 

 

 

void Wrt_Reg_3052(uint8_t Par1,uint8_t Par2)
{
	// 9 bit mode
	command = 0;
	command|= Par1;

	parameter = 256;
	parameter |= Par1;

	HAL_GPIO_WritePin(CS_PIN_GPIO_Port, CS_PIN_Pin ,GPIO_PIN_RESET);
	HAL_SPI_Transmit(&hspi1, (uint8_t*)&command,1, 1000);
	HAL_SPI_Transmit(&hspi1, (uint8_t*)&parameter,1, 1000);
	HAL_GPIO_WritePin(CS_PIN_GPIO_Port, CS_PIN_Pin, GPIO_PIN_SET);
}
uint8_t NV3051D_Init()
{
	Wrt_Reg_3052(0xFF,0x30);
	Wrt_Reg_3052(0xFF,0x52);
	Wrt_Reg_3052(0xFF,0x01);
	Wrt_Reg_3052(0xE3,0x00);
	Wrt_Reg_3052(0x0A,0x11);
	Wrt_Reg_3052(0x23,0xA0);//A2
	Wrt_Reg_3052(0x24,0x32);
	Wrt_Reg_3052(0x25,0x12);
	Wrt_Reg_3052(0x26,0x2E);
	Wrt_Reg_3052(0x27,0x2E);

	Wrt_Reg_3052(0x29,0x02);
	Wrt_Reg_3052(0x2A,0xCF);
	Wrt_Reg_3052(0x32,0x34);
	Wrt_Reg_3052(0x38,0x9C);
	Wrt_Reg_3052(0x39,0xA7);
	Wrt_Reg_3052(0x3A,0x27);
	Wrt_Reg_3052(0x3B,0x94);
	Wrt_Reg_3052(0x42,0x6D);
	Wrt_Reg_3052(0x43,0x83);
	Wrt_Reg_3052(0x81,0x00);
	Wrt_Reg_3052(0x91,0x67);
	Wrt_Reg_3052(0x92,0x67);
	Wrt_Reg_3052(0xA0,0x52);
	Wrt_Reg_3052(0xA1,0x50);
	Wrt_Reg_3052(0xA4,0x9C);
	Wrt_Reg_3052(0xA7,0x02);
	Wrt_Reg_3052(0xA8,0x02);
	Wrt_Reg_3052(0xA9,0x02);
	Wrt_Reg_3052(0xAA,0xA8);
	Wrt_Reg_3052(0xAB,0x28);
	Wrt_Reg_3052(0xAE,0xD2);
	Wrt_Reg_3052(0xAF,0x02);
	Wrt_Reg_3052(0xB0,0xD2);
	Wrt_Reg_3052(0xB2,0x26);
	Wrt_Reg_3052(0xB3,0x26);
	Wrt_Reg_3052(0xFF,0x30);
	Wrt_Reg_3052(0xFF,0x52);
	Wrt_Reg_3052(0xFF,0x02);
	Wrt_Reg_3052(0xB1,0x0A);
	Wrt_Reg_3052(0xD1,0x0E);
	Wrt_Reg_3052(0xB4,0x2F);
	Wrt_Reg_3052(0xD4,0x2D);
	Wrt_Reg_3052(0xB2,0x0C);
	Wrt_Reg_3052(0xD2,0x0C);
	Wrt_Reg_3052(0xB3,0x30);
	Wrt_Reg_3052(0xD3,0x2A);
	Wrt_Reg_3052(0xB6,0x1E);
	Wrt_Reg_3052(0xD6,0x16);
	Wrt_Reg_3052(0xB7,0x3B);
	Wrt_Reg_3052(0xD7,0x35);
	Wrt_Reg_3052(0xC1,0x08);
	Wrt_Reg_3052(0xE1,0x08);
	Wrt_Reg_3052(0xB8,0x0D);
	Wrt_Reg_3052(0xD8,0x0D);
	Wrt_Reg_3052(0xB9,0x05);
	Wrt_Reg_3052(0xD9,0x05);
	Wrt_Reg_3052(0xBD,0x15);
	Wrt_Reg_3052(0xDD,0x15);
	Wrt_Reg_3052(0xBC,0x13);
	Wrt_Reg_3052(0xDC,0x13);
	Wrt_Reg_3052(0xBB,0x12);
	Wrt_Reg_3052(0xDB,0x10);
	Wrt_Reg_3052(0xBA,0x11);
	Wrt_Reg_3052(0xDA,0x11);
	Wrt_Reg_3052(0xBE,0x17);
	Wrt_Reg_3052(0xDE,0x17);
	Wrt_Reg_3052(0xBF,0x0F);
	Wrt_Reg_3052(0xDF,0x0F);
	Wrt_Reg_3052(0xC0,0x16);
	Wrt_Reg_3052(0xE0,0x16);
	Wrt_Reg_3052(0xB5,0x2E);
	Wrt_Reg_3052(0xD5,0x3F);
	Wrt_Reg_3052(0xB0,0x03);
	Wrt_Reg_3052(0xD0,0x02);
	Wrt_Reg_3052(0xFF,0x30);
	Wrt_Reg_3052(0xFF,0x52);
	Wrt_Reg_3052(0xFF,0x03);
	Wrt_Reg_3052(0x08,0x09);
	Wrt_Reg_3052(0x09,0x0A);
	Wrt_Reg_3052(0x0A,0x0B);
	Wrt_Reg_3052(0x0B,0x0C);
	Wrt_Reg_3052(0x28,0x22);
	Wrt_Reg_3052(0x2A,0xE9);
	Wrt_Reg_3052(0x2B,0xE9);
	Wrt_Reg_3052(0x34,0x51);
	Wrt_Reg_3052(0x35,0x01);
	Wrt_Reg_3052(0x36,0x26);
	Wrt_Reg_3052(0x37,0x13);
	Wrt_Reg_3052(0x40,0x07);
	Wrt_Reg_3052(0x41,0x08);
	Wrt_Reg_3052(0x42,0x09);
	Wrt_Reg_3052(0x43,0x0A);
	Wrt_Reg_3052(0x44,0x22);
	Wrt_Reg_3052(0x45,0xDB);
	Wrt_Reg_3052(0x46,0xdC);
	Wrt_Reg_3052(0x47,0x22);
	Wrt_Reg_3052(0x48,0xDD);
	Wrt_Reg_3052(0x49,0xDE);
	Wrt_Reg_3052(0x50,0x0B);
	Wrt_Reg_3052(0x51,0x0C);
	Wrt_Reg_3052(0x52,0x0D);
	Wrt_Reg_3052(0x53,0x0E);
	Wrt_Reg_3052(0x54,0x22);
	Wrt_Reg_3052(0x55,0xDF);
	Wrt_Reg_3052(0x56,0xE0);
	Wrt_Reg_3052(0x57,0x22);
	Wrt_Reg_3052(0x58,0xE1);
	Wrt_Reg_3052(0x59,0xE2);
	Wrt_Reg_3052(0x80,0x1E);
	Wrt_Reg_3052(0x81,0x1E);
	Wrt_Reg_3052(0x82,0x1F);
	Wrt_Reg_3052(0x83,0x1F);
	Wrt_Reg_3052(0x84,0x05);
	Wrt_Reg_3052(0x85,0x0A);
	Wrt_Reg_3052(0x86,0x0A);
	Wrt_Reg_3052(0x87,0x0C);
	Wrt_Reg_3052(0x88,0x0C);
	Wrt_Reg_3052(0x89,0x0E);
	Wrt_Reg_3052(0x8A,0x0E);
	Wrt_Reg_3052(0x8B,0x10);
	Wrt_Reg_3052(0x8C,0x10);
	Wrt_Reg_3052(0x8D,0x00);
	Wrt_Reg_3052(0x8E,0x00);
	Wrt_Reg_3052(0x8F,0x1F);
	Wrt_Reg_3052(0x90,0x1F);
	Wrt_Reg_3052(0x91,0x1E);
	Wrt_Reg_3052(0x92,0x1E);
	Wrt_Reg_3052(0x93,0x02);
	Wrt_Reg_3052(0x94,0x04);
	Wrt_Reg_3052(0x96,0x1E);
	Wrt_Reg_3052(0x97,0x1E);
	Wrt_Reg_3052(0x98,0x1F);
	Wrt_Reg_3052(0x99,0x1F);
	Wrt_Reg_3052(0x9A,0x05);
	Wrt_Reg_3052(0x9B,0x09);
	Wrt_Reg_3052(0x9C,0x09);
	Wrt_Reg_3052(0x9D,0x0B);
	Wrt_Reg_3052(0x9E,0x0B);
	Wrt_Reg_3052(0x9F,0x0D);
	Wrt_Reg_3052(0xA0,0x0D);
	Wrt_Reg_3052(0xA1,0x0F);
	Wrt_Reg_3052(0xA2,0x0F);
	Wrt_Reg_3052(0xA3,0x00);
	Wrt_Reg_3052(0xA4,0x00);
	Wrt_Reg_3052(0xA5,0x1F);
	Wrt_Reg_3052(0xA6,0x1F);
	Wrt_Reg_3052(0xA7,0x1E);
	Wrt_Reg_3052(0xA8,0x1E);
	Wrt_Reg_3052(0xA9,0x01);
	Wrt_Reg_3052(0xAA,0x03);

	Wrt_Reg_3052(0xFF,0x30);
	Wrt_Reg_3052(0xFF,0x52);
	Wrt_Reg_3052(0xFF,0x00);
	Wrt_Reg_3052(0x36,0x0A);
	Wrt_Reg_3052(0x11,0x00);
	HAL_Delay(200);
	Wrt_Reg_3052(0x29,0x00);
	HAL_Delay(100);

	for (int i = 0; i < 50; i++){
		HAL_GPIO_TogglePin(GPIOD, USER_LD2_RED_Pin|USER_LD3_GREEN_Pin);
		HAL_Delay(30);
	}
	return 1;
}

 

SkeleSt_1-1720762471699.pngSkeleSt_2-1720762480100.png

 

 

14 REPLIES 14

Read and apply pages 111-116 CGRB.

Hi,

I just want to write here how we solved our (maybe similar) issue.

Before that I need to clarify.  We were two people, and we were thinking to have the same display (same P/N and same shape). My friend was using a microprocessor, while I was using the kit from Adafruit driven by the microcontroller.

What we discovered when we met is that the display from the Adafruit kit worked very well in the kit, and also attached on the microprocessor. The other display (bought on a chinese web shop) was not working at all on the microprocessor, and worked very bad on the microcontroller too.

So the error was mainly an HW error.

We tested inverted polarity on VS and HS, but nothing changed on both displays: the original one always works very well, the chipper one doesn't work (on the microcontroller you can draw just (very badly) text console, but no graphic at all.

Her are the pictures of the two displays:

 

WhatsApp Image 2024-07-25 at 08.12.18 (1).jpegWhatsApp Image 2024-07-25 at 08.12.18.jpeg

 Cheers,

Giuseppe

SkeleSt
Associate II

Okay, latest update:

Some extra information to bring up. I am using the STM32U5G9J-DK2 with the pinout modified to work on the display. I've modified the code such that it should work with a 720x720 framebuffer and do SPI init on the display. So in a sense I am not starting the project on a new board. That said, I don't believe this should cause the display to not work. If you create a project based on this in TouchGFXDesigner, you will end with the same base code I have.

 

I've purchased the Adafruit Microcontroller to compare. My SPI init sequence is 1 to 1 according to logic analyser with the exception of chip select not being down the whole time, I changed that and it didn't make a difference.

The next thing I did was start probing the clock signals on the Adafruit. I found it to be running at 12Mhz. I was using the rainbow demo and it was flickering however I think this is a problem with the code Adafruit provided and not so much the init or display itself.

 

I also measured the colour signals on the oscilliscope and found that to be sending data as expected.

And then I found out that my STM program is not sending any colour signal on the oscilloscope and that the Model::Tick() only runs once and then does not continue... This seems to be a problem with my codebase so I decided to start a new STM project.

 

Now I have colour signal again however... it is still the white stripes. I am at square one again.
The display refuses to display any of the LTDC signals despite receiving valid PLK, VS, HS clock signals and even colour signals (measured on oscilliscope).
The only signal I haven't been able to verify is the DE signal due to the small probe to measure. Even then, I think it is unlikely data enable isn't working.

SkeleSt_0-1722413111636.png

Would anyone know how to extract the Vsync, Hsync FP and BP values from the adafruit. If it makes sense, it should be the same as the ones provided by Adafruit themselves and I should not have to investigate this.

Maybe some things I can try is bit banging directly to the RGB outputs. Or somehow testing LTDC before entering TouchGFX and RTOS loop, if that is possible?

Otherwise mostly, I'm not sure where to go from here.

/**
  * @brief LTDC Initialization Function
  * @PAram None
  * @retval None
  */
static void MX_LTDC_Init(void)
{

  /* USER CODE BEGIN LTDC_Init 0 */

  /* USER CODE END LTDC_Init 0 */

  LTDC_LayerCfgTypeDef pLayerCfg = {0};

  /* USER CODE BEGIN LTDC_Init 1 */

  /* USER CODE END LTDC_Init 1 */
  hltdc.Instance = LTDC;
  hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AL;
  hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AL;
  hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AH;
  hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IIPC;
  hltdc.Init.HorizontalSync = 1;
  hltdc.Init.VerticalSync = 4;
  hltdc.Init.AccumulatedHBP = 45;
  hltdc.Init.AccumulatedVBP = 20;
  hltdc.Init.AccumulatedActiveW = 765;
  hltdc.Init.AccumulatedActiveH = 740;
  hltdc.Init.TotalWidth = 811;
  hltdc.Init.TotalHeigh = 790;
  hltdc.Init.Backcolor.Blue = 0;
  hltdc.Init.Backcolor.Green = 255;
  hltdc.Init.Backcolor.Red = 0;
  if (HAL_LTDC_Init(&hltdc) != HAL_OK)
  {
    Error_Handler();
  }
  pLayerCfg.WindowX0 = 0;
  pLayerCfg.WindowX1 = 720;
  pLayerCfg.WindowY0 = 0;
  pLayerCfg.WindowY1 = 720;
  pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB565;
  pLayerCfg.Alpha = 255;
  pLayerCfg.Alpha0 = 0;
  pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA;
  pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA;
  pLayerCfg.FBStartAdress = 0;
  pLayerCfg.ImageWidth = 720;
  pLayerCfg.ImageHeight = 720;
  pLayerCfg.Backcolor.Blue = 0;
  pLayerCfg.Backcolor.Green = 0;
  pLayerCfg.Backcolor.Red = 0;
  if (HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg, 0) != HAL_OK)
  {
    Error_Handler();
  }
  /* USER CODE BEGIN LTDC_Init 2 */

  /* USER CODE END LTDC_Init 2 */

}

 

 

static void MX_SPI1_Init(void)
{

  /* USER CODE BEGIN SPI1_Init 0 */

  /* USER CODE END SPI1_Init 0 */

  SPI_AutonomousModeConfTypeDef HAL_SPI_AutonomousMode_Cfg_Struct = {0};

  /* USER CODE BEGIN SPI1_Init 1 */

  /* USER CODE END SPI1_Init 1 */
  /* SPI1 parameter configuration*/
  hspi1.Instance = SPI1;
  hspi1.Init.Mode = SPI_MODE_MASTER;
  hspi1.Init.Direction = SPI_DIRECTION_1LINE;
  hspi1.Init.DataSize = SPI_DATASIZE_9BIT;
  hspi1.Init.CLKPolarity = SPI_POLARITY_HIGH;
  hspi1.Init.CLKPhase = SPI_PHASE_2EDGE;
  hspi1.Init.NSS = SPI_NSS_SOFT;
  hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_256;
  hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
  hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
  hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
  hspi1.Init.CRCPolynomial = 0x7;
  hspi1.Init.NSSPMode = SPI_NSS_PULSE_DISABLE;
  hspi1.Init.NSSPolarity = SPI_NSS_POLARITY_LOW;
  hspi1.Init.FifoThreshold = SPI_FIFO_THRESHOLD_01DATA;
  hspi1.Init.MasterSSIdleness = SPI_MASTER_SS_IDLENESS_00CYCLE;
  hspi1.Init.MasterInterDataIdleness = SPI_MASTER_INTERDATA_IDLENESS_00CYCLE;
  hspi1.Init.MasterReceiverAutoSusp = SPI_MASTER_RX_AUTOSUSP_DISABLE;
  hspi1.Init.MasterKeepIOState = SPI_MASTER_KEEP_IO_STATE_DISABLE;
  hspi1.Init.IOSwap = SPI_IO_SWAP_DISABLE;
  hspi1.Init.ReadyMasterManagement = SPI_RDY_MASTER_MANAGEMENT_INTERNALLY;
  hspi1.Init.ReadyPolarity = SPI_RDY_POLARITY_HIGH;
  if (HAL_SPI_Init(&hspi1) != HAL_OK)
  {
    Error_Handler();
  }
  HAL_SPI_AutonomousMode_Cfg_Struct.TriggerState = SPI_AUTO_MODE_DISABLE;
  HAL_SPI_AutonomousMode_Cfg_Struct.TriggerSelection = SPI_GRP1_GPDMA_CH0_TCF_TRG;
  HAL_SPI_AutonomousMode_Cfg_Struct.TriggerPolarity = SPI_TRIG_POLARITY_RISING;
  if (HAL_SPIEx_SetConfigAutonomousMode(&hspi1, &HAL_SPI_AutonomousMode_Cfg_Struct) != HAL_OK)
  {
    Error_Handler();
  }
  /* USER CODE BEGIN SPI1_Init 2 */

  /* USER CODE END SPI1_Init 2 */

}
static void MX_GPIO_Init(void)
{
  GPIO_InitTypeDef GPIO_InitStruct = {0};
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */

  /* GPIO Ports Clock Enable */
  __HAL_RCC_GPIOE_CLK_ENABLE();
  __HAL_RCC_GPIOC_CLK_ENABLE();
  __HAL_RCC_GPIOF_CLK_ENABLE();
  __HAL_RCC_GPIOH_CLK_ENABLE();
  __HAL_RCC_GPIOA_CLK_ENABLE();
  __HAL_RCC_GPIOB_CLK_ENABLE();
  __HAL_RCC_GPIOD_CLK_ENABLE();
  __HAL_RCC_GPIOI_CLK_ENABLE();

  /*Configure GPIO pin Output Level */
  HAL_GPIO_WritePin(GPIOE, LCD_DISP_EN_Pin|LCD_BL_CTRL_Pin, GPIO_PIN_SET);

  /*Configure GPIO pin Output Level */
  HAL_GPIO_WritePin(GPIOC, VSYNC_FREQ_Pin|RENDER_TIME_Pin|FRAME_RATE_Pin|MCU_ACTIVE_Pin, GPIO_PIN_RESET);

  /*Configure GPIO pin Output Level */
  HAL_GPIO_WritePin(CS_PIN_GPIO_Port, CS_PIN_Pin, GPIO_PIN_SET);

  /*Configure GPIO pin Output Level */
  HAL_GPIO_WritePin(GPIOD, USER_LD2_RED_Pin|USER_LD3_GREEN_Pin, GPIO_PIN_SET);

  /*Configure GPIO pin : LCD_DISP_EN_Pin */
  GPIO_InitStruct.Pin = LCD_DISP_EN_Pin;
  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  HAL_GPIO_Init(LCD_DISP_EN_GPIO_Port, &GPIO_InitStruct);

  /*Configure GPIO pin : TP_IRQ_Pin */
  GPIO_InitStruct.Pin = TP_IRQ_Pin;
  GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
  GPIO_InitStruct.Pull = GPIO_PULLUP;
  HAL_GPIO_Init(TP_IRQ_GPIO_Port, &GPIO_InitStruct);

  /*Configure GPIO pin : LCD_BL_CTRL_Pin */
  GPIO_InitStruct.Pin = LCD_BL_CTRL_Pin;
  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  HAL_GPIO_Init(LCD_BL_CTRL_GPIO_Port, &GPIO_InitStruct);

  /*Configure GPIO pin : USER_BUTTON_Pin */
  GPIO_InitStruct.Pin = USER_BUTTON_Pin;
  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
  GPIO_InitStruct.Pull = GPIO_PULLDOWN;
  HAL_GPIO_Init(USER_BUTTON_GPIO_Port, &GPIO_InitStruct);

  /*Configure GPIO pins : VSYNC_FREQ_Pin RENDER_TIME_Pin FRAME_RATE_Pin MCU_ACTIVE_Pin */
  GPIO_InitStruct.Pin = VSYNC_FREQ_Pin|RENDER_TIME_Pin|FRAME_RATE_Pin|MCU_ACTIVE_Pin;
  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM;
  HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);

  /*Configure GPIO pin : CS_PIN_Pin */
  GPIO_InitStruct.Pin = CS_PIN_Pin;
  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  HAL_GPIO_Init(CS_PIN_GPIO_Port, &GPIO_InitStruct);

  /*Configure GPIO pins : USER_LD2_RED_Pin USER_LD3_GREEN_Pin */
  GPIO_InitStruct.Pin = USER_LD2_RED_Pin|USER_LD3_GREEN_Pin;
  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM;
  HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);

  /* EXTI interrupt init*/
  HAL_NVIC_SetPriority(EXTI5_IRQn, 5, 0);
  HAL_NVIC_EnableIRQ(EXTI5_IRQn);

/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}

Hello!

 

First off, for digital signals, use a logic analyzer. An oscilloscope and a logic analyzer are not the same thing. You said you used a logic analyzer for the SPI init code, and I would recommend you to use this as well for the display signals, as it allows you to measure the signals with respect to each other (in other words, measure every signal at once). It's how I figured out the vertical and horizontal porches for my display (screenshot attached. I'm using Digilent analogDiscovery2.)...

As for the model.tick running only once. I had the same problem (doesn't mean the same cause). The solution was to remove the HAL_LTDC_ProgramLineEvent in the LTDC_IRQHandler in the stm32u5xx_it.c file.

Lastly, it is definitely possible to test the display and LTDC without TouchGFX. The STM32U5G9 should have enough internal RAM that you can store the framebuffer internally, so this ->https://support.touchgfx.com/docs/development/board-bring-up/how-to/03-display-internal shows how to do that.

 

Kind regards, Cloud

Hi SkeleSt

Sorry for answering late.

Good to know that your SPI is functioning .

about the signals polarity , see my bellow settings in MX for F429 Discovery .

 

LTDC-SETTINGGS-720X1280.jpg

this might be helpful .

what I remember (in 2022), at first attempt of LTDC setup in MX , I got the working display.

regarding the difference in datasheets of NV3052xxx (which i haven't checked) , my experience about SUFIX difference in cog part number doesn't bring significant changes.

let me know , your views .

regards

I.Naee