Skip to main content
edmunoz
Associate
February 9, 2016
Question

Scape from HardFault Handler...

  • February 9, 2016
  • 2 replies
  • 593 views
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
    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    February 9, 2016
    Posted on February 09, 2016 at 16:07

    Addresses for 16-bit Thumb code are ODD

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

    Right! 

    Jump to 0x08060211  works properly...

    Thanks for your help.