cancel
Showing results for 
Search instead for 
Did you mean: 

DMA2D throws configuration error

Despair1337
Associate III

Hello, on my STM32H747-DISC1, I had huge issues with DMA2D and CLUT (it was freezing etc).

I thought it's because cache maintenance, but anyway after doing everything correctly, DMA is still buggy. Finally I find out, that 90% of my DMA2D executions throws DMA2D_FLAG_CE, but anyway DMA2D renders it.

Code:

  dma2d_handle.Init.Mode         = DMA2D_R2M;
  dma2d_handle.Init.ColorMode    = DMA2D_ARGB8888;
  dma2d_handle.Init.OutputOffset = Offset;
 
  dma2d_handle.Instance = DMA2D;
 
  if(HAL_DMA2D_Init(&dma2d_handle) == HAL_OK)
  {
    if(HAL_DMA2D_ConfigLayer(&dma2d_handle, layer_index) == HAL_OK)
    {
      if (HAL_DMA2D_Start(&dma2d_handle, ColorIndex, (uint32_t)dst, xSize, ySize) == HAL_OK)
      {
        HAL_DMA2D_PollForTransfer(&dma2d_handle, 10); // returns HAL_ERROR and HAL_DMA2D_FLAG_CE
      }
    }
  }

Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
Despair1337
Associate III

The answer is simple. xSize and ySize cannot be zero.

View solution in original post

4 REPLIES 4

Configuration error detection subchapter of DMA2D chapter contains a list of conditions checked by the module.

JW

Despair1337
Associate III

The answer is simple. xSize and ySize cannot be zero.

Thanks! I figured it by trial and error (I find out that some of values was zero), but if I wouldn't found it, this would help me.

Thank you for your time! 🙂

Thanks for coming back with the solution.

Many answers look simple after you find them...

JW