2024-06-03 01:15 AM
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?
2024-06-03 02:26 AM
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,
2024-06-03 03:33 AM
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.
2024-06-03 03:38 AM
Ok so that is a migration problem it looks like.
To migrate a GUI, click on Edit => Import => GUI
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,
2024-06-03 04:17 AM
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.
2024-06-04 08:26 AM
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,
2024-06-04 10:00 AM - edited 2024-06-04 10:02 AM
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);
2024-06-20 01:32 AM
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,
2024-07-18 12:39 PM
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 .
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.
I will look in your codes and will revert back.
regards
i.n