TMS320F280039C: Illegal instruction trap (ITRAP) doubts

Part Number: TMS320F280039C

Tool/software:

Hi Champ,

I am asking for my customer doing server PSU. It is urgent due to production stop.

The MCU hung in randomly, and easily duplicate. We are troubleshooting if it runs the code then suddenly fall into ITRAP.

To clarify illegal instruction trap (ITRAP),

1. When ITRAP occurs, how long does it take to get into illegal instruction trap interrupt handler (how many sysclk) ?

2. Any way to get rid of / leave ITRAP and continue to run the code ? or it must be fixed to continue running the code ?

Looking from below chart, it seems program could be continued in the end, doesn't it ? 

3. Reading from here, https://software-dl.ti.com/C2000/docs/c28x_interrupt_faq/html/index.html

If the code is running for a while then encountering ITRAP randomly, in the case of no JTAG connected for online debugging, how would you suggest to start from debugging ?

Please advise.

Thanks and regards,

Johnny

  • Hi Johnny,

    I am looping in the C28x core expert to take a look at your questions.

    Best Regards,

    Delaney

  • 1. When ITRAP occurs, how long does it take to get into illegal instruction trap interrupt handler (how many sysclk) ?

    It is the same as any other ISR and will depend on how many registers the compiler needs to save. The PIE section of the TRM has a diagram with the timing from interrupt to execution of the first instruction in the ISR

    2. Any way to get rid of / leave ITRAP and continue to run the code ? or it must be fixed to continue running the code ?

    An application can return from ITRAP. This can be done during debug to see where the code was running before the ITRAP - that is take a breakpoint in the ITRAP and single step through the return.  In a real application, however I wouldn't recommend this because the ITRAP was taken for a reason. Continuing on will likely have issues.

    If the code is running for a while then encountering ITRAP randomly, in the case of no JTAG connected for online debugging, how would you suggest to start from debugging ?

    There is some ideas at the bottom of this page. This page also has a timing diagram related to question (1)

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

    Regards

    Lori