cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX bitmap corrupted data

DCajigal
Associate III

Hi,

I amp developing a touchgfx application on a custom board with a STM32F3. I have got the STM32G0 example as inspiration and i have modified the display driver in order to work with my Ili9341. In first place i am trying to run a short application without an external spi flash. The problem is that everything runs fine, and boxes and colors are shown well, but the images from a button for example, or any other bitmap gets corrupted. I have configured, like in the STM32G0 case, a partial framebuffer with vsync enabled. The only difference with the STM32G0 is that i have no external flash, and the method for calling "touchgfxSignalVSync()", as i dont have a tearing signal from the display i have configured a timer and i call this function from the timer interrupt:

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)

{

 TE++;

 (&htim6)->Instance->CR1 &= ~(TIM_CR1_CEN);

 (&htim6)->Instance->CNT = 0;

 touchgfxSignalVSync();

}

I really dont use the htim6, but i have left it here to have it just like the STM32G0 example. I alse left the function "shouldTransferBlock" like the one in the example:

int touchgfxDisplayDriverShouldTransferBlock(uint16_t bottom)

{

 //return (bottom < getCurrentLine());

 return (bottom < (TE > 0 ? 0xFFFF : ((__IO uint16_t)htim6.Instance->CNT)));

}

I would really appreciate any help with this problem. Thanks in advance.

4 REPLIES 4
MM..1
Chief II

Why you  (&htim6)->Instance->CR1 &= ~(TIM_CR1_CEN); ?

And why you write about corrupted images but dont show it.

Primary corruption is bad orientation between lcd landscape portrait and image storin angle 0 or 90.

Try change your image to other angle.

DCajigal
Associate III

Hi,

I just add the htim6 because the example of the STM32G0 board uses it in the external interrupt from the TE signal. However, i know that here it is not doing anything...

I attach an image of the display. As you can see the boxes and forms are well shown, but the bitmap of the button have multiple gaps in it. With other bitmaps, for example with the toggle button one, it is even worse. Thanks in advance for the help.0693W000007EA94QAG.png 

MM..1
Chief II

Try read this TouchGFX Image Mangling (st.com)

maybe this helps.

DCajigal
Associate III

Tanks!! That was the issue!! I had no found that thread. Thank you a lot