Skip to main content
Charlie CHEN
Associate III
May 13, 2019 5:20 AM UTC
Question

Keil Debug

Hi professor,

I`m trying to use debug mode with keil.I get it in to the function and it run the function without press run button,but when I stop it ,it go in to hardfault.

Is any one have faced the problem before?

THKS!0690X000008BZKvQAO.png

This topic has been closed for replies.

4 replies

Tesla DeLorean
Guru
May 13, 2019 5:57 AM UTC

SystemInit faults? Perhaps step in to that and review the code. Inspect Hard Fault location reported by processor, it has registers for that.

Are you using RAM which needs a clock enabled?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Charlie CHEN
Associate III
May 16, 2019 8:12 AM UTC

Hi @Community member​ ,

Thanks for your reply!

I have enabled the appropriate clock ,and I cannot check the register cause it can`t run normally,just stuck in Reset_Handler.

Is there any problem occur?

Thanks again!

Tesla DeLorean
Guru
May 17, 2019 2:43 PM UTC

Use Stop to see where it is.

Turn off the "Run to main()" setting of the debugger, and start stepping into/through the SystemInit() function. Determine where things go wrong, and where exactly it ends up.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..