2024-06-05 05:44 AM
Hi.
I am using SDRAM, OctoSPI and 24bit RGB888 TFT screen. Project is working normally with another widgets (button, shape, text area, image etc.). Now i want to use video decoding and video widget. I made the necessary cubemx settings by reading the Video decoding. application steps. As a trial, I prepared a project consisting of 4 images and one video (sample video in touchgfx) in touchgfx. There are 5 screens in the project. Screen1, screen2, screen3, screen4 and screen5. I play the video after showing the images at 2-second intervals. The video widget is in the 5th screen. The program works properly until the 4th screen. But when it comes to the part of playing the video, it going to the "hardfault" procedure. I think I'm making a mistake with the memory settings. Cubemx settings are as follows;
I added the following code in STM32H7B3LIHXQ_FLASH.ld.
MEMORY
{
...
SDRAM (xrw) : ORIGIN = 0xD0200000, LENGTH = 8M
}
BufferSection (NOLOAD) :
{
*(Video_RGB_Buffer Video_RGB_Buffer.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
} >SDRAM
Where am i making a mistake?
2024-07-09 05:56 AM
Hello @ABURM ,
I tried to replicate the issue using your project settings, and I pretty sure I found out where the issue is.
Could you please change the priority of JPEG input and JPEG output similar to the picture below?
I think you also need to change the Burst Size of JPEG input as well. (similar to the picture)
Also, ensure that the JPEG and MDMA interrupts are enabled with correct priority, like this:
Please try these settings and let me know about the results.
2024-07-10 06:27 AM
Hi @Mohammad MORADI ESFAHANIASL
This is the working "directframe to buffer" configs.
This is the "double buffer" configs.
And the result;
2024-07-12 03:22 AM
Thank you for sharing the result.
To be honest, I'm running out of ideas but it seems like there is an issue with coordinating the buffers.
I know you already have set the Video_RGB_Buffer in your linker script but, could you please try these settings as well?
First, set Buffer Location in the TouchGFX configuration to 'By Allocation':
And then, add these lines to your linker script:
MEMORY
{
...
SDRAM (xrw) : ORIGIN = 0xD0000000, LENGTH = 8M
}
TouchGFX_Framebuffer (NOLOAD) : { *(TouchGFX_Framebuffer) } >SDRAM
Video_RGB_Buffer (NOLOAD) : { *(Video_RGB_Buffer) } >SDRAM
I know it sounds trivial but, I'm afraid that there might be an issue with the alignment of buffers because based on the YouTube video and the fact that 'Direct to Framebuffer' works correctly, the video decoding is done right, however, the coordination between the buffers is wrong causing these screen glitches.. Therefore, I would like to know whether there is an alignment issue or the way that buffers are handled. If it is the latter case, you should check the soundness of your TouchGFXHAL.cpp.
2024-07-16 12:40 AM
Hi @Mohammad MORADI ESFAHANIASL
I tried your suggestions but the result did not change.:thinking_face:
2024-07-16 03:29 AM
Okay, could you please share the files inside the target folder?