[资料分享] 定位DSP 非法中断

Aguilera   2018-8-19 22:03 楼主
I use eZdsp F2812 to write a program that use CpuTimer0 interrupt. This interrupt consists of many call function.
This program is store in external memory since is a very long code.
I encounter this error when run it:

interrupt void ILLEGAL_ISR(void)   // Illegal operation TRAP
{
  // Insert ISR Code here

  // Next two lines for debug only to halt the processor here
  // Remove after inserting ISR Code
  asm("          ESTOP0");
  for(;;);

}

If I remove half of the program, then it will run perfectly.
Any idea what is wrong? Is it because my stack size is not enough? My stack size is 0x800.

Appreciate your help.
Thank you.

Regards,
Lin

Hi Lin,

I've found that following ISR handler is easier for debugging such problems. When the CPU halts on ESTOP0 or place the program counter (PC) on NOP and continue executing. The ISR handler should exit and jump(return) to the location that caused TRAP ISR to generate:

Regards, Mitja

void interrupt ILLEGAL_ISR(void)    // Illegal operation TRAP
{
    // Insert ISR Code here
    // Next two lines for debug only to halt the processor here
    asm ("  ESTOP0");
    // in order for code to halt also when not in debug mode
    asm ("  B   $,UNC");
    // place PC here to continue the execution
    asm ("  NOP");
}

回复评论

暂无评论,赶紧抢沙发吧
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复