cancel
Showing results for 
Search instead for 
Did you mean: 

Undefined interrupt?

Posted on May 05, 2006 at 05:48

Undefined interrupt?

2 REPLIES 2
Posted on May 04, 2006 at 18:34

Hi folks,

So, according to what I read, if an attempt is made to execute an undefined instruction, the undef interrupt will occur.

I'm hitting my undefHandler soon after booting.

Is there any way to figure out what was happening just before the interrupt occurs? I read that the 'next instruction to be executed' is put in R14. Is this true? I get weird, and varying values in R14 when it's hit, in the 0xb0000000 range.

How can I begin to try to figure out what's happening here?

Steve

planeetmaa
Associate II
Posted on May 05, 2006 at 05:48

Hi!

I have had the same kind of experience when I managed to destroy the stack (pulling more registers than popping and the result was wrong and pretty weird pc).

Try setting brakepoints and see how far your code runs. Or build kind of ''traps''

label:

nop

b label

if you like. This way you can run your micro, attach to it with your debubber and see, did it make it so far or not. change your pc to point next instruction following the ''trap'', push ''ignition'' and see, if the next trap is found or excecution hangs before it. And you know then, from where to dig. Setting brakepoints is easier for sure, but sometimes I have had some problems with these too.

BR, Madis