Skip to main content
-----????_---- ---??as
Associate II
September 7, 2017
Solved

What is hardfault?

  • September 7, 2017
  • 1 reply
  • 676 views
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
    This topic has been closed for replies.
    Best answer by Tesla DeLorean
    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

    1 reply

    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    September 7, 2017
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..