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.

illegal operation

请问piccolo系列的DSP,具体有哪些illegal operation,会进入下面的中断

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(;;);

}

  • Any one of the following events causes an illegal-instruction trap:

     An invalid instruction is decoded (this includes invalid addressing modes).

     The opcode value 000016 is decoded. This opcode corresponds to the

    ITRAP0 instruction.

     The opcode value FFFF16 is decoded. This opcode corresponds to the

    ITRAP1 instruction.

     A 32-bit operation attempts to use the @SP register addressing mode.

     Address mode setting AMODE=1 and PAGE0=1

  • 1. 请问是否用到Delay_us()函数,如果用到了,是否把此函数已经copy到Ram中运行了?

    2. 请问是否检查Stack空间足够大?程序运行中,不会导致Stack空间溢出?检查方式可以先将Stack空间全部赋值为0xBEEF,然后运行程序一段时间,停止,看是否有溢出现象。

    3. 请检查程序中的memcpy 或者 for循环,是否出现了越界的现象?就是对不该赋值的空间进行了赋值。

    4. 请更换仿真器再做尝试,或者烧写到Flash中,脱离仿真器运行,用点灯程序确认是否正常运行,来排除仿真器的原因。

    5. 是否使用了ITRAP 汇编陷阱指令?