2017-09-07 09:02 AM
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-faultSolved! Go to Solution.
2017-09-07 09:24 AM
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
2017-09-07 09:24 AM
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