2024-04-23 09:26 AM
I am starting some test with this module
https://it.aliexpress.com/item/1005002482177244.html
with 7” lcd
I have found only one example that run but with Touchgfx
I have got the same ioc from this example to generate a new code and insert the functions to switch on lcd but still no result
I would like to use the normal functions
BSP_LCD_Init() ;
BSP_LCD_DisplayStringAt(10, 80, buf, LEFT_MODE);
BSP_LCD_DrawBitmap(0, 0, (uint8_t *)(&BackGround0));
Solved! Go to Solution.
2024-04-24 11:48 AM
You write "I have found only one example that run but with Touchgfx"
Why you dont remove TGFX and use it.? Activate displays plus SDRAM plus many other setups isnt beginer job.
an4861-introduction-to-lcdtft-display-controller-ltdc-on-stm32-mcus-stmicroelectronics.pdf
2024-04-24 12:23 PM
Ok, so that's indicative that the LTDC is working, but the SDRAM at 0xD0000000 is NOT
Check the SDRAM / Hard Fault situation, you complained that writing the Frame Buffer "Hung" the board, probably Hard Faulted. Establish that is the case. Then make sure the SDRAM is initialized properly, and you can zero fill the Frame Buffer. That should be BLACK. Of fill with 0xFFFFFFFF which should be WHITE
2024-04-24 01:49 PM
with 0xFFFFFFFF the same result of 0x00000000
2024-04-24 02:08 PM
?? Being Blue or Hanging?
2024-04-24 02:33 PM - edited 2024-04-24 02:36 PM
with 0xFFFFFFFF and with 0x00000000 I see the strange image post before
2024-04-24 02:44 PM
That's painting the rasters using opcodes in FLASH. The 70% that's WHITE is coming from the erased FLASH memory. Proves LTDC / DMA is READING properly.
You need to point it back at the SDRAM (0xD0000000) and go confirm that the memory is physically working and you're not hanging or getting a Hard Fault.
2024-04-24 02:53 PM
Using 0xD0000000 and
LTDC_PIXEL_FORMAT_RGB888 / DMA2D_INPUT_RGB888 / DMA2D_OUTPUT_RGB888
instead of
DMA2D_INPUT_ARGB8888 / DMA2D_INPUT_ARGB8888 / DMA2D_OUTPUT_ARGB8888
I see these vertical lines
2024-04-24 03:03 PM
Ok, but it's just reading, or failing to read, a consistent pattern from the Frame Buffer.
Not really convinced that the SDRAM or running it at full bandwidth. Can you dump in a Memory View in debugger?
Is the system still hanging when you write to the Frame Buffer?
2024-04-24 10:19 PM
Also if I set all the parameters like TouchGfx example the result is not good.
Is there other parts to compare ?
2024-04-25 12:32 AM
A new info, starting from TouchGfx project I have made 2 simple modifications
//MX_TouchGFX_Init(); <<<<<<<<<<<<<<<<<
BSP_LCD_Init(); // add now
BSP_LCD_Clear(0x00FFFF00); // add now
void StartDefaultTask(void const * argument)
{
HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_2);
//MX_TouchGFX_Process(); <<<<<<<<<<<<<<<<<
and now I see only vertical lines like in previous project
so the problem could be in the BSP_LCD_Clear()