cancel
Showing results for 
Search instead for 
Did you mean: 

Suspend LTDC to update framebuffer and resume

eng23
Senior

Hi,

I'm using DCMI and LTDC to display my video camera, I would to remove the effect of updating the image, because I need to convert by code YCbCr to RGB888, so it wastes a considerable time and it is possible to see the conversion process (the video is updating up to down line by line in aprox 150ms).

Is there a way to stop the LTDC updating the LCD, convert the framebuffer, and resume the LTDC? I've tried this but it goes to default handler...

__HAL_LTDC_LAYER_DISABLE(&hltdc, 1);

Regards,

Anderson

7 REPLIES 7
berendi
Principal

There might be subtle differences between LTDC controllers on different MCU models, what is the part number?

FYI, the DMA2D controller in some STM32 series support hardware YCbCr to RGB conversion.

Hi,

Sorry, my uc is STM32F756.

Yes, the STM32H7 series has YCbCr to RGB conversion by hardware, I'm planning to move to H7 family...

Thanks for reply!

@eng23​ 

Hello,

I am trying to convert YCBCR from DCMI to RGB565 using DMA2D on the STM32H743.

Have you managed to make it work using the DMA2D?

Regards

Mahmoud

Hi @Community member​ ,

Sorry for delay, I was on vacation because the coronavirus...

I'm migrating from F7 to H7 and at the moment I couldn't implement this conversion yet, I do this by code (in H7 it is faster than F7)

But in the next weeks I will work on this again. If I have solutions I share here.

If you get something work please let me know too.

Regards,

Anderson

Hi @eng23​ 

Thanks for your reply.

i am working now on rearranging the YCbCr components received from the DCMI and then put them in 8*8 blocks like the output from the hardware jpeg decoder. i am not sure if this would work or not or also will it be fast enough or not. but we will see.

Can you share your software version here so i can try it too?

Regards

Mahmoud

Hi @Community member​ 

Yes, attached you can find a file where I put my conversion fuction.

Explaining....

On this topic I asked about the dcmi's embedded sync mode, how to implement, because with this feature I could receive only the raw video data. But I couldn't implement this, so I do my "decoder video function" by firmware, it is not so elegant but it was the way that I found.

So, I extract the video data in YCbCr format, convert to RGB888 and write in the framebuffer used by LTDC (second framebuffer).

You said about hardware jpeg decoder, I don't know if it is the best way to do this... but let me know..

Hope that it can help you. I still want to implement this by hardware, when I have time I will back on this.

Regards,

Anderson

Hi @eng23​ 

Thanks for the code i will try it. i dont know if you know that or not but there is a display from AUO that can convert ycbcr to RGB internally by hardware. if you want i can send you its link. such solution will be good especially if you want to encode your video

Best Regards

Mahmoud