2025-10-28 6:30 AM - edited 2025-10-28 8:46 AM
STM32H757 has FreeRTOS running.
The goal is to stream JPEG data to the display using HAL interfaces to get performance. However, it is not working yet and I am here to get some guidance. I have it working with using third party library libJPEG.
HAL Interfaces I am relying on:
HAL_JPEG_DeInit(m_phjpeg)
HAL_JPEG_Init(m_phjpeg)
HAL_JPEG_DecodeCpltCallback() and HAL_JPEG_ErrorCallback() have been setup to release semaphore.
HAL_JPEG_Decode_DMA() for non blocking decode
DMA2D: RGB888 To ARGB8888
HAL_DMA2D_Init(&hdma2d)
HAL_DMA2D_ConfigLayer()
HAL_DMA2D_Start()
HAL_DMA2D_PollForTransfer() with 1000 timeout
DMA2D: BlendARGB To RGB888 (Blend to FG)
stm32h7xx_hal_dma2d.h has the following macros that I am using:
#define DMA2D_BACKGROUND_LAYER 0x00000000U /*!< DMA2D Background Layer (layer 0) */
#define DMA2D_FOREGROUND_LAYER 0x00000001U /*!< DMA2D Foreground Layer (layer 1) */
Once the dma2d handle members are setup, the following happens:
HAL_DMA2D_Init(&hdma2d)
HAL_DMA2D_ConfigLayer()
HAL_DMA2D_BlendingStart()
HAL_DMA2D_PollForTransfer() with 1000 timeout
Blit to Display
HAL_DMA2D_ConfigLayer()
HAL_DMA2D_Start()
HAL_DMA2D_PollForTransfer() with 1000 timeout
Appreciate any help!
Thanks!