cancel
Showing results for 
Search instead for 
Did you mean: 

stm32F429BI + LCD does not switch-on the display

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));

 

 

 

45 REPLIES 45

Show BSP_LCD_Clear() source !

And try explain why this all when TGFX is more more effective...

>>Is there other parts to compare ?

Convince me the SDRAM is working, write and read-back assorted walking bit test patterns.

We've already seen the LTDC getting working colour data from functional memory. Hey park a suitable bit map in internal flash, or some colour bar test patterns in there.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Sorry for delay in the answer

 

void BSP_LCD_Clear(uint32_t Color)

{

/* Clear the LCD */

LL_FillBuffer(ActiveLayer, (uint32_t *)(hltdc.LayerCfg[ActiveLayer].FBStartAdress), BSP_LCD_GetXSize(), BSP_LCD_GetYSize(), 0, Color);

}

 

static void LL_FillBuffer(uint32_t LayerIndex, void *pDst, uint32_t xSize, uint32_t ySize, uint32_t OffLine, uint32_t ColorIndex)

{

/* Register to memory mode with ARGB8888 as color Mode */

hdma2d.Init.Mode = DMA2D_R2M;

 

 

if(hltdc.LayerCfg[ActiveLayer].PixelFormat == LTDC_PIXEL_FORMAT_RGB565)

{ /* RGB565 format */

hdma2d.Init.ColorMode = DMA2D_RGB565;

ColorIndex = ((ColorIndex & LCD_COLOR_RED)<<8) | ((ColorIndex & LCD_COLOR_GREEN )<<5) | ((ColorIndex & LCD_COLOR_BLUE) << 3);

}

else

{ /* ARGB8888 format */

hdma2d.Init.ColorMode = DMA2D_ARGB8888;

}

hdma2d.Init.OutputOffset = OffLine;

 

hltdc.Instance = DMA2D;

 

/* DMA2D Initialization */

if(HAL_DMA2D_Init(&hdma2d) == HAL_OK)

{

if(HAL_DMA2D_ConfigLayer(&hdma2d, LayerIndex) == HAL_OK)

{

if (HAL_DMA2D_Start(&hdma2d, ColorIndex, (uint32_t)pDst, xSize, ySize) == HAL_OK)

{

/* Polling For DMA transfer */

HAL_DMA2D_PollForTransfer(&hdma2d, 10);

}

}

}

}

 

Now Work!

 

Changed from
DMA2D_OUTPUT_RGB888 / DMA2D_INPUT_RGB888 / LTDC_PIXEL_FORMAT_RGB888
to
DMA2D_OUTPUT_ARGB8888 / DMA2D_INPUT_ARGB8888 / LTDC_PIXEL_FORMAT_ARGB8888


Ciuffolywwwaudiodesignguide_0-1714060244821.png

 

This set

 

#define HBP 80

#define VBP 40

#define HSW 1

#define VSW 1

#define HFP 190

#define VFP 22

 

#define LCD_Width 800

#define LCD_Height 480

#define LCD_Pixels 800*480

#define LCD_MemoryAdd 0xD0000000

 

hltdc.Init.HorizontalSync = HSW - 1;

hltdc.Init.VerticalSync = VSW -1 ;

hltdc.Init.AccumulatedHBP = HBP + HSW -1;

hltdc.Init.AccumulatedVBP = VBP + VSW -1;

hltdc.Init.AccumulatedActiveW = LCD_Width + HSW + HBP -1;

hltdc.Init.AccumulatedActiveH = LCD_Height + VSW + VBP -1;

hltdc.Init.TotalWidth = LCD_Width + HSW + HBP + HFP - 1;

hltdc.Init.TotalHeigh = LCD_Height + VSW + VBP + VFP - 1;

 

 

PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LTDC;

PeriphClkInitStruct.PLLSAI.PLLSAIN = 60;

PeriphClkInitStruct.PLLSAI.PLLSAIR = 2;

PeriphClkInitStruct.PLLSAIDivR = RCC_PLLSAIDIVR_2;

 

 

Last source

www.audiodesignguide.com/sw1/stm32F429BI-test5.zip

I will update soon with touch screen test

 

Last source with Touch screen test and the complete BSP_LCD library to print text and load BMP

www.audiodesignguide.com/sw1/stm32F429BI-test7.zip