cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX generated project is not worked on STM32F746G-DISCO(C01) (Only the "touch screen" doesn't work.)

Paphael
Associate II

I have the same problem as the link below.

(link : https://community.st.com/s/question/0D53W00001XM98mSAD/touchgfx-generated-project-is-not-worked-on-stm32f746gdiscoc01)

Only the "touch screen" doesn't work.

My board doesn't work with hardware reset, but it works with STM32CubeProgrammer.

0693W00000WIjV8QAL.pngWhat is the reason for this?

7 REPLIES 7
MM..1
Chief II
Paphael
Associate II

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.

Jenni
Associate II

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.

Paphael
Associate II

Thank you for sharing your experience.

I will check the initialization of I2c.

Paphael
Associate II

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)

Paphael
Associate II

the solution was to put some HAL_Delay(100) in the main.c, before calling MX_I2C3_Init().

Jenni
Associate II

Nice work, that seems to do the trick!

  • Jenni