2025-10-28 6:30 AM - last edited on 2025-10-30 6:14 AM by mƎALLEm
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!
Solved! Go to Solution.
2025-10-30 3:53 AM
Hello @SM_IoT ,
Thank you for sharing your setup. To better assist you, ,Could you please provide more details on your issue or error are you encountering when streaming the JPEG data using the HAL ?
and Did you check the JPEG examples in the STM32CubeH7 package on GitHub? They could help with your project.
You can find them here:
STM32CubeH7/Projects/STM32H747I-EVAL/Examples/JPEG at master · STMicroelectronics/STM32CubeH7 · GitHub
Br
2025-10-30 3:53 AM
Hello @SM_IoT ,
Thank you for sharing your setup. To better assist you, ,Could you please provide more details on your issue or error are you encountering when streaming the JPEG data using the HAL ?
and Did you check the JPEG examples in the STM32CubeH7 package on GitHub? They could help with your project.
You can find them here:
STM32CubeH7/Projects/STM32H747I-EVAL/Examples/JPEG at master · STMicroelectronics/STM32CubeH7 · GitHub
Br
2025-10-30 7:27 AM
Hello, @MOBEJ
Thank you kindly for your response.
I did review the example in the process of writing my code. However, that is for the STM32H747I board. We are using STM32H757I Eval board that has the OTM8009A Display.
My efforts are towards getting the ARGB8888 blended into RGB888 which does not seem to be happening. I would appreciate it if you can please list any possible areas that need to be looked based on your experience in blending ARGB8888 to RGB888.
What am I doing
1. Using a JPEG source, I decode it to RGB888.
2. Using HAL_DMA2D_Start, I convert from RGB888 to ARGB8888 using the following Settings:
3. I blend ARGB8888 to RGB888
4. Blit to Display
Also, yesterday in the process of verifying the CubeMX settings, I regenerated the code and was forced to download 4.25 because 4.24.2 does not exist anymore. Our code base is based off of 4.24.2. How can we download 4.24.2?
Thank you kindly.
2025-10-31 12:59 AM
Hello @SM_IoT ,
I recommend using the STM32H747I eval board as it features the same display module as your board, which utilizes the OTM8009A display driver , You can verify this by checking the stm32h747i_eval_conf.h file located in the Common folder, where the use of the OTM8009A display driver is clearly specified (line 43).
Br