AnsweredAssumed Answered

very strange issue on mcf5307

Question asked by Angelo Dureghello on Jul 30, 2011
Latest reply on Aug 2, 2011 by Angelo Dureghello

Dear all,

 

i am running the u-boot bootlader on mcf5307, everything works, until i enable timer2 interrupt for the clock.

 

After "rte" in the interrupt handler, cpu generate the following exception:

 

*** Unexpected exception ***
Vector Number: 3  Format: 04  Fault Status: 4

PC: 00fe910a    SR: 00002000    SP: 00ed8af0
D0: 00002c1b    D1: 0000001b    D2: 00400000    D3: 00ee8b76
D4: ffc12d08    D5: ffffffff    D6: 00ffad57    D7: 00ee8b76
A0: 00ee8b76    A1: 00fe9604    A2: 00ee8bc6    A3: 00ffd400
A4: 00ff8167    A5: 00ffbb00    A6: 00ed8b48

 

this code generate the exception:

 

_int_handler:

             rte   <-----

 

this code don't generate any excetion:

_int_handler:

            rts

 

 

It is incredible, manual says clearly that on exceptions, the top of the stack is not the return address but the longword with vector/format/status values. Since "rts" works, seems top of the stack to have the return address.

I am really stucked and can't realize the reason for this.

 

Any help is really appreciated.

many thanks

angelo

Outcomes