Skip to main content
VLesc.1
Associate
May 21, 2021
Solved

DMA2D throws configuration error

  • May 21, 2021
  • 2 replies
  • 1085 views

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?

This topic has been closed for replies.
Best answer by VLesc.1

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!

2 replies

Technical Moderator
May 27, 2021

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
VLesc.1
VLesc.1AuthorBest answer
Associate
May 28, 2021

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!

Technical Moderator
May 28, 2021

Thanks for sharing the update and your solution!

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

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks