This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ESTOP0 Instruction

Hi,

 

I am verifying code which is implemented as interrupts as below:

interrupt void SEQ1INT_ISR(void)   /*SEQ1 ADC */
{
  /* Insert ISR Code here */

  /* To receive more interrupts from this PIE group, acknowledge this interrupt */
  /* PieCtrlRegs.PIEACK.all = PIEACK_GROUP1; */

  /* Next two lines for debug only to halt the processor here */
  /* Remove after inserting ISR Code */

  asm ("      ESTOP0");
  for(;;);

}

 

What exactly following lines of code does in function.

Regards

Ganesh

  • Hi Ganesh,

    The command asm("ESTOP0"); stops the emulation at this line. This can help you when your are debugging your project. You can check the call stack in order to see where you were coming from etc. The following line for(;;); loops endlessly. Think you don't have an emulator attached to your target. Now your code jumps into an interrupt service routine that is not yet coded out. Normally you want to know this - an endless loops keeps the target in this ISR, and you will be aware that something went wrong.

    Best regards

    Andreas

  • Hi,

    Can someone explain the command asm("ESTOP1")?

    In which situation is the command asm("ESTOP1") used?

  • Hi,

    The difference between "ESTOP0" and "ESTOP1" is that the latter does increment the program counter (PC) register when it is hit - "ESTOP0" does not

    Best regards,

    Andreas