1.7k views
in Platform Packages by
Hello.

For example, the stm32f429 has 2d acceleration such ac chrom-art.

For performance improvment, how to use this HW acceleration?

We have the general rgb888 framebuffer platform package.

Thanks and best regards.

1 Answer

0 votes
by
Hello Jinho,

of course, it is possible to adapt the Generic RGBA8888 Platform Package in order to work on the STM32F429 target by using the 2D hardware accelerator DMA2D - but this means a significant amount of work until everything works smoth and in a highly optimized manner...

We are offering a STM32Fx Platform Package that is prepared to work with several STM32Fx MCUs and tested on STM32F429 Discovery, STM32F469 Discovery and STM32F746 Discovery - supporting different framebuffer update methods (inclusive MIPI-DSI). Additionally, we provide a starting project for different environments, so it will be quite easy to get everything up and running.

Maybe it is the easier solution, to take the STM32Fx Platform Package off-the-shelf...
by
Thank you very much for your reply.
Would you send me the price for stm32f~~ package?
by
The pricing model of Embedded Wizard is now available at http://www.embedded-wizard.de/pricing.html
by
Is there anything I need to do (except init the HW) , that EmWi uses/can use DMA2D?
by
The Graphics Engine of the STM32Fx Platform Package contains the adaptation to the DMA2D hardware accelerator in order to speed up all different drawing operations. This means the Graphics Engine takes care for a proper initialization of the hardware and an efficient usage of the DMA2D: All drawing operations that can be accelerated are routed to the DMA2D and all other drawing operations are done by highly optimized software routines.

Does this answer your question? Or what is the background of your question?
by

My Problem is, that I have a camera which uses the DMA2D to load the Picture from the camerabuffer into the framebuffer. Due to this circumstances I get an Error in the ewextgfx.c file in the STM32FxBlendDriver Function at the   /* wait until transfer is done */    section and EmWi isn't working. The cam is working in Display-Layer1 while EmWi should work in Layer0

This is the competing code snippet

static void LCD_LL_ConvertLineToARGB8888(void *pSrc, void *pDst)
{
  /* Enable DMA2D clock */
  __HAL_RCC_DMA2D_CLK_ENABLE();

  /* Configure the DMA2D Mode, Color Mode and output offset */
  hdma2d.Init.Mode         = DMA2D_M2M_PFC;
  hdma2d.Init.ColorMode    = DMA2D_ARGB8888;
  hdma2d.Init.OutputOffset = 0;

  /* Foreground Configuration */
  hdma2d.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA;
  hdma2d.LayerCfg[1].InputAlpha = 0xFF;
  hdma2d.LayerCfg[1].InputColorMode = CM_RGB565;
  hdma2d.LayerCfg[1].InputOffset = 0;

  hdma2d.Instance = DMA2D;

  /* DMA2D Initialization */
  if(HAL_DMA2D_Init(&hdma2d) == HAL_OK)
  {
    if(HAL_DMA2D_ConfigLayer(&hdma2d, 1) == HAL_OK)
    {
      if (HAL_DMA2D_Start(&hdma2d, (uint32_t)pSrc, (uint32_t)pDst, xsize, 1) == HAL_OK)
      {
        /* Polling For DMA transfer */
        HAL_DMA2D_PollForTransfer(&hdma2d, 10);
      }
    }
  }
}

 

by
Is the above code (your camera line transfer routine) called from an interrupt service routine? If yes, then I can imagine that the Graphics Engine drawing functions are interrupted at any time, which may lead to an unpredictable behavior if both are accessing the DMA2D.

In principle, it should be possible, that several software parts are using the DMA2D hardware - but one after the other...
by

I have managed that there isn't a "resource-conflict" any more. I tried it with this example: Displaying video inside the user interface and now EmWi works with the CAM =) 

 

by
Sounds great, that you managed to solve that "resource-conflict".

Well, you already found the right idea by placing a transparent rectangle within your GUI application in order to see the content of the layer behind.

What is the color format of your layer? If this is set to RGB565 or RGB888 the layer is not able to display transparancy => as a result it appears black. Just switch to framebuffer color format that supports alpha channel (e.g. RGBA8888 or RGBA4444) and you should see the camera image from the layer behind.
Check the settings of FRAME_BUFFER_COLOR_FORMAT if you are using one of our makefiles.

 

Does it work?
by
It works fine now. The problem was, as you said, in the LTDC Init function. Thank you =)
by
Now I have two software part using DMA2D hardware

1. Video decoding from QSPI using DMA2D hardware

2. EW Graphic engine.

I'm using 1 first, then 2 with EW initiation with DMA2D init. But step 2 take much time than I expect.

Is there any way to work around ?

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...