cancel
Showing results for 
Search instead for 
Did you mean: 

We want to light up an LED when a hard fault occurs.

pass3master
Senior

We want to light up an LED when a hard fault occurs.

Please tell me in which handler I should put the GPIO processing.

Also, We would like to turn on the LEDs for faults other than Hard fault, is that possible?

 

1 ACCEPTED SOLUTION

Accepted Solutions

@pass3master wrote:

We want to light up an LED when a hard fault occurs.


Good idea!

 


@pass3master wrote:

Please tell me in which handler I should put the GPIO processing.


In the Hard Fault Handler!

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

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 

 


@pass3master wrote:

Also, We would like to turn on the LEDs for faults other than Hard fault, is that possible?


Of course - do it in the handlers for those faults

 

View solution in original post

2 REPLIES 2

@pass3master wrote:

We want to light up an LED when a hard fault occurs.


Good idea!

 


@pass3master wrote:

Please tell me in which handler I should put the GPIO processing.


In the Hard Fault Handler!

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

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 

 


@pass3master wrote:

Also, We would like to turn on the LEDs for faults other than Hard fault, is that possible?


Of course - do it in the handlers for those faults

 

Thank you for your prompt reply. It was helpful.