PC reached to HardFault
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-03 2:42 AM
Hello, I am using Keil uVision V 5.15.
Controller is STM32f070cb.
I am using STM32 discovery board as debugger.
While debugging the device the PC reached to HardFault_Handler in start up file of the controller.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-03 4:29 AM
A Hard Fault handler should be able to determine the instructions causing the fault. Look at the stacked context, and registers, then look at the surrounding instructions against that context.
Other frequent causes of Hard Fault are touching memory inappropriately, or attempting to run ARM 32-bit code, often in external libraries. On the Cortex-M0 watch also for memory alignment faults, it can't load unaligned 32-bit values.
Use a proper Hard Fault Handler to dump the context, and look at the faulting code.
This is a topic I've covered here hundreds of times, please review some of the other threads.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-03 4:35 AM
https://community.st.com/0D50X00009XkYYDSA3
https://community.st.com/0D50X00009XkfOXSAZ
Up vote any posts that you find helpful, it shows what's working..
