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.
Hello everybody:
I'm from shanghai China.I use TI's 28034 chip.Now I meet a strange phenomena "My programe will jump in trap of "ILLEGAL_ISR". I want your help.
My programe is simply like below:
void main()
{
InitSysCtrl();
MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
InitFlash();
init hard_interface();
init interrupt();
other_proc();
for{;;}
{
cycle_a();
cycle_b();
}
interrupt_proc()
{
interrupt_a();
interrupt_b();
}
}
Now my programe in init step it will jump in "ILLEGAL_ISR" trap. AND it awlays occured before "other_proc();"mark .But when i add "asm( " nop");" in the programe everywhere,just like on the top of void main ,before init interrupt();,even in for cycle,in interrupt_proc(), mark If i do this ,the programme will return to normal.
I wonder the condition of jump in "ILLEGAL_ISR" trap.I haven't found the data sheet about this!
Looking forward to your answer!
Best regard to you!
FengXianGuo
Sep. 27th 2010
Hi FengXianGuo,
After reading your description, for me it is not obvious where the bug hides. Here is how I would try to solve the issue
-are all the clock settings correct for the target
-Disable the interrupts in init interrupt(); and see if the error persists
-check precisely that you don't overwrite any memory that you shouldn't
-modifiy the ILLEGAL_ISR routine towards the following (this is a proposal from Mitja Nemec - thank you Mitja this salved me more than a day :-) )
interrupt
void 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");
}
Place the program counter to the line containing the asm("NOP"); statement and step ahead. The program should continue exactly at the place where the ILLEGAL_ISR was issued.
Hope this helps
regards
Andreas
Hi andreas von kaenel:
Thanks for your reply. I have tryed your suggestion.If i disable the interrupt,the programme will not jump in the trap.i want to know the condition of the trap!
best regards to you!
FengXIanGuo
Hi,
If you want to know the reason of the trap you will have to debug.... Re-enable one interrupt after another and see which one causes the trap... Btw, the reasons why ITRAP's are issued are listed in the Document spru430e.pdf section 3.6
Best regards