cancel
Showing results for 
Search instead for 
Did you mean: 

Scape from HardFault Handler...

edmunoz
Associate II
Posted on February 09, 2016 at 15:57

Hi!

Please, i need your help... Im working on STM32.

I need to scape from HardFault_Handler, without reset, and make an unconditional jump to a concise position...

My code:

void HardFault_Handler(unsigned int * hardfault_args)

{

if (flag==1)

{

void (*fptr)(void);

fptr= (void (*) (void)) (0x08060210);

fptr();

}

 

while(1);

}

but it doesn`t work...

May be I need to clear some register, or set to privileged mode?

Flag is set before the ''dangerous'' zone, to catch the exception....

Please can you help me?

Thank you very much in advance!

Yours

Ed
2 REPLIES 2
Posted on February 09, 2016 at 16:07

Addresses for 16-bit Thumb code are ODD

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
edmunoz
Associate II
Posted on February 10, 2016 at 08:30

Right! 

Jump to 0x08060211  works properly...

Thanks for your help.