2024-02-04 11:56 AM - edited 2024-02-04 02:15 PM
Hello,
I am working on a project that uses a STM32H7B3I-DK Board and an octospi memory MX25LM51245G. I also use the touchgfx library for the graphical interface.
I encountered a hard fault issue that occurs randomly during the initialization of touchgfx. Specifically, the fault occurs in the function Texts::setLanguage(0); which is called by the function touchgfx_init();.
I used the cube programmer to analyze the fault and I got the following information (See Image)
Could the problem be related to the access to the texts table, which is stored in the octospi memory. I wonder if there is a problem with the configuration or the timing of the octospi interface.
I also noticed that before I increased the frequency of the octospi, I had another issue where the octospi got stuck in an infinite loop in the HAL_Delay function. I don’t know if this is related to the hard fault issue or not.
I have attached some screenshots of the cube programmer interface showing the hard fault addresses and the octospi waiting loop also the ioc file, also I want to know how to decrease the frame buffer RAM and the RAM
Can anyone help me to solve this issues or give me some hints on what to check or try?
Thank you in advance for your help.
Solved! Go to Solution.
2024-02-05 12:37 AM
Hello @Ayoub_Bnina ,
As mentioned in schematic and User manual, the STM32H7B3I-DK board includes a 512-Mbit Octo‑SPI NOR Flash memory device ( MX25LM51245G), which is connected to the OCTOSPI1 interface of the STM32H7B3LIH6Q microcontroller.
For that please, Could you please refer to AN5050 to configure the OCTOSPI interface precisely 6.2.3 OCTOSPI GPIOs and clocks configuration section.
Is Octo‑SPI NOR Flash memory device operated in a single transfer rate (STR) or a double transfer rate (DTR) mode?
Also, I advise you to take to OSPI examples may help you.
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-02-05 12:37 AM
Hello @Ayoub_Bnina ,
As mentioned in schematic and User manual, the STM32H7B3I-DK board includes a 512-Mbit Octo‑SPI NOR Flash memory device ( MX25LM51245G), which is connected to the OCTOSPI1 interface of the STM32H7B3LIH6Q microcontroller.
For that please, Could you please refer to AN5050 to configure the OCTOSPI interface precisely 6.2.3 OCTOSPI GPIOs and clocks configuration section.
Is Octo‑SPI NOR Flash memory device operated in a single transfer rate (STR) or a double transfer rate (DTR) mode?
Also, I advise you to take to OSPI examples may help you.
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-02-07 07:26 AM
Hello @Ayoub_Bnina ,
Yes, as you mentioned the problem arises from touchgfx_init() not being able to access the text table stored in octospi memory. So, by following @KDJEM.1 's guidance and fixing your octospi, you should be able to run TouchGFX easily.
Keep in mind that, there is already a Board Setup for STM32H7B3I-DK available on TouchGFX Designer that you can simply use to develop your GUI.
And to answer your question about the size of the framebuffer, you cannot decrease the size of the framebuffer because it is based on the resolution of the display and the pixel format that is based on. So, for the mentioned Board Setup, it would be 480*272 * 2(16 bpp) bytes
I hope this helps you