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.
I'm currently trying to debug why an ITRAP is occurring on the F28379D chip we are using. Here are some things to consider:
Please advise on how I may debug this ITRAP condition further. Thank you!
Hi,
Please refer to "How can I debug an ITRAP?" section from the below link
https://software-dl.ti.com/C2000/docs/c28x_interrupt_faq/html/index.html
You can try removing the forever loop and replace with a return, but place a breakpoint there to debug further as mentioned in the FAQ.
I have already referenced this document and it is quite vague as to how to actually debug as it is saying. "Insert a breakpoint into the ISR"...which ISR...where? Or with "looking at the return address value on the stack"...again, where and how do I do view this value? I've already tried to replace the infinite for loop and set a breakpoint, but the debugger steps over the return as if it isn't there, which tells me there must be some other file I must edit. Please re-read my post and advise.
Hi Nigel,
Since you have already verified that the stack is not the issue, it may be some other event. Please look at the following document section 3.6 "Illegal Instruction Trap" section. This has information on how to get the offending address by looking at the contents pushed on the stack when the core is in the trap ISR. This may help shed some light on what may be causing the trap.
https://www.ti.com/lit/ug/spru430f/spru430f.pdf
Thanks,
Ashwini
The interrupt FAQ link pasted earlier should include further information on this document. I'm not familiar with the stack/interrupt specifics so section 3.6 is a bit convoluted. Here's a screenshot of the stack memory at the moment the program hits the ESTOP0 in Interrupt_illegalOperationHandler(). Highlighted is where the current stack pointer is (0xB865) Please let me know how I may further debug:
Hi Nigel,
It will be hard to answer this question just by looking at the memory as the ISR itself will have some prologue code generated by the compiler that will be pushing content to the stack other than what is automatically done by the hardware as indicated in Table 3-5 of above CPU and Instruction Set Guide. Without that ISR code information it will not be possible to backtrack in the stack and finding the offending address.
The following post has more details to understand this and help you backtrack the stack and get the address.
Thanks,
Ashwini
Ok...I decided it was easier to just step through every interrupt on our system, starting with the most complex, to see if it triggered the ITRAP. Luckily the illegal instruction was triggered on the first interrupt I checked so that saved me a lot of debugging time. Unfortunately seems like a memory overrun...for some reason a function callback within a struct gets overwritten with the wrong address. Needless to say, I've narrowed it enough to not require further assistance.