Where does Unhandled Interrupt error comes from ?

cancel
Showing results for 
Search instead for 
Did you mean: 

Where does Unhandled Interrupt error comes from ?

4,921 Views
MQXuser
Contributor III

This is the failure that is destroying my application:

 

*** UNHANDLED INTERRUPT ***
Vector #: 0 0x0
Offset  : 0 0x0
Task Id: 0x10002 Td_ptr 0x20001f78 Stack Frame: 0x2000149c
Interrupt_nesting level: 1   PC: 0x00000000    SR:  0x000e

 

I am using an interrupt port in MCF52259  and when getting a lot(500 interrupts per second) of continous interrupts the program crashes. Changing hardware is the very last of my options (for example adding an 8 bit MCU to read this interrupts).

 

1.-Why is this happening?

2.-What should be the way to avoid this unhandled interrupt error? (Could Handling these interrupts outside MQX solve the problem???)

 

Thank you for you help.

 

 

0 Kudos
12 Replies

1,324 Views
Rpalenci
Contributor II

Hi,

 

    I have a similar problem and I don`t understand it. How can I understand the problem.

I can read this:

 

*** UNHANDLED INTERRUPT ***
Vector #: 0  0x0
Offset  : 0  0x0
Task Id: 0x10001 Td_ptr 0x20000e04 Stack Frame: 0x200008fc
Interrupt_nesting level: 2   PC: 0x20007948   SR: 0x003d

 

Could you help me?

 

Thank you.

Best regards.

0 Kudos

1,324 Views
eGuy
Contributor IV

 

 


Rpalenci wrote:

Hi,

 

    I have a similar problem and I don`t understand it. How can I understand the problem.

I can read this:

 

*** UNHANDLED INTERRUPT ***
Vector #: 0  0x0
Offset  : 0  0x0
Task Id: 0x10001 Td_ptr 0x20000e04 Stack Frame: 0x200008fc
Interrupt_nesting level: 2   PC: 0x20007948   SR: 0x003d

 

Could you help me?

 

Thank you.

Best regards.


 

I also see similar problem.

 

Any answers to this question?

 

Regards,

 

0 Kudos

1,324 Views
MarkA
Contributor I

 


eGuy wrote:

 

 


Rpalenci wrote:

Hi,

 

    I have a similar problem and I don`t understand it. How can I understand the problem.

I can read this:

 

*** UNHANDLED INTERRUPT ***
Vector #: 0  0x0
Offset  : 0  0x0
Task Id: 0x10001 Td_ptr 0x20000e04 Stack Frame: 0x200008fc
Interrupt_nesting level: 2   PC: 0x20007948   SR: 0x003d

 

Could you help me?

 

Thank you.

Best regards.


 

I also see similar problem.

 

Any answers to this question?

 

Regards,

 


 

I'm also fighting this.  I just moved from CW 7.1.2 to 7.2.1.  I'm using MQX 3.3 and 52259.

 

If I disable all my autostart tasks, including the startup task, MQX runs happily doing nothing.  If I enable my startup task to autostart I get the vector 0 offset 0 crash.  I've even replaced my startup task with

 

void Startup_Task(uint_32)
{
    _int_install_unexpected_isr();
    for( ; ; ) {}
}

 

and still get the same crash.

 

Is MQX 3.3 and CW 7.2.1 known to be a bad mix?

 

Thanks

0 Kudos

1,324 Views
Rpalenci
Contributor II

 

        Dear,

 

        Firstly, tell to you that I have used MQX 3.4 && 3.5, only.

 

       I am not sure if you can have some similar problem to me. My problem was prodruced using stack RTCS.

       When I send a pcb fragment, I didn't wait for MQX free the pcb fragment for I send other pcb fragment.

Handled interrupt is porduced because I tried write in a structure while the system is using yet.

 

Solve: I use a mutex in function callback where the system tell me it finished with the structure. Only, if the mutex is unlock I can come back to send..

 

        I hope that It help to someone.

 

       Regards.

0 Kudos

1,324 Views
eGuy
Contributor IV

Thanks for your reply.

 

My problem was solved, see here:

https://community.freescale.com/message/66897#66897

 

Regards,

 

Jeff

0 Kudos

1,324 Views
DavidS
NXP Employee
NXP Employee

Hi MQXUser,

Good rule of thumb is if doing more than 200 interrupts per second, to set the interrupt to be direct and not letting the RTOS handle it.  This save much overhead and time.  This method will pre-empt the RTOS so make certain your ISR handler is small-short-fast.

Regards,

David

0 Kudos

1,324 Views
MQXuser
Contributor III

Eventually, I have the 200 interrupts per second, but this is not all the time. What about the Unhandled Interrupt?, Task Aware debugger shows me that the Unhandled Interrupt was presented in shell Task. Should I believe this this? Shell task has the lowest priority compared to my other 8 tasks. 

Does the extra overhead and extra time used to handle these interrupts cause the Unhandled Interrupt?

 

0 Kudos

1,324 Views
EAI
Contributor IV
To solve this problem, you need to identify which interrupt (or exception) is unhandled. Install  the unexpected_isr handler (   _int_install_unexpected_isr();
) which will print the vector number of the unhandled interrupt.

1,324 Views
MQXuser
Contributor III

I have it already printed. This is the information it gives me:

 

*** UNHANDLED INTERRUPT ***
Vector #: 0 0x0
Offset  : 0 0x0
Task Id: 0x10002 Td_ptr 0x20001f78 Stack Frame: 0x2000149c
Interrupt_nesting level: 1   PC: 0x00000000    SR:  0x000e

 

What does it tell me?

How does it help me to solve the problem?

0 Kudos

1,324 Views
EAI
Contributor IV

It looks to me like you are getting some memory corruption. Your PC and vector number are both zero - which do not make sense. If it really was some unhandled interrupt, the vector and pc would have sensible values.

 

 

0 Kudos

1,324 Views
MQXuser
Contributor III
Can the memory be corrupted by the rate at which interrupts can be called in my application?
0 Kudos

1,324 Views
MQXuser
Contributor III

Okay, now I am getting Unhandled interrupt error with PC and vector numbers. Most of the times unhandled interrupt comes from different tasks. Unhandled interrupt comes when many interrupts ocurr in a short period of time.

How could I avoid this error?

0 Kudos