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.

TMS320F280049C: Interrupt_illegalOperationHandler(void) is triggered when using larger size interrupt code

Part Number: TMS320F280049C


Hi expert,

    My customer is using F280049 controlCARD for testing and now there are some problems.

    Customer's ISR code is contained in RAMLS0LS1LS2LS3LS4LS5. When running the program, it triggers Interrupt_illegalOperationHandler(void). But when customer delete some code in ISR randomly to reduce the size of the ISR, the program no longer triggers Interrupt_illegalOperationHandler(void). The customer has tested it, no matter which part of the code is deleted, the result is the same.

    It is a little difficult to understand this phenomenon. So could you please tell me why does this happen? Thanks!

BR

Julia

  • Hi Julia ,

    This will require some debug.  An ITRAP is often caused by a buffer or stack overflowing. 

    Are you copying the code/function from Flash to RAM during run-time?  If so , make sure that the code which is being loaded into flash and run from RAM is properly copied to RAM before the function is called.

    Few other ways to debug are mentioned below

    • Insert a return instruction into the ISR. Set a breakpoint on this instruction and then step to see where the code came from.

    • Another option is to look at the stack. When you take an illegal instruction trap, registers are automatically pushed on the stack, including the return address. By looking at the return address value on the stack, you can find out where the ITRAP occurred.

    If you continue to have issues with illegal interrupts, I would recommend you follow the debugging tips explained in the following link. 

    https://software-dl.ti.com/C2000/docs/c28x_interrupt_faq/html/index.html

    Best Regards

    Siddharth