AnsweredAssumed Answered

Icons and DMA2D / STM32F746

Question asked by S A on Jul 7, 2017
Latest reply on Oct 20, 2017 by Erik de Wit

Hi, I currently have STM32F746 connected to a 640x480LCD which is working as expected.

I'm using one LTDC hardware layer and doing everything through DMA2D and an external SRAM. So far all is good, I can load images and so on


I have a question though regarding the HAL_DMA2D_STARTxxxx functions. Obviousy those functions need a pointer to the LCD memory, the input bitmap and also the size of the bitmap but it seems that the bitmap size is basically ignored.


What I am trying to do is to place a 100x100 icon at some point of the screen, it should be as easy as passing the position in the video memory, the place where the icon is plus the icon size but it doesn't work as one would expect. It only works if the defined size of the LCD window (640x480 in my case) is exactly the same as the icon, otherwise it  places the icon linearly without respecting the 100x100 dimensions I passed to it.


I've searched the samples and there is a "screen paint"  example where it does load small icons and place them at a location but it is accomplished manually by sending line by line with all the associated overheads of setting up the DMA2D every single line and calculating the memory location plus then waiting for the DMA2D to finish every line or handling a lot of interruptions while the lines are painted...


Perhaps I am misunderstanding the use of those functions but then there is little point on them as the Y size will be always 1 and we will have to handle the elements manually. The documentation indicates otherwise but it is a bit vague...


has anyone come to this problem and perhaps found something I am missing?


thank you!