2019-03-27 07:30 PM
Hi ST Community,
I've ported touchgfx on my custom board, and it runs successfully. The hardware and software configuration is as follows,
HW configuration
CPU -> STM32L4R9 family
SW configuration
IAR 8.30
TouchGFX Designer 4.9.3
Now, I'm trying to upgrade TouchGFX Designer to 4.10.0, I do the following steps,
I backup the call stack when crashing as follows. It crash when touchgfx_generic_init() -> FrontendHeap::getInstance(); is called.
HardFault_Handler
<Exception frame>
[_ZN8touchgfx6Screen4drawEv + 0x23]
[_ZN8touchgfx11ApplicationC1Ev + 0x61]
touchgfx::MVPApplication::MVPApplication()
touchgfx::MVPApplication::subobject MVPApplication()
FrontendApplicationBase::FrontendApplicationBase(class Model &, class FrontendHeap &)
FrontendApplicationBase::subobject FrontendApplicationBase(class Model &, class FrontendHeap &)
FrontendApplication::FrontendApplication(class Model &, class FrontendHeap &)
FrontendHeap::FrontendHeap()
FrontendHeap::getInstance()
class touchgfx::HAL & touchgfx::touchgfx_generic_init<STM32HAL_SPI>(class touchgfx::DMA_Interface &, class touchgfx::LCD &, class touchgfx::TouchController &, signed short, signed short, unsigned short *, unsigned int, unsigned int)
touchgfx::touchgfx_init()
GRAPHICS_Init()
I have no idea so far, can anyone help to look into the issue? Thanks!
Solved! Go to Solution.
2019-03-27 08:41 PM
When the library became exclusive to ST chips, they added a check to make sure it's running on ST hardware which uses ST's CRC peripheral. This means you need to enable the clock for the CRC peripheral before it tries to use it. I don't know when exactly touchgfx checks for this so can't tell if this is your issue based on the call stack but try adding
__HAL_RCC_CRC_CLK_ENABLE();
sometime before initializing touchgfx to see if that fixes it.
2019-03-27 08:41 PM
When the library became exclusive to ST chips, they added a check to make sure it's running on ST hardware which uses ST's CRC peripheral. This means you need to enable the clock for the CRC peripheral before it tries to use it. I don't know when exactly touchgfx checks for this so can't tell if this is your issue based on the call stack but try adding
__HAL_RCC_CRC_CLK_ENABLE();
sometime before initializing touchgfx to see if that fixes it.
2019-03-27 10:26 PM
@Community member
Thanks for your quick response.
Yes, Indeed. As you said, the crash is due to CRC peripheral not enabled. I've verified it works. Thank you!
Hope ST can provide a upgrade guide with TouchGFX Designer release.
2019-04-02 05:19 AM
Hi @L4Y,
The fact that you couldn't find this information is good input to us in some way. Sorry for the trouble. And thanks to @Community member for stepping in!
https://touchgfx.zendesk.com/hc/en-us/articles/207507415-Known-Issues
Best regards,
Martin
2022-03-03 03:25 AM
Still true and working solution in 2022 ! Many thanks.
2024-03-30 08:01 AM
Sorry, but now in 2024 this solution doesn't work for me.
I'm trying to develop a custom board touchgfx project with TouchGfx 4.23.0, STM32CubeIDE 1.14.1, STM32CubeMX 6.10.0. MCU is STM32WL5MOCH (Cortex M4).
I've generated the project with CubeMX itself.
MX_CRC_Init() (with __HAL_RCC_CRC_CLK_ENABLE();) is called before MX_TouchGFX_Init().
I have a systematic Hard Fault here:
In _ZN8touchgfx6Screen4drawEV, during instruction str r1, [sp, #0]:
Here are the registers:
What could be the problem?
Thank you