2022-11-17 04:46 PM
I have the same problem as the link below.
Only the "touch screen" doesn't work.
My board doesn't work with hardware reset, but it works with STM32CubeProgrammer.
What is the reason for this?
2022-11-18 01:00 AM
2022-11-18 04:27 AM
Yes.
After downloading the Hex file, press the reset button on the STM32F746G-DISCO, the screen appears. However, only the touch sensor is not working.
At this time, after executing the STM32CubeProgrammer, click the [Hardware RESET] , and click the [RUN] in MCU Core tab , then the touch sensor is working.
2022-11-18 10:08 PM
I'm having similar problems with the F746G-Disco. Touch works in the loaded demo, but for every sample I send, or new project I make, the touch screen doesn't work. Animated graphs are fine, so it isn't frozen. I've done a lot of these over the years, and this is a new issue and a board I haven't used before.
In looking through the touchscreen code I noticed that when an error is detected, it calls I2Cx_Error, which de-inits the interface, but the line for initializing the interface was commented out. The fn it references, I2Cx_Init, doesn't exist. I replaced it with the HAL_I2C_Init call, and it worked. File "STM32TouchController.cpp"
static void I2Cx_Error(I2C_HandleTypeDef* i2c_handler, uint8_t Addr)
{
/* De-initialize the I2C communication bus */
HAL_I2C_DeInit(i2c_handler);
/* Re-Initialize the I2C communication bus */
HAL_I2C_Init(i2c_handler); // Was I2Cx_Init
}
But, I commented it out again, and it still worked. I'll play some more and see if the I2C bus is locking up. Still, DeInit without Init seems odd.
2022-11-20 03:30 AM
Thank you for sharing your experience.
I will check the initialization of I2c.
2022-11-20 04:09 PM
I was able to confirm that the problem occurred in the function below. It appears to be a hardware communication problem.
File "ft5336.c
void ft5336_TS_DisableIT(uint16_t DeviceAddr)
2022-11-21 03:26 PM
the solution was to put some HAL_Delay(100) in the main.c, before calling MX_I2C3_Init().
2022-11-25 06:59 AM
Nice work, that seems to do the trick!