2021-03-31 01:10 AM
There is a Model::tick() timer function in TouchGFX.
I wonder if it is possible to set the calling period of this function.
In my program now it is repeated every 0.285msec.
I want to change this to be called every 15msec, so please give me advice on where to look.
2021-03-31 01:52 AM
this question is somewhat similar to this: https://community.st.com/s/question/0D53W00000evnIvSAI/what-is-my-refresh-rate-frame-per-seconds-and-can-i-modify-it
You could just encapsulate the part of the code you want to 'limit' with the same approach I outline in the other thread.
basically
2021-03-31 02:38 AM
Hi,
This is something to set outside in CubeMX or in code. Are you using an OS or running on bare metal ? The tick source of the TouchGFX application is set in the "Driver" section in the TouchGFX additionnal software settings in CubeMX. The next steps I am not sure but you can have a look at that for now :grinning_face_with_sweat:. Are you using a custom board or one of the ST development kits. Did you start your project with one of the application template available in TouchGFX Designer
/Romain
2021-04-05 03:07 AM - last edited on 2024-10-21 02:40 AM by GaetanGodart
I am developing at stm32f469i_Discovery.
It changed from a 4-inch LCD to a 5-inch ILI9806E LCD, and raised the driver to Video mode, with the Model::tick() cycle being changed.
And Touch IC changed to GT911.
The Model::tick() function still has no change in the period.
In the STM32TouchController.cpp function,
bool STM32TouchController::sampleTouch(int32_t& x, int32_t& y)
{
if (bsp_ts_initialized)
{
TS_StateTypeDef state;
mCount++;
if(mCount >4000)
{
mCount =0;
BSP_TS_GetState(&state);
if (state.touchDetected)
{
x = state.touchX;
y = state.touchY;
return true;
}
}
}
return false;
}
This change made the cycle faster.
I don't know why the cycle changes.