Skip to main content
AKetc
Associate III
October 20, 2019
Question

GUI Freezes on Target Board.

  • October 20, 2019
  • 15 replies
  • 2580 views

Hi everyone,

I have developed a GUI based on STM32F769I-DISCO Board. The GUI works perfectly fine on the TouchGFX simulator. It also flashes perfectly inside the target board. However, in my GUI, I have added a code such that when a certain button is pressed, a Custom Keyboard pops up (becomes visible). The keyboard is my custom designed on the custom container and added in the Main Screen. The keyboard works great in simulator. However, on target board, as soon as I press the button, the GUI Freezes and never resumes until I reset the board. It then again resumes whenever the keyboard is supposed to pop-up. Any suggestions or ideas as to why this might be happening??

Thanks.

This topic has been closed for replies.

15 replies

TDK
October 20, 2019

Possibilities:

  • Code inside an interrupt never returns.
  • Something causes a hardfault.

Debug your code and see where it gets stuck.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Martin KJELDSEN
Principal III
October 21, 2019

I would also check what your application is doing at the time of "freeze", as @TDK​ states.

Is there anything special about your keyboard? The framework has some asserts to guard for lack of buffer for CanvasWidget, wrong pixel format vs what you've selected for your LCD driver, etc. You may be running into one of those (If your custom keyboard uses RGB565 images but you're using LCD24bpp).

/Martin

AKetc
AKetcAuthor
Associate III
October 21, 2019

The complete GUI consists of similar images. The keyboard is no different. Also, the GUI crashes the moment keyboard is setVisible. All other elements and images and transitions work fine. ​

AKetc
AKetcAuthor
Associate III
October 22, 2019

Should I share my project files for you to debug?

Martin KJELDSEN
Principal III
October 22, 2019

Maybe! What about your OS Task Stack size?

AKetc
AKetcAuthor
Associate III
October 22, 2019

I am not sure where to find this. Could you please explain?

AKetc
AKetcAuthor
Associate III
October 23, 2019

@Martin KJELDSEN​ If you can please have a brief look and find out the issue. I know you are a very busy person, just some time you can spare please. I am attaching the project TeacherUI.zip. It will work fine on the simulator and crashes on the hardware only when the custom keyboard is set visible.

Martin KJELDSEN
Principal III
October 23, 2019

Hi @AKetc​,

Took a look at your project. Didn't compile for me. I've removed the following line because buffer is undefined.

memset(usernameBuffer, 0, sizeof(buffer));

If you say it crashes when keyboard is visible. Are you able to debug this? Figure out where the program counter is, what your application is doing ? When you say it crashes when the custom keyboard is visible - how do you know this? Because you're trying to enter the login screen and it does before it shows the keyboard? Or can you actually see the keyboard? etc! So many questions =)

A tip: You don't need to invalidate when setting things up in setupScreen().

AKetc
AKetcAuthor
Associate III
October 24, 2019

I cant even see the keyboard at all. The login screen opens up and and I have placed a button there. The button ​press calls a virtual function where I am setting the keybaord to visible. At this point, it crashes as soon as I press the button. I removed the setVisible(true) from the code and then flashed it. Everyhing worked perfectly fine. It's just that my GUI can't diaplay the keyboard.

P.S sorry for the memset line, I added it laat night before attaching my project because I was trying multiple things to get it working.​

AKetc
AKetcAuthor
Associate III
October 24, 2019

I also tried one more thing, adding the keyboard and then leaving it visible ​on UI at the start of screen. What happened was that UI froze as soon as it flashed. This clearly means the UI is not able to display the keyboard for some reason.