cancel
Showing results for 
Search instead for 
Did you mean: 

How to solve hardfault problem when using video decoding feature?

Yunus ARI
Senior

Hi Everyone,

I am tryin to use video decoding that came with TouchGFX 4.18 version. I have a hardware with STM32H743. I can use video decoding with "Direct to Frame Buffer" stretagy buy it's creat some corruption in frame. Image just sliding little bit on screen sometimes. I think, it probably decoding speed cannot reach to flashing speed sometimes.

So I decide to change decoding strategy. If I could use double buffering it will be solve speed problem. Video maybe glitch sometime but whole screen wont. But when I slect stretagy to other than "Direct to Frame Buffer" come go hardfoult coused by semaphore.

Is any one have this problem yet? Any advice would be helpful. Thank lot.

5 REPLIES 5
Osman SOYKURT
ST Employee

Hello Yunus ARI,

Have you followed this documentation (+ this one) when you configured your board on STM32CubeMX ? Can you share your configuration with us ? (Multimedia ->JPEG / Middleware->LIBJPEG / Software Packs ->TouchGFX Generator->Video Decoding)

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX

Hi Osman,

I was not followed that documents before. Thank you share but it's not solve problem either. You can find configurations of my project below. I also add hard fault call stack.

Thanks in advance

/Yunus

0693W00000KbTfRQAV.png0693W00000KbTfgQAF.png0693W00000KbTfbQAF.png0693W00000KbTf2QAF.png

Hello Yunus ARI,

Did you add the code to configure the MDMA like mentioned ?

In Core\Src\stm32h7xx_hal_msp.c :

void HAL_JPEG_MspInit(JPEG_HandleTypeDef* hjpeg)
{
  if(hjpeg->Instance==JPEG)
  {
  /* USER CODE BEGIN JPEG_MspInit 0 */
     hmdma_jpeg_infifo_th.Init.Request = MDMA_REQUEST_JPEG_INFIFO_TH;
     hmdma_jpeg_outfifo_th.Init.Request = MDMA_REQUEST_JPEG_OUTFIFO_TH;
  /* USER CODE END JPEG_MspInit 0 */
   ...

Also, make sure you have a good configuration of FreeRTOS as described here.

0693W00000KbfMgQAJ.png 

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX

Hi Osman,

Yes, I did like mentioned in documents.

Hi Osman,

Do you have any additional suggestion. Because I couldn't found any solution yet.

Thanks in advance

/Yunus