cancel
Showing results for 
Search instead for 
Did you mean: 

What is hardfault?

-----????_---- ---??as
Associate III
Posted on September 07, 2017 at 18:02

I want to know more about hardfault.

1-)Is there any documentations about hardfault on stm32f415 microprocessor?

2-)Why does Hardfault occur(all reason)?

3-)Are there any difference between the processors(for example stm32f373 and stm32f415) when it occur HardFault?

4-)Can I send my processor in code to the previous statement when hardfault occur and go to the command somewhere which is safe?

#hard-fault
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on September 07, 2017 at 18:24

It's a topic covered frequently, please review prior postings, saves me having to repeat myself.

Read the ARM TRM (Technical Reference Manual) for the core. Get Joseph Yiu's book on the Cortex-Mx for an different perspective.

Hard Fault - Gross Error, you've done something stupid, reading/writing memory that doesn't exist, trashed the stack, errant pointers, alignment of 64-bit read/write. Trying to run 32-bit code, instructions not supported, FPU not enabled.

Cortex-M0, has less instructions and more alignment issues, will fault if you violate the rules.

Writes are deferred, error location likely to be 'imprecise' but within a few instructions of offending code, look at disassembly, look at registers.

Have a Handler

https://community.st.com/0D50X00009XkfOXSAZ

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

View solution in original post

1 REPLY 1
Posted on September 07, 2017 at 18:24

It's a topic covered frequently, please review prior postings, saves me having to repeat myself.

Read the ARM TRM (Technical Reference Manual) for the core. Get Joseph Yiu's book on the Cortex-Mx for an different perspective.

Hard Fault - Gross Error, you've done something stupid, reading/writing memory that doesn't exist, trashed the stack, errant pointers, alignment of 64-bit read/write. Trying to run 32-bit code, instructions not supported, FPU not enabled.

Cortex-M0, has less instructions and more alignment issues, will fault if you violate the rules.

Writes are deferred, error location likely to be 'imprecise' but within a few instructions of offending code, look at disassembly, look at registers.

Have a Handler

https://community.st.com/0D50X00009XkfOXSAZ

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