2019-12-03 06:57 AM
Hi,
I'm using the STM32H750 Discoveryboard.
When running my code from TouchGFX Designer, everything works fine.
But when running with Keil IDE, something strange is happening:
-Flashing the application and loading with the debugger -> hard fault occurs in funtion crc_lock
If I unplug and replug the board, the application starts just fine. Only when connected to the debugger, the hard fault occurs.
Do you have any hints?
__HAL_RCC_CRC_CLK_ENABLE is being called, so that shouldn't be a problem
Thanks.
Solved! Go to Solution.
2019-12-06 01:10 AM
So, after updating the ST Drivers and Keil uVision to the latest Version (couldn't do it earlier because of other projects), everything seems to work now.
Thank you all for the great support.
@Martin KJELDSEN keep up the good work!
If I get response from Keil, I will post it here.
2019-12-03 11:01 AM
Yes, very odd
Perhaps dump processor registers and disassembly at the offending code.
Could perhaps be linking wrong libraries, or pulling wrong include files.
See previous suggestions on using USART/VCP, and having an effective Hard Fault Handler to dump current state in an actionable form.
https://www.st.com/en/evaluation-tools/stm32h750b-dk.html
2019-12-03 02:01 PM
Try to single-step in disasm to find the exact operation which leads to the hardfault.
JW
2019-12-04 03:28 AM
In attached screenshot, you can see the exact operation and the corresponding registers. This is in Function CRC_Lock
Maybe you can help me identifying the problem, because I have no idea what could be wrong here.
And here the Fault Reports:
One other "funny thing": After flashing the software (without debugging) the application does not start after pressing the reset button on the DK. Only a power off / power on cycle dose help.
2019-12-05 01:25 AM
@Martin KJELDSEN maybe you can help? And I just saw, that I'm not the only one, please see https://community.st.com/s/question/0D50X0000Bh7igVSQQ/hardfault-with-very-basic-touchgfx-application
We are evaluating a library for our next product and I would like to use TouchGFX, but if this can't be solved, we are forced to check for an alternative.
Could this problem be related to the keil library? Or Keil in general?
Thanks a lot.
2019-12-05 01:32 AM
Hi @Roman Schläpfer,
I think it's actually something to do with Keil - I recall a customer having help specifically from Keil to resolve this issue. It had something to do with the device type read by TouchGFX being read wrong for a particular device (H7 - can you confirm?) and thus defaulting to something else in our stm32 locking mechanism - forcing a hard fault because of unknown device type.
/Martin
2019-12-05 01:36 AM
Thanks for you quick reply @Martin KJELDSEN
Yes it's the H7 we're using here.
Do you have any contact information for me? Do you have by any chance the solution (from Keil) to this problem? I couldn't find anything on the internet...
Thanks again
2019-12-05 01:48 AM
I'm trying my best to recollect :) I'll return when i have more info.
/Martin
2019-12-05 01:51 AM
Okay, i found the ticket from way back (2018). This was on an H743.
"The Keil/Arm support found a solution for me, provided some Keil DLL´s to install and now my project is running correctly."
Which version are you running? Can you contact Keil? I'm sure they're aware of the issue if they haven't fixed it already.
/Martin
2019-12-05 01:55 AM
We are working with a H750 with the latest Keil installation.
Thanks, I will try to find someone at Keil.