cancel
Showing results for 
Search instead for 
Did you mean: 

I interfaced Camera to the STM 32f746G . i used pixelData widget to show the camera feed and created GUI above it. the problem is that i have tearing when i am using GUI on top of the pixel widget. I think its synchronization problem

MSale
Associate III
 
13 REPLIES 13
Martin KJELDSEN
Chief III

You need to sync your frames with TouchGFX. The camera is maybe producing frames at a different rate, and you could be displaying the current screen while you're transferring data from the camera to the memory area of the pixel data widget.

/Martin

MSale
Associate III

@Martin KJELDSEN​ 

The frame rate from the camera is 30 fps. Is there an application note how to synchronize the TouchGFX rate with the camera frame rate?

Martin KJELDSEN
Chief III

Hi @Community member​,

I'm affraid not. It's a very application specific issue. Can you confirm this is what's happening?

What you need to do is to protect the memory area defined for the pixel data widget using a semaphore unless you implement some other layer where the pixel data widget can get the next available frame (there may be multiple frames queued up). If you sync with TouchGFX your farmerate will most likely drop because the application won't run as fast as your camera is producing frames - Especially with additional gui on top.

This is where a second layer would come in handy - It's not something we support, officially, but it would be incredibly powerful to configure an additional layer to show output from a camera, and then a layer to show the TouchGFX gui application.

/Martin

Hi @Martin KJELDSEN​ 

Thanks for the information. i tried with the 2 layers but i have problem . when i put the camera frame buffer in layer 1 and GUI in layer 2 the camera freeze. when i change the order its working fine but the GUI widgets are very transparent. Do you think its related to external SDRAM?

Regards

Mahmoud

@Martin KJELDSEN​ 

Hi

When i try to use the 2 layers it work only when i put touchgfx on 1st layer and the camera output on second layer but it should not be this way. when i put touchgfx on second layer and the live video on the first layer i loose the live video. you think its SDRAM issue or something related to touchgfx that it work only with 1 layer?

Regards

Mahmoud

Hi @Martin KJELDSEN​ 

Do i need to change something in DMA2D to be able to put touchgfx on the second layer because the system work only when touchgfx on 1st layer and the live video on second layer which is not good

Regards

Mahmoud

The camera freezes? Or the Layer is no longer updating? Is the application still running?

DMA2D only worries about a target memory address, which the Layer is pointing to so i doubt there's anything to change here.

How big are the frames the camera produces? Are they the size of the layer? Or smaller, so that you're super imposing a small camera feed onto a touchgfx UI?

/Martin

MSale
Associate III

@Martin KJELDSEN​ 

The camera totally dissapear after executing touchgfx::HAL::getInstance()->taskEntry(); but this happen when the camera at 1st layer and touchgfx on second. also the live video is running well before starting the touchgx task vut once it start its gone and only the gui visible.

the frame of the camera is 261120.

i think the layer does not updating but for what reason thats i dont know yet.

the strange thing its running when i reverse the layer locations

Thanks in adcvance

Regards

Mahmoud

MSale
Associate III

@Martin KJELDSEN​ 

Camera frame is 480*272*2 and its located at the 0xc0000000

touchgfx frame is at 0xc0400000