cancel
Showing results for 
Search instead for 
Did you mean: 

Keil Debug

Charlie CHEN
Associate II

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

4 REPLIES 4

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
Up vote any posts that you find helpful, it shows what's working..

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!

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
Up vote any posts that you find helpful, it shows what's working..

@Community member​ 

Thanks for your helping!

I found out where the wrong is,and solved it.

Really appreciate your patient and advice!👍