Skip to main content
Associate III
November 5, 2024
Solved

Regarding the cause of HardFault_Handler

Regarding the cause of HardFault_Handler
HardFault_Handler occurs at a specific timing in our software.
I was able to determine which process was causing the problem by looking at the call stack, but is it possible to investigate the cause further by looking at registers or something else?

This topic has been closed for replies.
Andrew Neil
Andrew NeilBest answer
Super User
November 5, 2024

@pass3master wrote:

 is it possible to investigate the cause further by looking at registers or something else?


Yes it is!

See this - debugging hard faults on 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

 

A copy of Joseph Yui's Definitive Guide to Cortex M3 & M4 would also be helpful:

https://shop.elsevier.com/books/the-definitive-guide-to-arm-cortex-m3-and-cortex-m4-processors/yiu/978-0-12-408082-9

https://community.arm.com/support-forums/f/architectures-and-processors-forum/6195/when-will-be-the-release-of-the-definitive-guide-to-cortex-m7

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.

2 replies

Andrew Neil
Andrew NeilBest answer
Super User
November 5, 2024

@pass3master wrote:

 is it possible to investigate the cause further by looking at registers or something else?


Yes it is!

See this - debugging hard faults on 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

 

A copy of Joseph Yui's Definitive Guide to Cortex M3 & M4 would also be helpful:

https://shop.elsevier.com/books/the-definitive-guide-to-arm-cortex-m3-and-cortex-m4-processors/yiu/978-0-12-408082-9

https://community.arm.com/support-forums/f/architectures-and-processors-forum/6195/when-will-be-the-release-of-the-definitive-guide-to-cortex-m7

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
mƎALLEm
ST Technical Moderator
November 5, 2024
To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.