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");
}