AnsweredAssumed Answered

Scape from HardFault Handler...

Question asked by munoz.eduardo on Feb 9, 2016
Latest reply on Feb 10, 2016 by munoz.eduardo
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

Outcomes