cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 TFT with LTDC and DMA2D

dennis23
Associate II
Posted on May 04, 2016 at 11:06

Hello everybody,

I am trying to understand how the LTDC and DMA2D are working together. I have a small custom made STM32F7 board with a 24-Bit RGB TFT panel connected to the LTDC. With CubeMX I activated this interface and also the DMA2D.

Now after my initialization I don't know how to set a pixel or draw a line or something else... I want to use the �GUI library and for that one I have to create a function which only set one pixel.

Can anyone help me, bit confusing all the DMA and LCD interface.

Thanks!

#dma2d #ltdc #stm32f7 #dma
3 REPLIES 3
slimen
Senior
Posted on May 05, 2016 at 10:38

Hi debegr,

I recommend you to have a look to the example under

https://my2.st.com/content/my_st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef7.license%3d1462379333967.html

package, it may be helpful for you:

 STM32Cube_FW_F7_V1.3.0\Projects\STM32756G_EVAL\Examples\DMA2D\DMA2D_MemToMemWithLCD

This example describes how to configure DMA2D peripheral and display the result on LCD. So, it can be a starting point to learn about programming DMA2D with LCD.

Regards

dennis23
Associate II
Posted on May 06, 2016 at 00:44

Hi,

okay thank you. I found the examples you wrote. But I only get a light-gray screen. I do not have any oscilloscope here until end of this week, to check if the display is receiving data.

The STM32 get a little bit higher temperature if I enabled the DMA2D and copying data to LCD.

I also want to know if I can use the ARGB4444 mode if my display is connected to 24 Bits on the LTDC interface. I do not have enough memory to store two buffers with the size of 480x272x4 Bytes. So I only can store like bit more of half this size. I currently only testing with one buffer.

The DMA2D is copying the data at every cange? Or in a fixed time?

dennis23
Associate II
Posted on May 07, 2016 at 17:11

Hi again,

my demo is now working with my display and I know how to implement the µGUI library, but...

The demo shows a const array in the flash, which will be painted to layer1 on the screen. The array is stored as an RGB565 color map. This color map has to be 32 bit wide for example 0x12341234.

My question is, if it is possible to store the data only in a 16 bit wide buffer array. I do not have enough RAM to store every pixel double.

Can anyone answer me this question? My idea is to create a uint16_t lcd_buffer[480*272]; and set hltdc.FBStartAddress = (uint32_t)&lcd_buffer;

Thanks,

Dennis