AnsweredAssumed Answered

Setjmp ( return from ISR )

Question asked by Carlos Candido on Jun 29, 2015
Latest reply on Jul 2, 2015 by Norm Davies

Hi,

using setjmp, I need it to do the longjmp, returning from a ISR (systick 1ms). lonjmp when it happens the first time, it disables all ISR.

I need all ISR, working properly. my qustion.

KDS300

FRDM-K20D50

//-------------------------------------------------------------------

PE_ISR(_Systick)  // function in Flash

{

          if( ++ dly == 200){

                dly = 0;

                spt ++;

                LED1_Neg();

 

            if(    ! Exit_test ){

 

                Exit = TRUE;  // exit RAM execute

                Exit_test = TRUE;  // run = 1

 

            }else{

 

                Exit = FALSE;

                return;

            }

            }

 

          if( Exit ){                                              // case, error or watchdog timer, in code execute ram.

              longjmp(CPU_STD , -1 );               //  restored cpu,   return to  __ISR_times_1oous_main

                                                                   // in ASM list( bl    longjmp ) not ( BX LR ) to RTI

          }

 

}

Original Attachment has been moved to: K20_Setjmp_isr.zip

Outcomes