cancel
Showing results for 
Search instead for 
Did you mean: 

DMA2D throws configuration error

VLesc.1
Associate

Hello!

We are use STM32H747 and TouchGFX. We are need to use DMA2D. But we have issue with mode DMA2D_R2M.

Our configuration

  hdma2d.Instance = DMA2D;
  hdma2d.Init.Mode = DMA2D_R2M;
  hdma2d.Init.ColorMode = DMA2D_OUTPUT_ARGB8888;
  hdma2d.Init.OutputOffset = 0;
 
  if (HAL_DMA2D_Init(&hdma2d) != HAL_OK)
  {
      while (1);
  }
 
  if (HAL_DMA2D_ConfigLayer(&hdma2d, 1) != HAL_OK)
  {
      while (1);
  }

Our test

NVIC_EnableIRQ(DMA2D_IRQn);
 
HAL_DMA2D_Start_IT(&hdma2d, 0x12345678, 0xD0165800, 640, 572);

In this case we have callback from DMA with configuration error.

For mode DMA2D_R2M - all Ok.

Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks for answer!

But I found that for hdma2d.Init.Mode = DMA2D_R2M function HAL_DMA2D_Init (...) set into CR mode as 0x07, not 0x03.

I updated code for correct mode and now all works!

View solution in original post

3 REPLIES 3
Imen.D
ST Employee

Hello @Community member​ ,

Have a look at the "Configuration error detection" subchapter of DMA2D chapter in the RM0399, and check with the condition and configuration that you have.

Hope this helps you :smiling_face_with_smiling_eyes: !

Please mark my answer as best by clicking on the "Select as Best" button if it helped.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Thanks for answer!

But I found that for hdma2d.Init.Mode = DMA2D_R2M function HAL_DMA2D_Init (...) set into CR mode as 0x07, not 0x03.

I updated code for correct mode and now all works!

Imen.D
ST Employee

Thanks for sharing the update and your solution!

I'm really glad to know you overcame this problem :)

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen