Skip to main content
Visitor II
November 7, 2024
Solved

Getting Hardfault with my application

  • November 7, 2024
  • 3 replies
  • 797 views

Hello all I am facing a issue my program works however when is executes this part it runs only once after that it ran into hard fault. I have attached the snap of structure part of code which cause it and also exception observation please let me know if you do have any suggestion.

 

devendra_0-1730998040941.pngdevendra_1-1730998061085.jpegdevendra_2-1730998106266.pngdevendra_3-1730998124147.jpeg

 

    This topic has been closed for replies.
    Best answer by Andrew Neil

    On debugging Hard Faults - both Cortex-M in general, and STM32 in particular:

    https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/tac-p/708193/highlight/true#M51

     

    and please scroll to the top of that thread for how to properly post source code - not as images ...

    3 replies

    Super User
    November 7, 2024

    On debugging Hard Faults - both Cortex-M in general, and STM32 in particular:

    https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/tac-p/708193/highlight/true#M51

     

    and please scroll to the top of that thread for how to properly post source code - not as images ...

    Technical Moderator
    November 7, 2024

    Hello,

    Need to read this article on how to debug the hard fault.

    Graduate II
    November 7, 2024

    Identify the processor

    Show the registers

    Show the code (disassembly) at the failure

    Reading something from a bad pointer? Misaligned?

    https://github.com/cturvey/RandomNinjaChef/blob/main/KeilHardFault.c

    I perhaps need to migrate this to GNU/GCC variant, and g_pfnVectors