cancel
Showing results for 
Search instead for 
Did you mean: 

Touch GFX screen display problem

alexeyskosnyagin
Associate II

I have a simple project with multiple screens. Physical buttons are configured to scroll between screens. When the device boots, the first screen is displayed correctly, but when you try to switch to the second screen, the display turns gray and the device freezes. The project will be moved from STM32F407ZET6 to STM32H723ZGT6. Tell me what could be the problem?

8 REPLIES 8
GaetanGodart
ST Employee

Hello @alexeyskosnyagin and welcome to the community!

 

I have looked at your code and I do not see what is called to change screen.

Shouldn't you have interrupts in your main.c for your hardware buttons?

Can you try adding a TouchGFX button on one of your screen and an interaction to switch to another screen and see if you get a grey screen too? The goal is to identify the issue : either TouchGFX or the hardware.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
alexeyskosnyagin
Associate II

My device does not have a touch screen.
All control is done using physical buttons. The button handler is moved to separate C files - button_handler.c and TouchGFX_ButtonController.c
The button handler, I think, works correctly, because if you set a breakpoint in the file on the condition of the corresponding button and click on it, it will stop at this point and all assignments will be executed. Also, after this, the device seems to try to switch the screen, the screen flickers, and then it turns gray. And before, my code worked on STM32F407ZET6, but errors appeared when migrating to STM32H723ZGT6. I'm guessing that I have some kind of error in the project configuration.

GaetanGodart
ST Employee

Ok so that is a migration problem it looks like.

 

To migrate a GUI, click on Edit => Import => GUI

GaetanGodart_0-1717410922756.png

Then, in the file navigator, select the .touchgfx file of your previous project (the one on STM32F407ZET6).

This process will import the GUI and the assets (images, etc) and the code in the projectName/GUI/include and projectName/GUI/src folders (that is the code that you wrote yourself previously to make your project work.

Can you try that and tell me how it goes?

 

(Also, are you using custom board or discovery boards?)

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

I imported the GUI according to your instructions. For a while, for testing, I left only the button with key 3 - switching screens to the right. The problems have not been resolved. I am attaching two photos: a photo of the first screen and the second one that did not load.

GaetanGodart
ST Employee

When you click on the button, what code do you execute?
I have looked at your project but can't find where your button clicks are called.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

How is your optimization level on old 401 and on new H project? 

And use this

 

	HAL_SPI_Transmit_DMA(&hspi2, pData, Size*2 );
	//HAL_SPI_Transmit_DMA(&hspi1, (uint8_t*)pData, Size );
	while(spiDmaTransferComplete == 0);

 

is total waste DMA absurd... next check target folder is IRQ enabled for HAL_SPI_TxCpltCallback ...

too check if this delay is ok ...

 

  MX_TouchGFX_Process();
    /* USER CODE BEGIN 3 */
  HAL_Delay(100);

 

 

Hello @alexeyskosnyagin ,

 

Have you been able to move forward with your project?

If one of the previous comment helped you solve your issue, I invite you to select it as "best answer".

If you are still encountering problems, I invite you to give us more information so we can help you.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
INaee.1
Senior

 Hi alexeyskosnyagin .

I have been playing with multiple screens with out any problem.

check my reply in following old post , in which I tried to explain keys handling .

https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/toughgfx-change-screen-from-button-virtual-function/m-p/580148#M34229

As per my understanding , you have done some part correctly , but transitions between screens need interrupted base hardware keys .

here is my latest TouchGFX Board with STM32H745 & 2.95" , 854X480 TFT.

The board has hardware keys with MCP23S17 SPI IO Expander with Interrupt.

I have 9 different screens till now in this tiny TouchGFX experiment.

STM32H745_TOUCHGFX_2.95inch_854X480_TFT.jpg

I will look in your codes and will revert back.

 

regards

i.n