2021-01-22 02:45 AM
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?
Solved! Go to Solution.
2021-01-22 03:23 AM
The answer is simple. xSize and ySize cannot be zero.
2021-01-22 03:15 AM
Configuration error detection subchapter of DMA2D chapter contains a list of conditions checked by the module.
JW
2021-01-22 03:23 AM
The answer is simple. xSize and ySize cannot be zero.
2021-01-22 03:32 AM
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! :)
2021-01-22 04:31 AM
Thanks for coming back with the solution.
Many answers look simple after you find them...
JW