2021-02-03 10:39 PM
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.
2021-02-04 10:46 AM
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.
2021-02-05 08:05 AM
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.
2021-02-05 09:15 AM
Try read this TouchGFX Image Mangling (st.com)
maybe this helps.
2021-02-09 04:25 AM
Tanks!! That was the issue!! I had no found that thread. Thank you a lot